Ewl_Progressbar: A progressbar from a value
Detailed Description
A progress bar widget
- Remarks:
- Inherits from Ewl_Range.
Tutorial
Data Structures | |
struct | Ewl_Progressbar |
Inherits from Ewl_Range and extends to provide a progressbar widget. More... | |
Defines | |
#define | EWL_PROGRESSBAR(progressbar) ((Ewl_Progressbar *) progressbar) |
#define | EWL_PROGRESSBAR_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_PROGRESSBAR_TYPE)) |
#define | EWL_PROGRESSBAR_TYPE "progressbar" |
Typedefs | |
typedef struct Ewl_Progressbar | Ewl_Progressbar |
Functions | |
void | ewl_progressbar_cb_child_resize (Ewl_Container *c, Ewl_Widget *w, int size, Ewl_Orientation o) |
void | ewl_progressbar_cb_child_show (Ewl_Container *c, Ewl_Widget *w) |
void | ewl_progressbar_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_progressbar_cb_value_changed (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_progressbar_custom_label_set (Ewl_Progressbar *p, char *format_string) |
Sets the given format string on the progressbar (lf of lf beers). | |
int | ewl_progressbar_init (Ewl_Progressbar *p) |
Initialize the progressbar to some sane starting values. | |
void | ewl_progressbar_label_hide (Ewl_Progressbar *p) |
Hides the given progressbars label. | |
void | ewl_progressbar_label_set (Ewl_Progressbar *p, char *label) |
Sets the given text on the progressbar. | |
void | ewl_progressbar_label_show (Ewl_Progressbar *p) |
Shows the given progressbars label. | |
Ewl_Widget * | ewl_progressbar_new (void) |
Allocate and initialize a new progressbar. |
Define Documentation
#define EWL_PROGRESSBAR | ( | progressbar | ) | ((Ewl_Progressbar *) progressbar) |
Typecasts a pointer to an Ewl_Progressbar pointer.
Referenced by ewl_progressbar_cb_configure(), and ewl_progressbar_cb_value_changed().
#define EWL_PROGRESSBAR_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_PROGRESSBAR_TYPE)) |
Returns TRUE if the widget is an Ewl_Progressbar, FALSE otherwise
#define EWL_PROGRESSBAR_TYPE "progressbar" |
- Widget Theme Keys:
- /progressbar/file
- Widget Theme Keys:
- /progressbar/group
- Widget Theme Keys:
- /bar/file
- Widget Theme Keys:
- /bar/group
Referenced by ewl_progressbar_cb_child_resize(), ewl_progressbar_cb_child_show(), ewl_progressbar_cb_configure(), ewl_progressbar_cb_value_changed(), ewl_progressbar_custom_label_set(), ewl_progressbar_init(), ewl_progressbar_label_hide(), ewl_progressbar_label_set(), and ewl_progressbar_label_show().
Typedef Documentation
typedef struct Ewl_Progressbar Ewl_Progressbar |
The Ewl_Progressbar provides a statusbar from a given value
Function Documentation
void ewl_progressbar_cb_child_resize | ( | Ewl_Container * | c, | |
Ewl_Widget * | w, | |||
int | size, | |||
Ewl_Orientation | o | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_PROGRESSBAR_TYPE.
Referenced by ewl_progressbar_init().
void ewl_progressbar_cb_child_show | ( | Ewl_Container * | c, | |
Ewl_Widget * | w | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_PROGRESSBAR_TYPE.
Referenced by ewl_progressbar_init().
void ewl_progressbar_cb_configure | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References bar, CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_OBJECT, ewl_object_geometry_request(), ewl_object_place(), EWL_PROGRESSBAR, EWL_PROGRESSBAR_TYPE, EWL_RANGE, Ewl_Range::invert, label, Ewl_Range::max_val, Ewl_Range::min_val, and Ewl_Range::value.
Referenced by ewl_progressbar_init().
void ewl_progressbar_cb_value_changed | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References auto_label, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_LABEL, ewl_label_text_set(), EWL_PROGRESSBAR, EWL_PROGRESSBAR_TYPE, EWL_RANGE, label, Ewl_Range::max_val, Ewl_Range::min_val, and Ewl_Range::value.
Referenced by ewl_progressbar_init().
void ewl_progressbar_custom_label_set | ( | Ewl_Progressbar * | p, | |
char * | format_string | |||
) |
Sets the given format string on the progressbar (lf of lf beers).
- Parameters:
-
p,: the progressbars whose label will be changed format_string,: format string for the new label
- Returns:
- Returns no value
References auto_label, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_LABEL, ewl_label_text_set(), EWL_PROGRESSBAR_TYPE, EWL_RANGE, label, label, Ewl_Range::max_val, PATH_MAX, and Ewl_Range::value.
int ewl_progressbar_init | ( | Ewl_Progressbar * | p | ) |
Initialize the progressbar to some sane starting values.
- Parameters:
-
p,: the progressbar to be initialized
- Returns:
- Returns TRUE on success, FALSE on failure.
References auto_label, bar, DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_callback_append(), EWL_CALLBACK_CONFIGURE, EWL_CALLBACK_VALUE_CHANGED, EWL_CONTAINER, ewl_container_child_append(), ewl_container_resize_notify_set(), ewl_container_show_notify_set(), EWL_FLAG_ALIGN_CENTER, EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_VSHRINK, EWL_LABEL, ewl_label_new(), ewl_label_text_set(), EWL_OBJECT, ewl_object_alignment_set(), ewl_object_fill_policy_set(), ewl_progressbar_cb_child_resize(), ewl_progressbar_cb_child_show(), ewl_progressbar_cb_configure(), ewl_progressbar_cb_value_changed(), EWL_PROGRESSBAR_TYPE, EWL_RANGE, ewl_range_init(), EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), ewl_widget_init(), ewl_widget_layer_priority_set(), ewl_widget_show(), label, and NEW.
Referenced by ewl_progressbar_new().
void ewl_progressbar_label_hide | ( | Ewl_Progressbar * | p | ) |
Hides the given progressbars label.
- Parameters:
-
p,: the progressbars whose label will be hidden
- Returns:
- Returns no value
References auto_label, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_LABEL, ewl_label_text_set(), EWL_PROGRESSBAR_TYPE, and label.
void ewl_progressbar_label_set | ( | Ewl_Progressbar * | p, | |
char * | label | |||
) |
Sets the given text on the progressbar.
- Parameters:
-
p,: the progressbars whose text will be changed label,: the new label
- Returns:
- Returns no value
References auto_label, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_LABEL, ewl_label_text_set(), EWL_PROGRESSBAR_TYPE, and label.
void ewl_progressbar_label_show | ( | Ewl_Progressbar * | p | ) |
Shows the given progressbars label.
- Parameters:
-
p,: the progressbars whose label will be shown
- Returns:
- Returns no value
References auto_label, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_PROGRESSBAR_TYPE.
Ewl_Widget* ewl_progressbar_new | ( | void | ) |
Allocate and initialize a new progressbar.
- Returns:
- Returns NULL on failure, or a pointer to the new progressbar on success.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_progressbar_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.