Ewl_Toolbar: A toolbar widget
Detailed Description
Defines a widget to contain a toolbar.
- Remarks:
- Inherits from Ewl_Menubar.
Tutorial
Data Structures | |
struct | Ewl_Toolbar |
Inherits from Ewl_Menubar and extends to provide a toolbar layout. More... | |
Defines | |
#define | EWL_TOOLBAR(toolbar) ((Ewl_Toolbar *) toolbar) |
#define | EWL_TOOLBAR_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_TOOLBAR_TYPE)) |
#define | EWL_TOOLBAR_TYPE "toolbar" |
Typedefs | |
typedef struct Ewl_Toolbar | Ewl_Toolbar |
Functions | |
Ewl_Widget * | ewl_htoolbar_new (void) |
Allocate a new toolbar widget with horizontal orientation. | |
void | ewl_toolbar_cb_child_add (Ewl_Container *c, Ewl_Widget *w) |
void | ewl_toolbar_icon_part_hide (Ewl_Toolbar *t, Ewl_Icon_Part part) |
Set the orientation of the toolbar. | |
int | ewl_toolbar_init (Ewl_Toolbar *t) |
Initialize the toolbar and inherited fields. | |
Ewl_Widget * | ewl_toolbar_new (void) |
Allocate a new toolbar widget with default (horizontal) orientation. | |
Ewl_Orientation | ewl_toolbar_orientation_get (Ewl_Toolbar *t) |
This retrieves the current orientation of the toolbar. | |
void | ewl_toolbar_orientation_set (Ewl_Toolbar *t, Ewl_Orientation o) |
Set the orientation of the toolbar. | |
Ewl_Widget * | ewl_vtoolbar_new (void) |
Allocate a new toolbar widget with vertical orientation. |
Define Documentation
#define EWL_TOOLBAR | ( | toolbar | ) | ((Ewl_Toolbar *) toolbar) |
Typecast a pointer to an Ewl_Toolbar pointer.
Referenced by ewl_toolbar_cb_child_add(), and ewl_vtoolbar_new().
#define EWL_TOOLBAR_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_TOOLBAR_TYPE)) |
Returns TRUE if the widget is an Ewl_Toolbar, FALSE otherwise
#define EWL_TOOLBAR_TYPE "toolbar" |
The type name for the Ewl_Toolbar widget
Referenced by ewl_toolbar_icon_part_hide(), ewl_toolbar_init(), ewl_toolbar_orientation_get(), and ewl_toolbar_orientation_set().
Typedef Documentation
typedef struct Ewl_Toolbar Ewl_Toolbar |
Function Documentation
Ewl_Widget* ewl_htoolbar_new | ( | void | ) |
Allocate a new toolbar widget with horizontal orientation.
- Returns:
- Returns pointer to new toolbar widget on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, and ewl_toolbar_new().
Referenced by ewl_filepicker_init().
void ewl_toolbar_cb_child_add | ( | Ewl_Container * | c, | |
Ewl_Widget * | w | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER_TYPE, EWL_ICON, EWL_ICON_IS, ewl_icon_part_hide(), ewl_menubar_cb_child_add(), EWL_TOOLBAR, EWL_WIDGET, EWL_WIDGET_TYPE, and hidden.
Referenced by ewl_toolbar_init().
void ewl_toolbar_icon_part_hide | ( | Ewl_Toolbar * | t, | |
Ewl_Icon_Part | part | |||
) |
Set the orientation of the toolbar.
- Parameters:
-
t,: The toolbar to set the orientation on part,: The Ewl_Icon_Part to hide
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, ewl_container_child_iterate_begin(), ewl_container_child_next(), EWL_ICON, EWL_ICON_IS, ewl_icon_part_hide(), EWL_TOOLBAR_TYPE, and hidden.
int ewl_toolbar_init | ( | Ewl_Toolbar * | t | ) |
Initialize the toolbar and inherited fields.
- Parameters:
-
t,: the toolbar to initialize
- Returns:
- Returns TRUE on success, FALSE on failure. Clears the contents of the toolbar and stores the default values.
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_CONTAINER, ewl_container_add_notify_set(), EWL_FLAG_ALIGN_LEFT, EWL_FLAG_ALIGN_TOP, EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_SHRINK, EWL_ICON_PART_NONE, EWL_MENUBAR, ewl_menubar_init(), EWL_OBJECT, ewl_object_alignment_set(), ewl_object_fill_policy_set(), ewl_toolbar_cb_child_add(), EWL_TOOLBAR_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), and hidden.
Referenced by ewl_toolbar_new().
Ewl_Widget* ewl_toolbar_new | ( | void | ) |
Allocate a new toolbar widget with default (horizontal) orientation.
- Returns:
- Returns pointer to new toolbar widget on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_toolbar_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
Referenced by ewl_htoolbar_new(), and ewl_vtoolbar_new().
Ewl_Orientation ewl_toolbar_orientation_get | ( | Ewl_Toolbar * | t | ) |
This retrieves the current orientation of the toolbar.
- Parameters:
-
t,: The toolbar to get the orientation from
- Returns:
- Returns the orientation currently set on the toolbar
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_MENUBAR, ewl_menubar_orientation_get(), EWL_ORIENTATION_HORIZONTAL, and EWL_TOOLBAR_TYPE.
void ewl_toolbar_orientation_set | ( | Ewl_Toolbar * | t, | |
Ewl_Orientation | o | |||
) |
Set the orientation of the toolbar.
- Parameters:
-
t,: The toolbar to set the orientation on o,: The orientation to set on the toolbar
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_MENUBAR, ewl_menubar_orientation_set(), EWL_ORIENTATION_HORIZONTAL, EWL_TOOLBAR_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), and ewl_widget_configure().
Referenced by ewl_vtoolbar_new().
Ewl_Widget* ewl_vtoolbar_new | ( | void | ) |
Allocate a new toolbar widget with vertical orientation.
- Returns:
- Returns pointer to new toolbar widget on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_ORIENTATION_VERTICAL, EWL_TOOLBAR, ewl_toolbar_new(), and ewl_toolbar_orientation_set().