Ewl_Statusbar: A status bar widget
Detailed Description
Defines a class for displaying status bars
- Remarks:
- Inherits from Ewl_Box.
Tutorial
Data Structures | |
struct | Ewl_Statusbar |
Inherits from the Ewl_Box class and extends it to provide for a simple status bar. More... | |
Defines | |
#define | EWL_STATUSBAR(statusbar) ((Ewl_Statusbar *) statusbar) |
#define | EWL_STATUSBAR_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_STATUSBAR_TYPE)) |
#define | EWL_STATUSBAR_TYPE "statusbar" |
Typedefs | |
typedef struct Ewl_Statusbar | Ewl_Statusbar |
Functions | |
void | ewl_statusbar_active_set (Ewl_Statusbar *sb, Ewl_Position pos) |
Sets the active statusbar container. | |
void | ewl_statusbar_cb_destroy (Ewl_Widget *w, void *ev, void *data) |
int | ewl_statusbar_init (Ewl_Statusbar *sb) |
Initialize a statusbar to default values. | |
void | ewl_statusbar_left_append (Ewl_Statusbar *sb, Ewl_Widget *w) |
pack the given widget w into the statusbar sb into right of the left box. | |
void | ewl_statusbar_left_hide (Ewl_Statusbar *sb) |
hide the box on the left of the status bar | |
void | ewl_statusbar_left_prepend (Ewl_Statusbar *sb, Ewl_Widget *w) |
pack the given widget w into the statusbar sb into the left of the left box | |
void | ewl_statusbar_left_show (Ewl_Statusbar *sb) |
show the box on the left of the status bar | |
Ewl_Widget * | ewl_statusbar_new (void) |
Allocate and initialize a new statusbar widget. | |
void | ewl_statusbar_pop (Ewl_Statusbar *sb) |
Removes the most recent status message and displays the one before it. | |
void | ewl_statusbar_push (Ewl_Statusbar *sb, char *txt) |
Displays the given status message on the statusbar. | |
void | ewl_statusbar_right_append (Ewl_Statusbar *sb, Ewl_Widget *w) |
pack the given widget w into the statusbar sb into the right of the right box | |
void | ewl_statusbar_right_hide (Ewl_Statusbar *sb) |
hide the box on the right of the status bar | |
void | ewl_statusbar_right_prepend (Ewl_Statusbar *sb, Ewl_Widget *w) |
pack the given widget w into the statusbar sb into the left of the right box | |
void | ewl_statusbar_right_show (Ewl_Statusbar *sb) |
show the box on the right of the status bar |
Define Documentation
#define EWL_STATUSBAR | ( | statusbar | ) | ((Ewl_Statusbar *) statusbar) |
Typecasts a pointer to a Ewl_Statusbar pointer
Referenced by ewl_statusbar_cb_destroy().
#define EWL_STATUSBAR_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_STATUSBAR_TYPE)) |
Returns TRUE if the widget is an Ewl_Statusbar, FALSE otherwise
#define EWL_STATUSBAR_TYPE "statusbar" |
- Widget Theme Keys:
- /statusbar/file
- Widget Theme Keys:
- /statusbar/group
Referenced by ewl_statusbar_active_set(), ewl_statusbar_cb_destroy(), ewl_statusbar_init(), ewl_statusbar_left_append(), ewl_statusbar_left_hide(), ewl_statusbar_left_prepend(), ewl_statusbar_left_show(), ewl_statusbar_pop(), ewl_statusbar_push(), ewl_statusbar_right_append(), ewl_statusbar_right_hide(), ewl_statusbar_right_prepend(), and ewl_statusbar_right_show().
Typedef Documentation
typedef struct Ewl_Statusbar Ewl_Statusbar |
The Ewl_Statusbar
Function Documentation
void ewl_statusbar_active_set | ( | Ewl_Statusbar * | sb, | |
Ewl_Position | pos | |||
) |
Sets the active statusbar container.
- Parameters:
-
sb,: The status bar to work on pos,: The side of the statusbar to set active either EWL_POSITION_LEFT or EWL_POSITION_RIGHT
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_redirect_set(), EWL_POSITION_LEFT, EWL_POSITION_TOP, EWL_STATUSBAR_TYPE, left, and right.
void ewl_statusbar_cb_destroy | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_STATUSBAR, EWL_STATUSBAR_TYPE, IF_FREE_LIST, and stack.
Referenced by ewl_statusbar_init().
int ewl_statusbar_init | ( | Ewl_Statusbar * | sb | ) |
Initialize a statusbar to default values.
- Parameters:
-
sb,: the statusbar to initialize
- Returns:
- Returns 1 on success and 0 on failure
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BOX, ewl_box_init(), ewl_box_orientation_set(), ewl_callback_append(), EWL_CALLBACK_DESTROY, EWL_CONTAINER, ewl_container_child_append(), ewl_container_redirect_set(), EWL_FLAG_ALIGN_LEFT, EWL_FLAG_ALIGN_RIGHT, EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_SHRINK, EWL_FLAG_FILL_VSHRINK, ewl_hbox_new(), EWL_OBJECT, ewl_object_alignment_set(), ewl_object_fill_policy_set(), EWL_ORIENTATION_HORIZONTAL, ewl_statusbar_cb_destroy(), EWL_STATUSBAR_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), ewl_widget_internal_set(), ewl_widget_show(), left, right, stack, and status.
Referenced by ewl_statusbar_new().
void ewl_statusbar_left_append | ( | Ewl_Statusbar * | sb, | |
Ewl_Widget * | w | |||
) |
pack the given widget w into the statusbar sb into right of the left box.
- Parameters:
-
sb,: The statusbar to operate on w,: The widget to add to the container
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_append(), EWL_STATUSBAR_TYPE, EWL_WIDGET_TYPE, and left.
void ewl_statusbar_left_hide | ( | Ewl_Statusbar * | sb | ) |
hide the box on the left of the status bar
- Parameters:
-
sb,: The statusbar to work on
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_remove(), EWL_STATUSBAR_TYPE, ewl_widget_hide(), and left.
void ewl_statusbar_left_prepend | ( | Ewl_Statusbar * | sb, | |
Ewl_Widget * | w | |||
) |
pack the given widget w into the statusbar sb into the left of the left box
- Parameters:
-
sb,: The statusbar to operate on w,: The widget to add to the container
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_prepend(), EWL_STATUSBAR_TYPE, EWL_WIDGET_TYPE, and left.
void ewl_statusbar_left_show | ( | Ewl_Statusbar * | sb | ) |
show the box on the left of the status bar
- Parameters:
-
sb,: The statusbar to work on
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_prepend(), EWL_STATUSBAR_TYPE, ewl_widget_show(), and left.
Ewl_Widget* ewl_statusbar_new | ( | void | ) |
Allocate and initialize a new statusbar widget.
- Returns:
- Returns NULL on failure, or a pointer to a new statusbar on success.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_statusbar_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
void ewl_statusbar_pop | ( | Ewl_Statusbar * | sb | ) |
Removes the most recent status message and displays the one before it.
- Parameters:
-
sb,: the status bar to remove the status mesasge from
- Returns:
- Returns no value
References current, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_STATUSBAR_TYPE, ewl_widget_destroy(), ewl_widget_show(), and stack.
void ewl_statusbar_push | ( | Ewl_Statusbar * | sb, | |
char * | txt | |||
) |
Displays the given status message on the statusbar.
- Parameters:
-
sb,: the statusbar to add the message too txt,: the status message to display
- Returns:
- Returns no value
References current, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_append(), EWL_LABEL, ewl_label_new(), ewl_label_text_set(), EWL_STATUSBAR_TYPE, ewl_widget_hide(), ewl_widget_show(), stack, and status.
void ewl_statusbar_right_append | ( | Ewl_Statusbar * | sb, | |
Ewl_Widget * | w | |||
) |
pack the given widget w into the statusbar sb into the right of the right box
- Parameters:
-
sb,: The statusbar to operate on w,: The widget to add to the container
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_append(), EWL_STATUSBAR_TYPE, EWL_WIDGET_TYPE, and right.
void ewl_statusbar_right_hide | ( | Ewl_Statusbar * | sb | ) |
hide the box on the right of the status bar
- Parameters:
-
sb,: The statusbar to work on
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_remove(), EWL_STATUSBAR_TYPE, ewl_widget_hide(), and right.
void ewl_statusbar_right_prepend | ( | Ewl_Statusbar * | sb, | |
Ewl_Widget * | w | |||
) |
pack the given widget w into the statusbar sb into the left of the right box
- Parameters:
-
sb,: The statusbar to operate on w,: The widget to add to the container
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_prepend(), EWL_STATUSBAR_TYPE, EWL_WIDGET_TYPE, and right.
void ewl_statusbar_right_show | ( | Ewl_Statusbar * | sb | ) |
show the box on the right of the status bar
- Parameters:
-
sb,: The statusbar to work on
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_append(), EWL_STATUSBAR_TYPE, ewl_widget_show(), and right.