Download

Support

Ewl_Freebox: A Freelayout widget


Detailed Description

Defines a class to allow the user to specify the layout type for the widget.

Remarks:
Inherits from Ewl_Container.

Tutorial


Data Structures

struct  Ewl_Freebox
 Inherits from Ewl_Container and extends to allow for differnt layout algorithms. More...

Defines

#define EWL_FREEBOX(box)   ((Ewl_Freebox *)box)
#define EWL_FREEBOX_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_FREEBOX_TYPE))
#define EWL_FREEBOX_TYPE   "freebox"

Typedefs

typedef Ewl_Freebox Ewl_Freebox
typedef int(*) Ewl_Freebox_Comparator (Ewl_Widget *a, Ewl_Widget *b)

Functions

void ewl_freebox_cb_child_add (Ewl_Container *c, Ewl_Widget *w)
void ewl_freebox_cb_child_show (Ewl_Container *c, Ewl_Widget *w)
void ewl_freebox_cb_configure (Ewl_Widget *w, void *ev, void *data)
Ewl_Freebox_Comparator ewl_freebox_comparator_get (Ewl_Freebox *fb)
 Retrieve the comparator set in the Ewl_Freebox.
void ewl_freebox_comparator_set (Ewl_Freebox *fb, Ewl_Freebox_Comparator cmp)
 Set the comparator to use in the Ewl_Freebox.
int ewl_freebox_init (Ewl_Freebox *fb)
 Initializes an Ewl_Freebox widget to default values.
Ewl_Freebox_Layout_Type ewl_freebox_layout_type_get (Ewl_Freebox *fb)
 Retrieve the layout type of the Ewl_Freebox.
void ewl_freebox_layout_type_set (Ewl_Freebox *fb, Ewl_Freebox_Layout_Type type)
 Set the layout type of the Ewl_Freebox.
Ewl_Widgetewl_freebox_new (void)
 Creates a new, initialized Ewl_Freebox widget.
Ewl_Orientation ewl_freebox_orientation_get (Ewl_Freebox *fb)
 Retrieve the current orientation of the freebox.
void ewl_freebox_orientation_set (Ewl_Freebox *fb, Ewl_Orientation orientation)
 Sets the orientation of the freebox.
void ewl_freebox_resort (Ewl_Freebox *fb)
 This will force the freebox to resort and redraw it's contents. Useful if part of the content changes but no child widgets where added/removed. (An icon label changes for example).
Ewl_Widgetewl_hfreebox_new (void)
 creates and initializes a new freebox widget
Ewl_Widgetewl_vfreebox_new (void)
 creates and initializes a new freebox widget

Define Documentation

#define EWL_FREEBOX ( box   )     ((Ewl_Freebox *)box)

Typecasts a pointer to an Ewl_Freebox pointer.

#define EWL_FREEBOX_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_FREEBOX_TYPE))

Returns TRUE if the widget is an Ewl_Freebox, FALSE otherwise

#define EWL_FREEBOX_TYPE   "freebox"

The type name for the Ewl_Freebox widget


Typedef Documentation

typedef struct Ewl_Freebox Ewl_Freebox

A free layout container.

Callback to compare two widgets to determine which is first. If the return is < 0 then a is first. If the return is > 0 then b is first. If the return == 0 then they are equal


Function Documentation

void ewl_freebox_cb_child_add ( Ewl_Container c,
Ewl_Widget w 
)

void ewl_freebox_cb_child_show ( Ewl_Container c,
Ewl_Widget w 
)

void ewl_freebox_cb_configure ( Ewl_Widget w,
void *  ev,
void *  data 
)

Ewl_Freebox_Comparator ewl_freebox_comparator_get ( Ewl_Freebox fb  ) 

Retrieve the comparator set in the Ewl_Freebox.

Parameters:
fb,: The Ewl_Freebox to get the comparator from
Returns:
Returns the Ewl_Freebox_Comparator set on the given Ewl_Freebox or NULL if none set.

void ewl_freebox_comparator_set ( Ewl_Freebox fb,
Ewl_Freebox_Comparator  cmp 
)

Set the comparator to use in the Ewl_Freebox.

Parameters:
fb,: The Ewl_Freebox to set the comparator on
cmp,: The Ewl_Freebox_Comparator functon to set
Returns:
Returns no value

int ewl_freebox_init ( Ewl_Freebox fb  ) 

Initializes an Ewl_Freebox widget to default values.

Parameters:
fb,: The Ewl_Freebox to initialize
Returns:
Returns TRUE on success or FALSE on failure

Ewl_Freebox_Layout_Type ewl_freebox_layout_type_get ( Ewl_Freebox fb  ) 

Retrieve the layout type of the Ewl_Freebox.

Parameters:
fb,: The Ewl_Freebox to get the layout from
Returns:
Returns the Ewl_Freebox_Layout_Type currently set on this freebox

void ewl_freebox_layout_type_set ( Ewl_Freebox fb,
Ewl_Freebox_Layout_Type  type 
)

Set the layout type of the Ewl_Freebox.

Parameters:
fb,: The Ewl_Freebox to change
type,: The Ewl_Freebox_Layout_Type to set on this freebox
Returns:
Returns no value

Ewl_Widget* ewl_freebox_new ( void   ) 

Creates a new, initialized Ewl_Freebox widget.

Returns:
Returns a new Ewl_Freebox on success or NULL on failure

Ewl_Orientation ewl_freebox_orientation_get ( Ewl_Freebox fb  ) 

Retrieve the current orientation of the freebox.

Parameters:
fb,: The freebox to use
Returns:
Returns the orientation of the freebox

void ewl_freebox_orientation_set ( Ewl_Freebox fb,
Ewl_Orientation  orientation 
)

Sets the orientation of the freebox.

Parameters:
fb,: The freebox to use
orientation,: The orientation to set
Returns:
Returns no value

void ewl_freebox_resort ( Ewl_Freebox fb  ) 

This will force the freebox to resort and redraw it's contents. Useful if part of the content changes but no child widgets where added/removed. (An icon label changes for example).

Parameters:
fb,: The Ewl_Freebox to for a resort on
Returns:
Returns no value.

Ewl_Widget* ewl_hfreebox_new ( void   ) 

creates and initializes a new freebox widget

Returns:
Returns a new horizontal Ewl_Freebox widget or NULL on failure

Ewl_Widget* ewl_vfreebox_new ( void   ) 

creates and initializes a new freebox widget

Returns:
Returns a new vertical Ewl_Freebox widget or NULL on failure


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:49:46 2009