Ewl_Paned: A paned widget
Detailed Description
Provides a widget to have a resizable paned container
- Remarks:
- Inherits from Ewl_Container.
Information
The Ewl_Paned widget is designed to hold multiple panes if needed. If you want to have three panes or four panges just add the panes and it will add the grabbers as needed. The paned widget is an Ewl_Container so to add panes you just use the container functions to append, prepend and insert as needed.Initial Layout
If you need to set the initial sizes of the items in the grabber then you can use the following lines:
ewl_container_child_append(EWL_CONTAINER(paned), child); ewl_paned_initial_size_set(EWL_PANED(paned), child, 100);
This will set the initial size of the child to 100 px.
Data Structures | |
struct | Ewl_Paned |
Inherits from Ewl_Container and extends to provided the paned widget. More... | |
struct | Ewl_Paned_Grabber |
Inherits from Ewl_Separator and extends to facilitate the paned grabber. More... | |
struct | Ewl_Paned_Size_Info |
Holds some information about the children. It is only used internally. More... | |
Defines | |
#define | EWL_PANED(paned) ((Ewl_Paned *) paned) |
#define | EWL_PANED_GRABBER(g) ((Ewl_Paned_Grabber *)g) |
#define | EWL_PANED_GRABBER_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_PANED_GRABBER_TYPE)) |
#define | EWL_PANED_GRABBER_TYPE "paned_grabber" |
#define | EWL_PANED_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_PANED_TYPE)) |
#define | EWL_PANED_TYPE "paned" |
Typedefs | |
typedef Ewl_Paned | Ewl_Paned |
typedef Ewl_Paned_Grabber | Ewl_Paned_Grabber |
typedef Ewl_Paned_Size_Info | Ewl_Paned_Size_Info |
Functions | |
Ewl_Widget * | ewl_hpaned_new (void) |
Allocate and initialize a new paned widget with horizontal orientation. | |
void | ewl_paned_arrange (Ewl_Paned *p, int pane_num) |
The arrange the child widgets. | |
void | ewl_paned_cb_child_add (Ewl_Container *c, Ewl_Widget *w) |
void | ewl_paned_cb_child_hide (Ewl_Container *c, Ewl_Widget *w) |
void | ewl_paned_cb_child_remove (Ewl_Container *c, Ewl_Widget *w, int idx) |
void | ewl_paned_cb_child_resize (Ewl_Container *c, Ewl_Widget *w, int size, Ewl_Orientation o) |
void | ewl_paned_cb_child_show (Ewl_Container *c, Ewl_Widget *w) |
void | ewl_paned_cb_configure (Ewl_Widget *w, void *ev, void *data) |
void | ewl_paned_cb_destroy (Ewl_Widget *w, void *ev, void *data) |
unsigned int | ewl_paned_fixed_size_get (Ewl_Paned *p, Ewl_Widget *child) |
Retrieves if the pane is set to keep its size while resizing. | |
void | ewl_paned_fixed_size_set (Ewl_Paned *p, Ewl_Widget *child, unsigned int fixed) |
Set the given widget to resize only by the grabber. | |
int | ewl_paned_grabber_init (Ewl_Paned_Grabber *g) |
Ewl_Widget * | ewl_paned_grabber_new (void) |
Ewl_Orientation | ewl_paned_grabber_orientation_get (Ewl_Paned_Grabber *g) |
void | ewl_paned_grabber_paned_orientation_set (Ewl_Paned_Grabber *g, Ewl_Orientation o) |
void | ewl_paned_grabber_show_cursor_for (Ewl_Paned_Grabber *g, unsigned int dir) |
int | ewl_paned_init (Ewl_Paned *p) |
Initialize a new paned widget to default values. | |
int | ewl_paned_initial_size_get (Ewl_Paned *p, Ewl_Widget *child) |
Get the initial size of a pane in px. | |
void | ewl_paned_initial_size_set (Ewl_Paned *p, Ewl_Widget *child, int size) |
Set the initial size of a pane in px. | |
Ewl_Widget * | ewl_paned_new (void) |
Allocate and initialize a new paned widget. | |
Ewl_Orientation | ewl_paned_orientation_get (Ewl_Paned *p) |
Get the orientation of the paned widget. | |
void | ewl_paned_orientation_set (Ewl_Paned *p, Ewl_Orientation o) |
Set the orientation of the paned. | |
Ewl_Paned_Size_Info * | ewl_paned_size_info_add (Ewl_Paned *p, Ewl_Widget *w) |
void | ewl_paned_size_info_del (Ewl_Paned *p, Ewl_Widget *w) |
Ewl_Paned_Size_Info * | ewl_paned_size_info_get (Ewl_Paned *p, Ewl_Widget *w) |
Ewl_Widget * | ewl_vpaned_new (void) |
Allocate and initialize a new paned widget with vertical orientation. |
Define Documentation
#define EWL_PANED_GRABBER | ( | g | ) | ((Ewl_Paned_Grabber *)g) |
Typecasts a pointer to an Ewl_Paned_Grabber pointer
#define EWL_PANED_GRABBER_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_PANED_GRABBER_TYPE)) |
Returns TRUE if the widget is an Ewl_Paned_Grabber, FALSE otherwise
#define EWL_PANED_GRABBER_TYPE "paned_grabber" |
The type name for the Ewl_Paned_Grabber widget
#define EWL_PANED_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_PANED_TYPE)) |
Returns TRUE if the widget is an Ewl_Paned, FALSE otherwise
#define EWL_PANED_TYPE "paned" |
The type name for the Ewl_Paned widget
Typedef Documentation
typedef struct Ewl_Paned_Grabber Ewl_Paned_Grabber |
Typedef for the Ewl_Paned_Grabber struct
typedef struct Ewl_Paned_Size_Info Ewl_Paned_Size_Info |
The Ewl_Paned_Size_Info structure
Function Documentation
Ewl_Widget* ewl_hpaned_new | ( | void | ) |
Allocate and initialize a new paned widget with horizontal orientation.
- Returns:
- Returns NULL on failure, or a pointer to a new paned widget on success.
void ewl_paned_arrange | ( | Ewl_Paned * | p, | |
int | pane_num | |||
) |
The arrange the child widgets.
- Parameters:
-
p,: The paned to work with pane_num,: The number of visible panes
- Returns:
- Returns no value
void ewl_paned_cb_child_add | ( | Ewl_Container * | c, | |
Ewl_Widget * | w | |||
) |
void ewl_paned_cb_child_hide | ( | Ewl_Container * | c, | |
Ewl_Widget * | w | |||
) |
void ewl_paned_cb_child_remove | ( | Ewl_Container * | c, | |
Ewl_Widget * | w, | |||
int | idx | |||
) |
void ewl_paned_cb_child_resize | ( | Ewl_Container * | c, | |
Ewl_Widget * | w, | |||
int | size, | |||
Ewl_Orientation | o | |||
) |
void ewl_paned_cb_child_show | ( | Ewl_Container * | c, | |
Ewl_Widget * | w | |||
) |
void ewl_paned_cb_configure | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
void ewl_paned_cb_destroy | ( | Ewl_Widget * | w, | |
void * | ev, | |||
void * | data | |||
) |
unsigned int ewl_paned_fixed_size_get | ( | Ewl_Paned * | p, | |
Ewl_Widget * | child | |||
) |
Retrieves if the pane is set to keep its size while resizing.
- Parameters:
-
p,: The paned to work with child,: The child widget to get the fixed size flag
- Returns:
- Returns if the pane is set to keep its size while resizing
void ewl_paned_fixed_size_set | ( | Ewl_Paned * | p, | |
Ewl_Widget * | child, | |||
unsigned int | fixed | |||
) |
Set the given widget to resize only by the grabber.
- Parameters:
-
p,: The paned to work with child,: The child widget to set the fixed size flag fixed,: the fixed size flag
- Returns:
- Returns no value.
int ewl_paned_grabber_init | ( | Ewl_Paned_Grabber * | g | ) |
Ewl_Widget* ewl_paned_grabber_new | ( | void | ) |
Ewl_Orientation ewl_paned_grabber_orientation_get | ( | Ewl_Paned_Grabber * | g | ) |
void ewl_paned_grabber_paned_orientation_set | ( | Ewl_Paned_Grabber * | g, | |
Ewl_Orientation | o | |||
) |
void ewl_paned_grabber_show_cursor_for | ( | Ewl_Paned_Grabber * | g, | |
unsigned int | dir | |||
) |
int ewl_paned_init | ( | Ewl_Paned * | p | ) |
Initialize a new paned widget to default values.
- Parameters:
-
p,: the paned widget to initialize
- Returns:
- Returns 1 on success or 0 on failure
int ewl_paned_initial_size_get | ( | Ewl_Paned * | p, | |
Ewl_Widget * | child | |||
) |
Get the initial size of a pane in px.
- Parameters:
-
p,: The paned to work with child,: The child widget to get the initial size
- Returns:
- Returns the initial size that is set to the given widget. If there isn't any size set, it'll return 0.
void ewl_paned_initial_size_set | ( | Ewl_Paned * | p, | |
Ewl_Widget * | child, | |||
int | size | |||
) |
Set the initial size of a pane in px.
- Parameters:
-
p,: The paned to work with child,: The child widget to set the initial size size,: the size to set
- Returns:
- Returns no value.
Ewl_Widget* ewl_paned_new | ( | void | ) |
Allocate and initialize a new paned widget.
- Returns:
- Returns NULL on failure, or a pointer to a new paned widget on success.
Ewl_Orientation ewl_paned_orientation_get | ( | Ewl_Paned * | p | ) |
Get the orientation of the paned widget.
- Parameters:
-
p,: The Ewl_Paned to get the orientation from
- Returns:
- Returns the Ewl_Orientation currently set on the paned
void ewl_paned_orientation_set | ( | Ewl_Paned * | p, | |
Ewl_Orientation | o | |||
) |
Set the orientation of the paned.
- Parameters:
-
p,: The paned to set the orientation on o,: The Ewl_Orientation to set
- Returns:
- Returns no value.
Ewl_Paned_Size_Info* ewl_paned_size_info_add | ( | Ewl_Paned * | p, | |
Ewl_Widget * | w | |||
) |
void ewl_paned_size_info_del | ( | Ewl_Paned * | p, | |
Ewl_Widget * | w | |||
) |
Ewl_Paned_Size_Info* ewl_paned_size_info_get | ( | Ewl_Paned * | p, | |
Ewl_Widget * | w | |||
) |
Ewl_Widget* ewl_vpaned_new | ( | void | ) |
Allocate and initialize a new paned widget with vertical orientation.
- Returns:
- Returns NULL on failure, or a pointer to a new paned widget on success.