Download

Support

Ewl_Container: Widgets Holding Other Widgets


Detailed Description

Define the Ewl_Container class which inherits from Ewl_Widget and adds the ability to nest Ewl_Widget's inside.

Remarks:
Inherits from Ewl_Widget.

Tutorial


Data Structures

struct  Ewl_Container
 Inherits from the Ewl_Widget and expands to allow for placing child widgets within the available space. Also adds notifiers for various child events. More...

Defines

#define EWL_CONTAINER(widget)   ((Ewl_Container *) widget)
 Typecast a poiner to an Ewl_Container pointer.
#define EWL_CONTAINER_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_CONTAINER_TYPE))
#define EWL_CONTAINER_TYPE   "container"

Typedefs

typedef void(* Ewl_Child_Add )(Ewl_Container *c, Ewl_Widget *w)
typedef void(* Ewl_Child_Hide )(Ewl_Container *c, Ewl_Widget *w)
typedef void(* Ewl_Child_Remove )(Ewl_Container *c, Ewl_Widget *w, int idx)
typedef void(* Ewl_Child_Resize )(Ewl_Container *c, Ewl_Widget *w, int size, Ewl_Orientation o)
typedef void(* Ewl_Child_Show )(Ewl_Container *c, Ewl_Widget *w)
typedef struct Ewl_Container Ewl_Container
typedef Ewl_Widget *(* Ewl_Container_Iterator )(Ewl_Container *c)

Functions

void ewl_container_add_notify_set (Ewl_Container *container, Ewl_Child_Add add)
 Set the function to be called when adding children.
void ewl_container_callback_intercept (Ewl_Container *c, unsigned int t)
 Receive a callback in place of children.
void ewl_container_callback_nointercept (Ewl_Container *c, unsigned int t)
 Remove a callback interception from children.
void ewl_container_callback_nonotify (Ewl_Container *c, unsigned int t)
 receive a callback of a child
void ewl_container_callback_notify (Ewl_Container *c, unsigned int t)
 receive a callback of a child
void ewl_container_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_container_focus_out (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_disable (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_enable (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_obscure (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_realize (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_reparent (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_reveal (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_unrealize (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_widget_focus_in (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_cb_widget_focus_out (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_container_child_add_call (Ewl_Container *c, Ewl_Widget *w)
 Triggers the child_add callback for the container c.
void ewl_container_child_append (Ewl_Container *parent, Ewl_Widget *child)
 Add a child at the end of the container.
Ewl_Widgetewl_container_child_at_get (Ewl_Container *widget, int x, int y)
 Find the child at the given coordinates.
Ewl_Widgetewl_container_child_at_recursive_get (Ewl_Container *widget, int x, int y)
 Find child that intersects coordinates.
int ewl_container_child_count_get (Ewl_Container *c)
 Returns the number of child widgets in the container.
int ewl_container_child_count_internal_get (Ewl_Container *c)
 Returns the number of child widgets in the container.
int ewl_container_child_count_visible_get (Ewl_Container *c)
 Returns the number of visible child widgets in the container.
Ewl_Widgetewl_container_child_get (Ewl_Container *parent, int index)
 Retrieve the child at the given index in the container.
void ewl_container_child_hide_call (Ewl_Container *c, Ewl_Widget *w)
 Triggers the child_hide callback for the container c.
int ewl_container_child_index_get (Ewl_Container *parent, Ewl_Widget *child)
 Retrieves the index of the given child in the container or -1 if not found.
int ewl_container_child_index_internal_get (Ewl_Container *parent, Ewl_Widget *child)
 Retrieves the index of the given child in the container taking internal widgets into account or -1 if not found.
void ewl_container_child_insert (Ewl_Container *parent, Ewl_Widget *child, int index)
 Add a child at an index of the container.
void ewl_container_child_insert_internal (Ewl_Container *parent, Ewl_Widget *child, int index)
 Add a child at an index of the container.
Ewl_Widgetewl_container_child_internal_get (Ewl_Container *parent, int index)
 Retrieves the child at the given index in the container taking internal widgets into account.
void ewl_container_child_iterate_begin (Ewl_Container *c)
 Prepare the container to iterate over it's children.
void ewl_container_child_iterator_set (Ewl_Container *c, Ewl_Container_Iterator i)
 Changes the iterator function for a container.
Ewl_Widgetewl_container_child_next (Ewl_Container *c)
 Retrieve the next elligible child in a container.
void ewl_container_child_prepend (Ewl_Container *parent, Ewl_Widget *child)
 Add a child at the beginning of the container.
void ewl_container_child_remove (Ewl_Container *parent, Ewl_Widget *child)
 Remove the specified child from the container.
void ewl_container_child_remove_call (Ewl_Container *c, Ewl_Widget *w, int idx)
 Triggers the child_remove callback for the container c.
void ewl_container_child_resize (Ewl_Widget *w, int size, Ewl_Orientation o)
 Notify a container of a child pref size change.
void ewl_container_child_show_call (Ewl_Container *c, Ewl_Widget *w)
 Triggers the child_show callback for the container c.
void ewl_container_children_show (Ewl_Container *c)
 A convenience function to recursively show the children of a container.
void ewl_container_destroy (Ewl_Container *c)
 Destroy all the sub-children of the container.
Ewl_Containerewl_container_end_redirect_get (Ewl_Container *c)
 Searches for the last redirected container of the container.
void ewl_container_hide_notify_set (Ewl_Container *container, Ewl_Child_Hide show)
 Set the function to be called when hideing children.
int ewl_container_init (Ewl_Container *container)
 Initialize a containers default fields and callbacks.
void ewl_container_largest_prefer (Ewl_Container *c, Ewl_Orientation o)
 Set preferred size to widest child.
Ewl_Containerewl_container_redirect_get (Ewl_Container *c)
 Retrieves for the redirected container of the container.
void ewl_container_redirect_set (Ewl_Container *c, Ewl_Container *rc)
 Changes the redirected container of the container.
void ewl_container_remove_notify_set (Ewl_Container *container, Ewl_Child_Remove remove)
 Set the function to be called when removing children.
void ewl_container_reset (Ewl_Container *c)
 Destroy all children of the container.
void ewl_container_resize_notify_set (Ewl_Container *container, Ewl_Child_Resize resize)
 Set function to be called when children resize.
void ewl_container_show_notify_set (Ewl_Container *container, Ewl_Child_Show show)
 Set the function to be called when showing children.
void ewl_container_sum_prefer (Ewl_Container *c, Ewl_Orientation o)
 Set the sum orientation of the container.

Define Documentation

#define EWL_CONTAINER ( widget   )     ((Ewl_Container *) widget)

Typecast a poiner to an Ewl_Container pointer.

Referenced by ewl_border_init(), ewl_border_label_position_set(), ewl_box_cb_configure(), ewl_box_cb_configure_homogeneous(), ewl_box_homogeneous_set(), ewl_box_init(), ewl_box_orientation_set(), ewl_box_spacing_set(), ewl_button_image_set(), ewl_button_init(), ewl_button_label_set(), ewl_calendar_init(), ewl_cell_cb_configure(), ewl_cell_init(), ewl_checkbutton_init(), ewl_checkbutton_label_position_set(), ewl_colordialog_init(), ewl_colorpicker_init(), ewl_combo_cb_decrement_clicked(), ewl_combo_cell_cb_clicked(), ewl_combo_init(), ewl_combo_scrollable_set(), ewl_combo_submenu_new(), ewl_container_cb_configure(), ewl_container_cb_disable(), ewl_container_cb_enable(), ewl_container_cb_obscure(), ewl_container_cb_realize(), ewl_container_cb_reparent(), ewl_container_cb_reveal(), ewl_container_cb_unrealize(), ewl_container_cb_widget_focus_in(), ewl_container_cb_widget_focus_out(), ewl_container_child_append(), ewl_container_child_at_get(), ewl_container_child_at_recursive_get(), ewl_container_child_prepend(), ewl_container_child_resize(), ewl_container_children_show(), ewl_context_menu_container_set(), ewl_datepicker_init(), ewl_destroy_request(), ewl_dialog_action_position_set(), ewl_dialog_active_area_set(), ewl_dialog_has_separator_set(), ewl_dialog_init(), ewl_embed_dnd_drop_feed(), ewl_embed_dnd_position_feed(), ewl_embed_init(), ewl_embed_mouse_down_feed(), ewl_embed_mouse_move_feed(), ewl_entry_init(), ewl_filedialog_init(), ewl_filelist_multi_select_preview_get(), ewl_filelist_selected_file_preview_get(), ewl_filepicker_init(), ewl_freebox_init(), ewl_grid_cb_configure(), ewl_grid_child_position_get(), ewl_grid_init(), ewl_icon_alt_text_set(), ewl_icon_extended_data_set(), ewl_icon_image_set(), ewl_list_cb_configure(), ewl_list_cb_item_clicked(), ewl_list_cb_selected_change(), ewl_menu_cb_mouse_move(), ewl_menu_from_info(), ewl_menu_init(), ewl_menubar_from_info(), ewl_menubar_init(), ewl_notebook_cb_child_remove(), ewl_notebook_init(), ewl_notebook_page_tab_widget_get(), ewl_notebook_page_tab_widget_set(), ewl_notebook_tabbar_position_set(), ewl_overlay_cb_child_resize(), ewl_overlay_cb_configure(), ewl_overlay_init(), ewl_paned_arrange(), ewl_paned_cb_configure(), ewl_paned_init(), ewl_paned_orientation_set(), ewl_popup_init(), ewl_progressbar_init(), ewl_range_init(), ewl_row_cb_configure(), ewl_row_column_get(), ewl_row_init(), ewl_scrollbar_init(), ewl_scrollbar_orientation_set(), ewl_scrollpane_cb_configure(), ewl_scrollpane_init(), ewl_seeker_init(), ewl_spectrum_init(), ewl_spinner_init(), ewl_statusbar_active_set(), ewl_statusbar_init(), ewl_statusbar_left_append(), ewl_statusbar_left_hide(), ewl_statusbar_left_prepend(), ewl_statusbar_left_show(), ewl_statusbar_push(), ewl_statusbar_right_append(), ewl_statusbar_right_hide(), ewl_statusbar_right_prepend(), ewl_statusbar_right_show(), ewl_table_add(), ewl_table_col_row_get(), ewl_table_find(), ewl_table_init(), ewl_table_reset(), ewl_table_selected_get(), ewl_text_cb_reveal(), ewl_text_init(), ewl_toolbar_icon_part_hide(), ewl_toolbar_init(), ewl_tree_cb_node_configure(), ewl_tree_column_count_set(), ewl_tree_column_fixed_size_get(), ewl_tree_column_fixed_size_set(), ewl_tree_column_initial_size_get(), ewl_tree_column_initial_size_set(), ewl_tree_content_view_set(), ewl_tree_init(), ewl_tree_kinetic_scrollpane_get(), ewl_tree_node_collapse(), ewl_tree_node_expand(), ewl_tree_node_expandable_set(), ewl_tree_node_init(), ewl_tree_view_freebox_init(), ewl_tree_view_scrolled_init(), ewl_tree_view_scrolled_scroll_headers_set(), ewl_widget_cb_hide(), ewl_widget_cb_obscure(), ewl_widget_cb_reparent(), ewl_widget_cb_reveal(), ewl_widget_cb_show(), and ewl_widget_parent_set().

#define EWL_CONTAINER_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_CONTAINER_TYPE))

Returns TRUE if the widget is an Ewl_Container, FALSE otherwise

Referenced by ewl_container_children_show().

#define EWL_CONTAINER_TYPE   "container"

The type name for the Ewl_Container widget

Referenced by ewl_box_cb_child_homogeneous_show(), ewl_combo_popup_container_set(), ewl_container_add_notify_set(), ewl_container_callback_intercept(), ewl_container_callback_nointercept(), ewl_container_callback_nonotify(), ewl_container_callback_notify(), ewl_container_cb_configure(), ewl_container_cb_disable(), ewl_container_cb_enable(), ewl_container_cb_obscure(), ewl_container_cb_realize(), ewl_container_cb_reparent(), ewl_container_cb_reveal(), ewl_container_cb_unrealize(), ewl_container_child_add_call(), ewl_container_child_append(), ewl_container_child_at_get(), ewl_container_child_at_recursive_get(), ewl_container_child_count_get(), ewl_container_child_count_internal_get(), ewl_container_child_count_visible_get(), ewl_container_child_get(), ewl_container_child_hide_call(), ewl_container_child_index_get(), ewl_container_child_index_internal_get(), ewl_container_child_insert(), ewl_container_child_insert_internal(), ewl_container_child_internal_get(), ewl_container_child_iterate_begin(), ewl_container_child_iterator_set(), ewl_container_child_next(), ewl_container_child_prepend(), ewl_container_child_remove(), ewl_container_child_remove_call(), ewl_container_child_show_call(), ewl_container_children_show(), ewl_container_destroy(), ewl_container_end_redirect_get(), ewl_container_hide_notify_set(), ewl_container_init(), ewl_container_largest_prefer(), ewl_container_redirect_get(), ewl_container_redirect_set(), ewl_container_remove_notify_set(), ewl_container_reset(), ewl_container_resize_notify_set(), ewl_container_show_notify_set(), ewl_container_sum_prefer(), ewl_context_menu_cb_child_add(), ewl_context_menu_cb_child_remove(), ewl_context_menu_container_set(), ewl_menubar_cb_child_add(), ewl_notebook_cb_child_add(), ewl_notebook_cb_child_hide(), ewl_notebook_cb_child_remove(), ewl_notebook_cb_child_show(), ewl_popup_cb_child_show(), ewl_row_cb_child_hide(), ewl_row_cb_child_resize(), ewl_row_cb_child_show(), ewl_table_cb_child_show(), ewl_toolbar_cb_child_add(), ewl_tree_cb_node_child_del(), and ewl_tree_cb_node_resize().


Typedef Documentation

typedef void(* Ewl_Child_Add)(Ewl_Container *c, Ewl_Widget *w)

A typedef to shorten the definition of the child_add callbacks. This callback is container specific and is triggered when an Ewl_Widget is added to the Ewl_Container.

typedef void(* Ewl_Child_Hide)(Ewl_Container *c, Ewl_Widget *w)

A typedef to shorten the definition of the child_hide callbacks. This callback is container specific and is triggered when an Ewl_Widget is hidden from the Ewl_Container.

typedef void(* Ewl_Child_Remove)(Ewl_Container *c, Ewl_Widget *w, int idx)

A typedef to shorten the definition of the child_remove callbacks. This callback is container specific and is triggered when an Ewl_Widget is removed from the Ewl_Container.

typedef void(* Ewl_Child_Resize)(Ewl_Container *c, Ewl_Widget *w, int size, Ewl_Orientation o)

A typedef to shorten the definition of the child_resize callbacks. This callback is container specific and is triggered when an Ewl_Widget is resized in the Ewl_Container.

typedef void(* Ewl_Child_Show)(Ewl_Container *c, Ewl_Widget *w)

A typedef to shorten the definition of the child_show callbacks. This callback is container specific and is triggered when an Ewl_Widget is shown to the Ewl_Container.

typedef struct Ewl_Container Ewl_Container

This class inherits from Ewl_Widget and provides the capabilities necessary for nesting other widgets inside.

A typedef to shorten the definition of the child iterator callbacks. This callback is container specific and is usually set in the container's init function. This is used to pick the next child in the list of children for the container.


Function Documentation

void ewl_container_add_notify_set ( Ewl_Container container,
Ewl_Child_Add  add 
)

Set the function to be called when adding children.

Parameters:
container,: the container to change the add notifier
add,: the new add notifier for the container
Returns:
Returns no value. Changes the add notifier function of container to add.

References child_add, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_CONTAINER_TYPE.

Referenced by ewl_context_menu_container_set(), ewl_freebox_init(), ewl_grid_init(), ewl_menubar_init(), ewl_notebook_init(), ewl_paned_init(), ewl_text_init(), ewl_toolbar_init(), and ewl_tree_node_init().

void ewl_container_callback_intercept ( Ewl_Container c,
unsigned int  t 
)

Receive a callback in place of children.

Parameters:
c,: the container to intercept the callback
t,: the type of callback to intercept
Returns:
Returns no value. Marks the callbacks of type t that are directed to children to be triggered on the container c, and not propagated to the receiving child.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CALLBACK_FLAG_INTERCEPT, EWL_CONTAINER_TYPE, and EWL_WIDGET.

Referenced by ewl_entry_init(), and ewl_spectrum_init().

void ewl_container_callback_nointercept ( Ewl_Container c,
unsigned int  t 
)

Remove a callback interception from children.

Parameters:
c,: the container to remove the interception
t,: the type of callback to not intercept
Returns:
Returns no value. Marks the callbacks of type t that are directed to children to be propagated to the receiving child.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CALLBACK_FLAG_NOINTERCEPT, EWL_CONTAINER_TYPE, and EWL_WIDGET.

void ewl_container_callback_nonotify ( Ewl_Container c,
unsigned int  t 
)

receive a callback of a child

Parameters:
c,: the container to not notify the callback
t,: the type of callback to not notify
Returns:
Returns no value. Removes the notification flag set with ewl_container_callback_notify()

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CALLBACK_FLAG_NONOTIFY, EWL_CONTAINER_TYPE, and EWL_WIDGET.

Referenced by ewl_embed_init().

void ewl_container_callback_notify ( Ewl_Container c,
unsigned int  t 
)

receive a callback of a child

Parameters:
c,: the container to notify the callback
t,: the type of callback to notify
Returns:
Returns no value. Marks the callbacks of type t that are directed to children to be triggered on the container c, and propagated to the receiving child.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CALLBACK_FLAG_NOTIFY, EWL_CONTAINER_TYPE, and EWL_WIDGET.

Referenced by ewl_button_init(), ewl_cell_init(), ewl_scrollbar_init(), ewl_scrollpane_init(), and ewl_seeker_init().

void ewl_container_cb_configure ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_container_cb_container_focus_out ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_container_cb_disable ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_container_cb_enable ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_container_cb_reparent ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_container_cb_unrealize ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_container_cb_widget_focus_in ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_container_cb_widget_focus_out ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_container_child_add_call ( Ewl_Container c,
Ewl_Widget w 
)

Triggers the child_add callback for the container c.

Parameters:
c,: the container receiving a new child widget
w,: the child widget added to the container
Returns:
Returns no value.

References child_add, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER_TYPE, EWL_WIDGET_TYPE, and UNMANAGED.

Referenced by ewl_container_child_append(), and ewl_container_child_prepend().

void ewl_container_child_append ( Ewl_Container pc,
Ewl_Widget child 
)

Add a child at the end of the container.

Parameters:
pc,: the parent container that will hold the child
child,: the child to add to the container
Returns:
Returns no value. Attaches the child to the end of the parent containers child list.

References children, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, DWARNING, EWL_CONTAINER, ewl_container_child_add_call(), EWL_CONTAINER_TYPE, EWL_WIDGET, ewl_widget_parent_of(), ewl_widget_parent_set(), EWL_WIDGET_TYPE, Ewl_Widget::parent, and redirect.

Referenced by ewl_border_init(), ewl_border_label_position_set(), ewl_button_init(), ewl_button_label_set(), ewl_calendar_init(), ewl_checkbutton_label_position_set(), ewl_colordialog_init(), ewl_colorpicker_init(), ewl_combo_init(), ewl_context_menu_container_set(), ewl_datepicker_init(), ewl_dialog_action_position_set(), ewl_dialog_init(), ewl_entry_init(), ewl_filedialog_init(), ewl_filelist_multi_select_preview_get(), ewl_filelist_selected_file_preview_get(), ewl_filepicker_init(), ewl_icon_extended_data_set(), ewl_list_cb_configure(), ewl_menu_from_info(), ewl_menubar_from_info(), ewl_menubar_init(), ewl_notebook_init(), ewl_notebook_page_tab_widget_set(), ewl_notebook_tabbar_position_set(), ewl_progressbar_init(), ewl_scrollbar_init(), ewl_scrollbar_orientation_set(), ewl_scrollpane_init(), ewl_seeker_init(), ewl_spectrum_init(), ewl_spinner_init(), ewl_statusbar_init(), ewl_statusbar_left_append(), ewl_statusbar_push(), ewl_statusbar_right_append(), ewl_statusbar_right_show(), ewl_table_add(), ewl_table_init(), ewl_table_reset(), ewl_tree_column_count_set(), ewl_tree_content_view_set(), ewl_tree_init(), ewl_tree_view_freebox_init(), and ewl_tree_view_scrolled_init().

Ewl_Widget* ewl_container_child_at_get ( Ewl_Container widget,
int  x,
int  y 
)

Find the child at the given coordinates.

Parameters:
widget,: the searched container
x,: the x coordinate to search for
y,: the y coordinate to search for
Returns:
Returns the found widget on success, NULL on failure. The given container is searched to find any child that intersects the given coordinates.

References children, CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DISABLED, DLEVEL_STABLE, DRETURN_PTR, EWL_CONTAINER, EWL_CONTAINER_TYPE, ewl_widget_layer_priority_get(), INSET_BOTTOM, INSET_LEFT, INSET_RIGHT, INSET_TOP, Ewl_Widget::toplayered, and VISIBLE.

Referenced by ewl_container_child_at_recursive_get().

Ewl_Widget* ewl_container_child_at_recursive_get ( Ewl_Container widget,
int  x,
int  y 
)

Find child that intersects coordinates.

Parameters:
widget,: the widget to search for intersecting child
x,: the x coordinate of the intersection point
y,: the y coordinate of the intersection point
Returns:
Returns the intersecting widget on success, NULL on failure.

References children, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DISABLED, DLEVEL_STABLE, DRETURN_PTR, EWL_CONTAINER, ewl_container_child_at_get(), EWL_CONTAINER_TYPE, EWL_WIDGET, and RECURSIVE.

Referenced by ewl_embed_dnd_drop_feed(), ewl_embed_dnd_position_feed(), ewl_embed_mouse_down_feed(), and ewl_embed_mouse_move_feed().

int ewl_container_child_count_get ( Ewl_Container c  ) 

Returns the number of child widgets in the container.

Parameters:
c,: The container to get the child count from
Returns:
Returns the number of child widgets

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and EWL_CONTAINER_TYPE.

Referenced by ewl_notebook_cb_child_remove().

int ewl_container_child_count_internal_get ( Ewl_Container c  ) 

Returns the number of child widgets in the container.

Parameters:
c,: The container to get the child count from
Returns:
Returns the number of child widgets

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, and EWL_CONTAINER_TYPE.

int ewl_container_child_count_visible_get ( Ewl_Container c  ) 

Returns the number of visible child widgets in the container.

Parameters:
c,: The container to get the child count from
Returns:
Returns the number of visible child widgets This function return the number of visible child widgets in this container, no matter if the container is set to redirect or not. Note: other than ewl_container_count_get() and ewl_container_count_internal_get() it does not return the number of children in the redirection end container.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_CONTAINER_TYPE, and visible_children.

Referenced by ewl_box_cb_child_hide(), ewl_box_cb_child_homogeneous_show(), ewl_box_cb_child_show(), ewl_box_cb_configure(), ewl_box_cb_configure_homogeneous(), ewl_box_homogeneous_set(), ewl_box_spacing_set(), and ewl_paned_cb_configure().

Ewl_Widget* ewl_container_child_get ( Ewl_Container parent,
int  index 
)

Retrieve the child at the given index in the container.

Parameters:
parent,: The container to get the child from
index,: The child index to return
Returns:
Returns the widget at the given index, or NULL if not found

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, and EWL_CONTAINER_TYPE.

Referenced by ewl_notebook_cb_child_remove(), ewl_notebook_page_tab_widget_get(), ewl_tree_column_fixed_size_get(), ewl_tree_column_fixed_size_set(), ewl_tree_column_initial_size_get(), ewl_tree_column_initial_size_set(), ewl_tree_row_collapse(), and ewl_tree_row_expand().

void ewl_container_child_hide_call ( Ewl_Container c,
Ewl_Widget w 
)

Triggers the child_hide callback for the container c.

Parameters:
c,: the container receiving a new child widget
w,: the child widget hidden in the container
Returns:
Returns no value.

References child_hide, clip_box, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DESTROYED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, DWARNING, EWL_CONTAINER_TYPE, EWL_WIDGET, ewl_widget_configure(), EWL_WIDGET_TYPE, UNMANAGED, and visible_children.

Referenced by ewl_container_child_remove(), and ewl_widget_cb_hide().

int ewl_container_child_index_get ( Ewl_Container parent,
Ewl_Widget w 
)

Retrieves the index of the given child in the container or -1 if not found.

Parameters:
parent,: The container to search
w,: The child to search for
Returns:
Returns the index of the child in the parent or -1 if not found

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_CONTAINER_TYPE, and EWL_WIDGET_TYPE.

Referenced by ewl_combo_cell_cb_clicked(), ewl_list_cb_item_clicked(), ewl_notebook_cb_child_remove(), ewl_notebook_page_tab_widget_set(), and ewl_paned_cb_child_add().

int ewl_container_child_index_internal_get ( Ewl_Container parent,
Ewl_Widget w 
)

Retrieves the index of the given child in the container taking internal widgets into account or -1 if not found.

Parameters:
parent,: The container to search
w,: The child to search for
Returns:
Returns the index of the child in the parent including internal widgets or -1 if not found

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_CONTAINER_TYPE, and EWL_WIDGET_TYPE.

void ewl_container_child_insert ( Ewl_Container pc,
Ewl_Widget child,
int  index 
)

Add a child at an index of the container.

Parameters:
pc,: the parent container that will hold the child
child,: the child to add to the container
index,: the position in the child list to add the child (not including internal widgets
Returns:
Returns no value. Attaches the child to the index position of the parent containers child list.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER_TYPE, and EWL_WIDGET_TYPE.

Referenced by ewl_dialog_has_separator_set(), ewl_notebook_page_tab_widget_set(), and ewl_paned_cb_child_add().

void ewl_container_child_insert_internal ( Ewl_Container pc,
Ewl_Widget child,
int  index 
)

Add a child at an index of the container.

Parameters:
pc,: the parent container that will hold the child
child,: the child to add to the container
index,: the position in the child list to add the cihld
Returns:
Returns no value. Attaches the child to the index position of the parent containers child list.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER_TYPE, and EWL_WIDGET_TYPE.

Ewl_Widget* ewl_container_child_internal_get ( Ewl_Container parent,
int  index 
)

Retrieves the child at the given index in the container taking internal widgets into account.

Parameters:
parent,: The container to get the child from
index,: The child index to return
Returns:
Returns the widget at the given index including internal widgets, or NULL if not found

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, and EWL_CONTAINER_TYPE.

Referenced by ewl_paned_cb_child_remove().

void ewl_container_child_iterate_begin ( Ewl_Container c  ) 

Prepare the container to iterate over it's children.

Parameters:
c,: the container to begin iterating over it's children
Returns:
Returns no value. Notifies the container that it will need to start from the beginning of it's child list. Do not call this if you want to begin iteration where it was last left off, but be warned it's possible this won't be where you expect.

References children, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER_TYPE, and redirect.

Referenced by ewl_container_children_show(), ewl_context_menu_container_set(), ewl_dialog_has_separator_set(), ewl_menu_cb_mouse_move(), ewl_row_cb_configure(), and ewl_toolbar_icon_part_hide().

void ewl_container_child_iterator_set ( Ewl_Container c,
Ewl_Container_Iterator  i 
)

Changes the iterator function for a container.

Parameters:
c,: the container to change child iterator functions
i,: the iterator function for the container
Returns:
Returns no value. Do not use this unless you know are writing a custom container of your own.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER_TYPE, and iterator.

Ewl_Widget* ewl_container_child_next ( Ewl_Container c  ) 

Retrieve the next elligible child in a container.

Parameters:
c,: the container to retrieve the next usable child
Returns:
Returns the next valid child on success, NULL on failure.

References children, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_CONTAINER_TYPE, ewl_widget_internal_is(), iterator, and redirect.

Referenced by ewl_container_children_show(), ewl_context_menu_container_set(), ewl_dialog_has_separator_set(), ewl_menu_cb_mouse_move(), ewl_row_cb_configure(), and ewl_toolbar_icon_part_hide().

void ewl_container_child_remove ( Ewl_Container pc,
Ewl_Widget child 
)

void ewl_container_child_remove_call ( Ewl_Container c,
Ewl_Widget w,
int  idx 
)

Triggers the child_remove callback for the container c.

Parameters:
c,: the container removing a child widget
w,: the child widget removed from the container
idx,: The index that the child was in when it was removed
Returns:
Returns no value.

References child_remove, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DESTROYED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER_TYPE, EWL_WIDGET_TYPE, and UNMANAGED.

Referenced by ewl_container_child_remove().

void ewl_container_child_resize ( Ewl_Widget w,
int  size,
Ewl_Orientation  o 
)

Notify a container of a child pref size change.

Parameters:
w,: the child widget that has had it's preferred size changed
size,: the amount of change in size
o,: the orientation of the size change
Returns:
Returns no value.

References child_resize, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, EWL_FLAG_QUEUED_SCHEDULED_REVEAL, EWL_OBJECT, ewl_object_queued_has, EWL_WIDGET, ewl_widget_configure(), EWL_WIDGET_TYPE, HIDDEN, Ewl_Widget::parent, PREFERRED_H, PREFERRED_W, and REALIZED.

Referenced by ewl_object_insets_set(), ewl_object_minimum_h_set(), ewl_object_minimum_w_set(), ewl_object_padding_set(), ewl_object_preferred_inner_h_set(), and ewl_object_preferred_inner_w_set().

void ewl_container_child_show_call ( Ewl_Container c,
Ewl_Widget w 
)

Triggers the child_show callback for the container c.

Parameters:
c,: the container receiving a new child widget
w,: the child widget shown in the container
Returns:
Returns no value.

References child_show, children, clip_box, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, DWARNING, EWL_CONTAINER_TYPE, EWL_WIDGET, ewl_widget_configure(), EWL_WIDGET_TYPE, UNMANAGED, and visible_children.

Referenced by ewl_widget_cb_show().

void ewl_container_children_show ( Ewl_Container c  ) 

A convenience function to recursively show the children of a container.

Parameters:
c,: The container to work with
Returns:
Returns no value

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_iterate_begin(), ewl_container_child_next(), ewl_container_children_show(), EWL_CONTAINER_IS, EWL_CONTAINER_TYPE, EWL_WIDGET, and ewl_widget_show().

Referenced by ewl_container_children_show().

void ewl_container_destroy ( Ewl_Container c  ) 

Destroy all the sub-children of the container.

Parameters:
c,: the container to destroy children
Returns:
Returns no value.

References children, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER_TYPE, ewl_widget_destroy(), and redirect.

Referenced by ewl_destroy_request().

Ewl_Container* ewl_container_end_redirect_get ( Ewl_Container c  ) 

Searches for the last redirected container of the container.

Parameters:
c,: the container to retrieve it's redirection end container
Returns:
Returns the container children are placed in, NULL if none.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_CONTAINER_TYPE, and redirect.

Referenced by ewl_context_menu_container_set().

void ewl_container_hide_notify_set ( Ewl_Container container,
Ewl_Child_Hide  hide 
)

Set the function to be called when hideing children.

Parameters:
container,: the container to change the hide notifier
hide,: the new show notifier for the container
Returns:
Returns no value. Changes the hide notifier function of container to hide.

References child_hide, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_CONTAINER_TYPE.

Referenced by ewl_box_homogeneous_set(), ewl_box_init(), ewl_grid_init(), ewl_notebook_init(), ewl_paned_init(), ewl_row_init(), and ewl_tree_node_init().

void ewl_container_largest_prefer ( Ewl_Container c,
Ewl_Orientation  o 
)

Ewl_Container* ewl_container_redirect_get ( Ewl_Container c  ) 

Retrieves for the redirected container of the container.

Parameters:
c,: the container to retrieve it's redirection container
Returns:
Returns the container children are placed in, NULL if none.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_CONTAINER_TYPE, and redirect.

Referenced by ewl_button_image_set(), ewl_button_label_set(), and ewl_tree_kinetic_scrollpane_get().

void ewl_container_remove_notify_set ( Ewl_Container container,
Ewl_Child_Remove  remove 
)

Set the function to be called when removing children.

Parameters:
container,: the container to change the add notifier
remove,: the new remove notifier for the container
Returns:
Returns no value. Changes the remove notifier function of container to remove.

References child_remove, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_CONTAINER_TYPE.

Referenced by ewl_context_menu_container_set(), ewl_grid_init(), ewl_notebook_init(), ewl_paned_init(), ewl_text_init(), and ewl_tree_node_init().

void ewl_container_reset ( Ewl_Container c  ) 

Destroy all children of the container.

Parameters:
c,: the container to reset
Returns:
Returns no value. Destroys all the children of the container but not the container itself or internally used widgets.

References children, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER_TYPE, EWL_FLAG_PROPERTY_INTERNAL, EWL_FLAGS_PROPERTY_MASK, EWL_OBJECT, ewl_object_flags_has, ewl_widget_destroy(), and redirect.

Referenced by ewl_combo_cb_decrement_clicked(), ewl_list_cb_configure(), ewl_table_reset(), and ewl_tree_column_count_set().

void ewl_container_resize_notify_set ( Ewl_Container container,
Ewl_Child_Resize  resize 
)

Set function to be called when children resize.

Parameters:
container,: the container to change the resize notifier
resize,: the new resizenotifier for the container
Returns:
Returns no value. Changes the resize notifier function of container to resize.

References child_resize, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_CONTAINER_TYPE.

Referenced by ewl_box_homogeneous_set(), ewl_box_init(), ewl_cell_init(), ewl_grid_init(), ewl_overlay_init(), ewl_paned_init(), ewl_popup_init(), ewl_progressbar_init(), ewl_row_init(), ewl_spinner_init(), and ewl_tree_node_init().

void ewl_container_show_notify_set ( Ewl_Container container,
Ewl_Child_Show  show 
)

Set the function to be called when showing children.

Parameters:
container,: the container to change the show notifier
show,: the new show notifier for the container
Returns:
Returns no value. Changes the show notifier function of container to show.

References child_show, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_CONTAINER_TYPE.

Referenced by ewl_box_homogeneous_set(), ewl_box_init(), ewl_cell_init(), ewl_freebox_init(), ewl_grid_init(), ewl_notebook_init(), ewl_overlay_init(), ewl_paned_init(), ewl_popup_init(), ewl_progressbar_init(), ewl_row_init(), ewl_seeker_init(), ewl_spinner_init(), ewl_table_init(), and ewl_tree_node_init().

void ewl_container_sum_prefer ( Ewl_Container c,
Ewl_Orientation  o 
)

Set the sum orientation of the container.

Parameters:
c,: the container to use the child size sum in a specified direction
o,: the orientation direction of the sum to use
Returns:
Returns no value

References children, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER_TYPE, EWL_OBJECT, ewl_object_preferred_h_get(), ewl_object_preferred_inner_h_set(), ewl_object_preferred_inner_w_set(), ewl_object_preferred_w_get(), EWL_ORIENTATION_HORIZONTAL, REALIZED, and VISIBLE.

Referenced by ewl_box_homogeneous_set(), ewl_scrollpane_cb_configure(), and ewl_tree_cb_node_child_show().


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:51:08 2008