Ewl_Popup: A override window for the convenience use
Detailed Description
Defines the Ewl_Popup class used for override window that need to be placed with some kind of smartness
- Remarks:
- Inherits from Ewl_Window.
Data Structures | |
| struct | Ewl_Popup |
| Inherits from Ewl_Window and extends to provide a popup widget. More... | |
Defines | |
| #define | EWL_POPUP(popup) ((Ewl_Popup *) popup) |
| #define | EWL_POPUP_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_POPUP_TYPE)) |
| #define | EWL_POPUP_TYPE "popup" |
Typedefs | |
| typedef struct Ewl_Popup | Ewl_Popup |
Functions | |
| void | ewl_popup_cb_child_resize (Ewl_Container *c, Ewl_Widget *w, int size, Ewl_Orientation o) |
| void | ewl_popup_cb_child_show (Ewl_Container *c, Ewl_Widget *w) |
| void | ewl_popup_cb_destroy (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_popup_cb_follow_configure (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_popup_cb_follow_destroy (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_popup_cb_mouse_move (Ewl_Widget *w, void *ev_data, void *user_data) |
| void | ewl_popup_cb_show (Ewl_Widget *w, void *ev_data, void *user_data) |
| int | ewl_popup_fit_to_follow_get (Ewl_Popup *p) |
| void | ewl_popup_fit_to_follow_set (Ewl_Popup *p, int fit) |
| Ewl_Widget * | ewl_popup_follow_get (Ewl_Popup *p) |
| void | ewl_popup_follow_set (Ewl_Popup *p, Ewl_Widget *w) |
| Set the follow widget of the popup. | |
| int | ewl_popup_init (Ewl_Popup *p) |
| Initialize the popup and inherited fields. | |
| void | ewl_popup_mouse_position_set (Ewl_Popup *p, int x, int y) |
| This is to set the mouse coordinates to the popup, where it get placed relative to. | |
| Ewl_Widget * | ewl_popup_new (void) |
| Allocate a new popup widget. | |
| void | ewl_popup_offset_set (Ewl_Popup *p, int x, int y) |
| This is to set the offset to where the popup will be placed. | |
| Ewl_Popup_Type | ewl_popup_type_get (Ewl_Popup *p) |
| This is to get the type of the popup. The type defines how the popup will handle the positioning. | |
| void | ewl_popup_type_set (Ewl_Popup *p, Ewl_Popup_Type type) |
| This is to set the type of the popup. The type defines how the popup will handle the positioning. | |
Define Documentation
| #define EWL_POPUP | ( | popup | ) | ((Ewl_Popup *) popup) |
Typecast a pointer to an Ewl_Popup pointer.
Referenced by ewl_combo_init(), ewl_context_menu_attach(), ewl_context_menu_cb_attach_mouse_down(), ewl_context_menu_cb_child_clicked(), ewl_context_menu_cb_mouse_down(), ewl_context_menu_cb_mouse_move(), ewl_context_menu_init(), ewl_datepicker_init(), ewl_menu_cb_configure(), ewl_menu_init(), ewl_popup_cb_child_resize(), ewl_popup_cb_child_show(), ewl_popup_cb_destroy(), ewl_popup_cb_follow_configure(), ewl_popup_cb_follow_destroy(), ewl_popup_cb_mouse_move(), and ewl_popup_cb_show().
| #define EWL_POPUP_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_POPUP_TYPE)) |
Returns TRUE if the widget is an Ewl_Popup, FALSE otherwise
Referenced by ewl_context_menu_cb_child_clicked(), ewl_context_menu_cb_mouse_down(), and ewl_context_menu_cb_mouse_move().
| #define EWL_POPUP_TYPE "popup" |
The type name for the Ewl_Popup widget
Referenced by ewl_combo_init(), ewl_combo_submenu_new(), ewl_context_menu_cb_attach_mouse_down(), ewl_datepicker_init(), ewl_popup_cb_child_resize(), ewl_popup_cb_destroy(), ewl_popup_cb_follow_configure(), ewl_popup_cb_follow_destroy(), ewl_popup_cb_mouse_move(), ewl_popup_cb_show(), ewl_popup_fit_to_follow_get(), ewl_popup_fit_to_follow_set(), ewl_popup_follow_get(), ewl_popup_follow_set(), ewl_popup_init(), ewl_popup_mouse_position_set(), ewl_popup_offset_set(), ewl_popup_type_get(), and ewl_popup_type_set().
Typedef Documentation
Provides an Ewl_Widget to simply act with override windows
Function Documentation
| void ewl_popup_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, ewl_cell_cb_child_resize(), EWL_POPUP, and EWL_POPUP_TYPE.
Referenced by ewl_popup_init().
| void ewl_popup_cb_child_show | ( | Ewl_Container * | c, | |
| Ewl_Widget * | w | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_cell_cb_child_show(), EWL_CONTAINER_TYPE, and EWL_POPUP.
Referenced by ewl_popup_init().
| void ewl_popup_cb_destroy | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_popup_cb_follow_configure | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_popup_cb_follow_destroy | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_popup_cb_mouse_move | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| void ewl_popup_cb_show | ( | Ewl_Widget * | w, | |
| void * | ev_data, | |||
| void * | user_data | |||
| ) |
| int ewl_popup_fit_to_follow_get | ( | Ewl_Popup * | p | ) |
- Parameters:
-
p,: The popup
- Returns:
- Returns if the popup is set to fit the size of the follow
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_POPUP_TYPE, EWL_POPUP_TYPE_NONE, and fit_to_follow.
| void ewl_popup_fit_to_follow_set | ( | Ewl_Popup * | p, | |
| int | fit | |||
| ) |
- Parameters:
-
p,: The popup fit,: TRUE or FALSE
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_POPUP_TYPE, and fit_to_follow.
Referenced by ewl_combo_init(), and ewl_datepicker_init().
| Ewl_Widget* ewl_popup_follow_get | ( | Ewl_Popup * | p | ) |
- Parameters:
-
p,: The popup to get the follow from
- Returns:
- Returns the follow of the popup
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_POPUP_TYPE, and follow.
Referenced by ewl_context_menu_attach(), ewl_context_menu_cb_child_clicked(), ewl_context_menu_cb_mouse_down(), and ewl_context_menu_cb_mouse_move().
| void ewl_popup_follow_set | ( | Ewl_Popup * | p, | |
| Ewl_Widget * | w | |||
| ) |
Set the follow widget of the popup.
- Parameters:
-
p,: The popup to set the follow widget w,: The widget to follow
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, ewl_callback_append(), EWL_CALLBACK_CONFIGURE, ewl_callback_del_with_data(), EWL_CALLBACK_DESTROY, ewl_callback_prepend(), ewl_popup_cb_follow_configure(), ewl_popup_cb_follow_destroy(), EWL_POPUP_TYPE, and follow.
Referenced by ewl_combo_init(), ewl_context_menu_attach(), ewl_datepicker_init(), and ewl_menu_init().
| int ewl_popup_init | ( | Ewl_Popup * | p | ) |
Initialize the popup and inherited fields.
- Parameters:
-
p,: the popup to initialize
- Returns:
- Returns TRUE on success, FALSE on failure. Clears the contents of the popup and stores the default values.
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_callback_append(), EWL_CALLBACK_CONFIGURE, EWL_CALLBACK_DESTROY, EWL_CALLBACK_MOUSE_MOVE, ewl_callback_prepend(), EWL_CALLBACK_SHOW, EWL_CONTAINER, ewl_container_resize_notify_set(), ewl_container_show_notify_set(), EWL_FLAG_FILL_NONE, EWL_OBJECT, ewl_object_fill_policy_set(), ewl_popup_cb_child_resize(), ewl_popup_cb_child_show(), ewl_popup_cb_destroy(), ewl_popup_cb_mouse_move(), ewl_popup_cb_show(), EWL_POPUP_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), EWL_WINDOW, ewl_window_init(), and ewl_window_override_set().
Referenced by ewl_context_menu_init(), and ewl_popup_new().
| void ewl_popup_mouse_position_set | ( | Ewl_Popup * | p, | |
| int | x, | |||
| int | y | |||
| ) |
This is to set the mouse coordinates to the popup, where it get placed relative to.
- Parameters:
-
p,: The popup to set the mouse position for x,: the x coordinate y,: the y coordinate
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_POPUP_TYPE, mouse, x, and y.
Referenced by ewl_context_menu_cb_attach_mouse_down().
| Ewl_Widget* ewl_popup_new | ( | void | ) |
Allocate a new popup widget.
- Returns:
- Returns pointer to new popup widget on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_popup_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
Referenced by ewl_datepicker_init().
| void ewl_popup_offset_set | ( | Ewl_Popup * | p, | |
| int | x, | |||
| int | y | |||
| ) |
This is to set the offset to where the popup will be placed.
- Parameters:
-
p,: The popup to set the offset for x,: the x offset y,: the y offset
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_POPUP_TYPE, offset, x, and y.
Referenced by ewl_context_menu_init().
| Ewl_Popup_Type ewl_popup_type_get | ( | Ewl_Popup * | p | ) |
This is to get the type of the popup. The type defines how the popup will handle the positioning.
- Parameters:
-
p,: The popup to get the type from
- Returns:
- Returns the type of the popup
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_POPUP_TYPE, EWL_POPUP_TYPE_NONE, and type.
| void ewl_popup_type_set | ( | Ewl_Popup * | p, | |
| Ewl_Popup_Type | type | |||
| ) |
This is to set the type of the popup. The type defines how the popup will handle the positioning.
- Parameters:
-
p,: The popup to set the type for type,: the new type of the popup
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_POPUP_TYPE, and type.
Referenced by ewl_combo_init(), ewl_context_menu_init(), ewl_datepicker_init(), ewl_menu_cb_configure(), and ewl_menu_init().