Ewl_Object Struct Reference
[Ewl_Object: Base object. Provides functionality available to all widgets.]
#include <ewl_object.h>
Detailed Description
Provides facilities for sizing, position, alignment and fill policy.The fields of the object, while their explanations are fairly clear, can be visualized with the following diagram:

The CURRENT_W(w) and CURRENT_H(w) are macros that provide easy access to the data fields describing the internal area of the Ewl_Object. While the functions ewl_object_get_current_w(w) and ewl_object_get_current_h(w) are to access the overall size of the area this Ewl_Object resides in. There are corresponding macros and functions for preferred, minimum and maximum sizes as well. There are also functions for setting each of these values.
The affect of the fields when performing layout is as follows:

As illustrated, the fill policy determines how much space an object will use when the request for a specific size is made. When the fill policy contains EWL_FLAG_FILL_HSHRINK, EWL_FLAG_FILL_VSHRINK or both, the Ewl_Object can be resized down to it's minimum size in width, height or both respectively.
The opposite is true for a fill policy containing EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_VFILL or both, The Ewl_Object will now expand to fill the space up to it's maximum size in the respective direction.
Data Fields | |
struct { | |
int h | |
int w | |
int x | |
int y | |
} | current |
unsigned int | flags |
struct { | |
short b | |
short l | |
short r | |
short t | |
} | insets |
struct { | |
int h | |
int w | |
} | maximum |
struct { | |
int h | |
int w | |
} | minimum |
struct { | |
short b | |
short l | |
short r | |
short t | |
} | pad |
struct { | |
int h | |
int w | |
} | preferred |
Field Documentation
short Ewl_Object::b |
Bottom value
Referenced by ewl_object_insets_get(), ewl_object_insets_set(), ewl_object_padding_get(), and ewl_object_padding_set().
struct { ... } Ewl_Object::current |
The current size and position of an object.
Referenced by ewl_object_h_request(), ewl_object_w_request(), ewl_object_x_request(), and ewl_object_y_request().
unsigned int Ewl_Object::flags |
Bitmask indicating fill policy and alignment
Referenced by ewl_object_fill_policy_set(), ewl_object_flags_add(), ewl_object_flags_remove(), ewl_object_h_request(), ewl_object_init(), ewl_object_maximum_h_get(), ewl_object_maximum_w_get(), ewl_object_minimum_h_get(), ewl_object_minimum_w_get(), ewl_object_place(), and ewl_object_w_request().
int Ewl_Object::h |
Height
Referenced by ewl_object_h_request(), ewl_object_maximum_h_set(), ewl_object_minimum_h_set(), and ewl_object_preferred_inner_h_set().
struct { ... } Ewl_Object::insets |
The space inside where children should not be laid out.
Referenced by ewl_object_insets_get(), and ewl_object_insets_set().
short Ewl_Object::l |
Left value
Referenced by ewl_object_insets_get(), ewl_object_insets_set(), ewl_object_padding_get(), and ewl_object_padding_set().
struct { ... } Ewl_Object::maximum |
The guaranteed maximum size this object will receive.
Referenced by ewl_object_maximum_h_set(), and ewl_object_maximum_w_set().
struct { ... } Ewl_Object::minimum |
The guaranteed minimum size this object will receive.
Referenced by ewl_object_maximum_h_set(), ewl_object_minimum_h_set(), and ewl_object_minimum_w_set().
struct { ... } Ewl_Object::pad |
The space padded around the outside of the object.
Referenced by ewl_object_padding_get(), and ewl_object_padding_set().
struct { ... } Ewl_Object::preferred |
The optimal size of the object in ideal circumstances
Referenced by ewl_object_h_request(), ewl_object_preferred_inner_h_set(), ewl_object_preferred_inner_w_set(), and ewl_object_w_request().
short Ewl_Object::r |
Right value
Referenced by ewl_object_insets_get(), ewl_object_insets_set(), ewl_object_padding_get(), and ewl_object_padding_set().
short Ewl_Object::t |
Top value
Referenced by ewl_object_insets_get(), ewl_object_insets_set(), ewl_object_padding_get(), and ewl_object_padding_set().
int Ewl_Object::w |
Width
Referenced by ewl_object_maximum_w_set(), ewl_object_minimum_w_set(), ewl_object_preferred_inner_w_set(), and ewl_object_w_request().
int Ewl_Object::x |
Horizontal position
Referenced by ewl_object_x_request().
int Ewl_Object::y |
Vertical position
Referenced by ewl_object_y_request().
The documentation for this struct was generated from the following file:
- lib/ewl_object.h