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_HSHRINKABLE, EWL_FLAG_FILL_VSHRINKABLE 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 short 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
unsigned short pad_type_b:3
unsigned short pad_type_l:3
unsigned short pad_type_r:3
unsigned short pad_type_t:3
struct {
   int   h
   int   w
preferred

Field Documentation

Bottom value

struct { ... } Ewl_Object::current

The current size and position of an object.

unsigned short Ewl_Object::flags

Bitmask indicating fill policy and a lignment

Height

struct { ... } Ewl_Object::insets

The space padded around the outside of the object. The space inside where children should not be laid out.

Left value

struct { ... } Ewl_Object::maximum

The optimal size of the object in ideal circumstances The guaranteed maximum size this object will receive.

struct { ... } Ewl_Object::minimum

The optimal size of the object in ideal circumstances The guaranteed maximum size this object will receive. The guaranteed minimum size this object will receive.

struct { ... } Ewl_Object::pad

The space padded around the outside of the object.

unsigned short Ewl_Object::pad_type_b

unsigned short Ewl_Object::pad_type_l

unsigned short Ewl_Object::pad_type_r

unsigned short Ewl_Object::pad_type_t

struct { ... } Ewl_Object::preferred

The optimal size of the object in ideal circumstances

Right value

Top value

Width

Horizontal position

Vertical position


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

Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:50:05 2009