Ewl_Floater: A Floating Container
Detailed Description
Defines a widget for layering above other widgets in EWL's drawing area, with the ability to follow the movement of another widget.
- Remarks:
- Inherits from Ewl_Box.
Tutorial
Data Structures | |
struct | Ewl_Floater |
Inherits from Ewl_Box for layout purposes. Provides a means to layer above other widgets and to follow the movement of another widget. More... | |
Defines | |
#define | EWL_FLOATER(floater) ((Ewl_Floater *) floater) |
#define | EWL_FLOATER_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_FLOATER_TYPE)) |
#define | EWL_FLOATER_TYPE "floater" |
Typedefs | |
typedef struct Ewl_Floater | Ewl_Floater |
Functions | |
void | ewl_floater_cb_destroy (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_floater_cb_follow_configure (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_floater_cb_follow_destroy (Ewl_Widget *w, void *ev_data, void *user_data) |
Ewl_Widget * | ewl_floater_follow_get (Ewl_Floater *f) |
Get the widget we are following. | |
void | ewl_floater_follow_set (Ewl_Floater *f, Ewl_Widget *p) |
Set the widget to follow. | |
int | ewl_floater_init (Ewl_Floater *f) |
Initialize a floater to default values. | |
Ewl_Widget * | ewl_floater_new (void) |
Allocate a new floater widget. | |
void | ewl_floater_position_set (Ewl_Floater *parent, int x, int y) |
Set the start x/y position of the floater. |
Define Documentation
#define EWL_FLOATER | ( | floater | ) | ((Ewl_Floater *) floater) |
Typecasts a pointer to an Ewl_Floater pointer.
Referenced by ewl_floater_cb_destroy(), ewl_floater_cb_follow_configure(), ewl_floater_cb_follow_destroy(), and ewl_floater_new().
#define EWL_FLOATER_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_FLOATER_TYPE)) |
Returns TRUE if the widget is an Ewl_Floater, FALSE otherwise
#define EWL_FLOATER_TYPE "floater" |
- Widget Theme Keys:
- /floater/file
- Widget Theme Keys:
- /floater/group
Referenced by ewl_floater_cb_destroy(), ewl_floater_cb_follow_configure(), ewl_floater_cb_follow_destroy(), ewl_floater_follow_get(), ewl_floater_follow_set(), ewl_floater_init(), ewl_floater_position_set(), and ewl_floater_relative_set().
Typedef Documentation
typedef struct Ewl_Floater Ewl_Floater |
The floater is a container for widgets that need to be drawn on top of multiple widgets (ie. dropdownbox)
Function Documentation
void ewl_floater_cb_destroy | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FLOATER, ewl_floater_follow_set(), and EWL_FLOATER_TYPE.
Referenced by ewl_floater_init().
void ewl_floater_cb_follow_configure | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References CURRENT_H, CURRENT_W, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FLAG_ALIGN_BOTTOM, EWL_FLAG_ALIGN_LEFT, EWL_FLAG_ALIGN_RIGHT, EWL_FLAG_ALIGN_TOP, EWL_FLOATER, EWL_FLOATER_TYPE, EWL_OBJECT, ewl_object_alignment_get(), ewl_object_current_x_get(), ewl_object_current_y_get(), ewl_object_position_request(), follows, x, and y.
Referenced by ewl_floater_follow_set(), and ewl_floater_relative_set().
void ewl_floater_cb_follow_destroy | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FLOATER, and EWL_FLOATER_TYPE.
Referenced by ewl_floater_follow_set().
Ewl_Widget* ewl_floater_follow_get | ( | Ewl_Floater * | f | ) |
Get the widget we are following.
- Parameters:
-
f,: The Floater to get the follow from
- Returns:
- Returns the widget the floater is following, or NULL
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_FLOATER_TYPE, and follows.
void ewl_floater_follow_set | ( | Ewl_Floater * | f, | |
Ewl_Widget * | p | |||
) |
Set the widget to follow.
- Parameters:
-
f,: The Ewl_Floater to set the follow into p,: The widget to follow
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_callback_append(), EWL_CALLBACK_CONFIGURE, ewl_callback_del_with_data(), EWL_CALLBACK_DESTROY, ewl_callback_prepend(), ewl_floater_cb_follow_configure(), ewl_floater_cb_follow_destroy(), EWL_FLOATER_TYPE, EWL_WIDGET, ewl_widget_configure(), EWL_WIDGET_TYPE, and follows.
Referenced by ewl_floater_cb_destroy().
int ewl_floater_init | ( | Ewl_Floater * | f | ) |
Initialize a floater to default values.
- Parameters:
-
f,: the floater widget
- Returns:
- Returns no value. Sets the fields and callbacks of the floater f to their defaults.
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BOX, ewl_box_init(), ewl_box_orientation_set(), EWL_CALLBACK_DESTROY, ewl_callback_prepend(), EWL_FLAG_ALIGN_LEFT, EWL_FLAG_ALIGN_TOP, EWL_FLAG_FILL_NORMAL, ewl_floater_cb_destroy(), EWL_FLOATER_TYPE, EWL_OBJECT, ewl_object_alignment_set(), ewl_object_fill_policy_set(), EWL_ORIENTATION_VERTICAL, EWL_WIDGET, ewl_widget_appearance_set(), and ewl_widget_inherit().
Referenced by ewl_floater_new().
Ewl_Widget* ewl_floater_new | ( | void | ) |
Allocate a new floater widget.
- Returns:
- Returns NULL on failure, or the new floater widget on success.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_FLOATER, ewl_floater_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
void ewl_floater_position_set | ( | Ewl_Floater * | f, | |
int | x, | |||
int | y | |||
) |
Set the start x/y position of the floater.
- Parameters:
-
f,: Ewl_Floater * - the floater widget x,: int - start x coordinate from the top y,: int - start y coordinate from the top
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_FLOATER_TYPE, EWL_OBJECT, ewl_object_position_request(), ewl_widget_configure(), follows, x, and y.