Download

Support

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:

object_fields.png

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:

object_sizing.png

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

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().

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().

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().

Horizontal position

Referenced by ewl_object_x_request().

Vertical position

Referenced by ewl_object_y_request().


The documentation for this struct was generated from the following file:

Copyright © Enlightenment.org

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