lib/ewl_container.c File Reference
#include "ewl_base.h"
#include "ewl_macros.h"
#include "ewl_private.h"
#include "ewl_debug.h"

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 __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_container_cb_container_focus_out (Ewl_Widget *w, void *ev_data, void *user_data __UNUSED__) |
| void | ewl_container_cb_disable (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_container_cb_enable (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_container_cb_obscure (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_container_cb_realize (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_container_cb_reparent (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_container_cb_unrealize (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_container_cb_widget_focus_in (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_container_cb_widget_focus_out (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| 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 *pc, Ewl_Widget *child) |
| Add a child at the end of the container. | |
| Ewl_Widget * | ewl_container_child_at_get (Ewl_Container *widget, int x, int y) |
| Find the child at the given coordinates. | |
| Ewl_Widget * | ewl_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_Widget * | ewl_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 *w) |
| 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 *w) |
| 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 *pc, Ewl_Widget *child, int index) |
| Add a child at an index of the container. | |
| void | ewl_container_child_insert_internal (Ewl_Container *pc, Ewl_Widget *child, int index) |
| Add a child at an index of the container. | |
| 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. | |
| 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_Widget * | ewl_container_child_next (Ewl_Container *c) |
| Retrieve the next elligible child in a container. | |
| void | ewl_container_child_prepend (Ewl_Container *pc, Ewl_Widget *child) |
| Add a child at the beginning of the container. | |
| void | ewl_container_child_remove (Ewl_Container *pc, 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_Container * | ewl_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 hide) |
| Set the function to be called when hideing children. | |
| int | ewl_container_init (Ewl_Container *c) |
| 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_Widget * | ewl_container_new (void) |
| Allocate a new container. | |
| Ewl_Container * | ewl_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. | |
Function Documentation
| void ewl_container_cb_configure | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, and EWL_CONTAINER_TYPE.
Referenced by ewl_container_init().
| void ewl_container_cb_container_focus_out | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_STATE_TRANSIENT, EWL_WIDGET, ewl_widget_parent_of(), and ewl_widget_state_set().
Referenced by ewl_box_init(), and ewl_scrollpane_init().
| void ewl_container_cb_disable | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, EWL_CONTAINER_TYPE, and ewl_widget_disable().
Referenced by ewl_container_init().
| void ewl_container_cb_enable | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, EWL_CONTAINER_TYPE, and ewl_widget_enable().
Referenced by ewl_container_init().
| void ewl_container_cb_obscure | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Container::children, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, EWL_CONTAINER_TYPE, ewl_widget_obscure(), and REALIZED.
Referenced by ewl_container_init().
| void ewl_container_cb_realize | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
| void ewl_container_cb_reparent | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, EWL_CONTAINER_TYPE, and ewl_widget_reparent().
Referenced by ewl_container_init().
| void ewl_container_cb_unrealize | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Container::children, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, EWL_CONTAINER_TYPE, and ewl_widget_unrealize().
Referenced by ewl_container_init().
| void ewl_container_cb_widget_focus_in | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Container::children, DCHECK_PARAM_PTR, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, EWL_STATE_TRANSIENT, ewl_widget_state_set(), and Ewl_Container::redirect.
Referenced by ewl_button_init(), ewl_seeker_init(), and ewl_spinner_init().
| void ewl_container_cb_widget_focus_out | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Container::children, DCHECK_PARAM_PTR, DENTER_FUNCTION, DISABLED, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, EWL_STATE_TRANSIENT, ewl_widget_state_set(), and Ewl_Container::redirect.
Referenced by ewl_button_init(), ewl_seeker_init(), and ewl_spinner_init().