Etk
Main Page Object Hierarchy Data Structures Related Pages
Etk

etk_box.h File Reference


Detailed Description


Data Structures

struct  Etk_Box
 [Widget] An abstract class for a box More...
struct  Etk_HBox
 [Widget] A box in which the children are packed horizontally More...
struct  Etk_VBox
 [Widget] A box in which the children are packed vertically More...

Defines

#define ETK_BOX_TYPE   (etk_box_type_get())
#define ETK_BOX(obj)   (ETK_OBJECT_CAST((obj), ETK_BOX_TYPE, Etk_Box))
#define ETK_IS_BOX(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_BOX_TYPE))
#define ETK_HBOX_TYPE   (etk_hbox_type_get())
#define ETK_HBOX(obj)   (ETK_OBJECT_CAST((obj), ETK_HBOX_TYPE, Etk_HBox))
#define ETK_IS_HBOX(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_HBOX_TYPE))
#define ETK_VBOX_TYPE   (etk_vbox_type_get())
#define ETK_VBOX(obj)   (ETK_OBJECT_CAST((obj), ETK_VBOX_TYPE, Etk_VBox))
#define ETK_IS_VBOX(obj)   (ETK_OBJECT_CHECK_TYPE((obj), ETK_VBOX_TYPE))

Enumerations

enum  Etk_Box_Group {
  ETK_BOX_START,
  ETK_BOX_END
}
 The two groups where the children can be packed: the start-group and the end-group. More...
enum  Etk_Box_Fill_Policy {
  ETK_BOX_NONE = 0,
  ETK_BOX_EXPAND = 1 << 0,
  ETK_BOX_FILL = 1 << 1,
  ETK_BOX_EXPAND_FILL = ETK_BOX_EXPAND | ETK_BOX_FILL,
  ETK_BOX_SHRINK_OPPOSITE = 1 << 2
}
 Describes how a child of the box expands and fills the space. More...

Functions

Etk_Widget * etk_hbox_new (Etk_Bool homogeneous, int spacing)
 Creates a new hbox.
Etk_Widget * etk_vbox_new (Etk_Bool homogeneous, int spacing)
 Creates a new vbox.
void etk_box_prepend (Etk_Box *box, Etk_Widget *child, Etk_Box_Group group, Etk_Box_Fill_Policy fill_policy, int padding)
 Packs a widget at the start of one of the two child-groups of the box.
void etk_box_append (Etk_Box *box, Etk_Widget *child, Etk_Box_Group group, Etk_Box_Fill_Policy fill_policy, int padding)
 Packs a widget at the end of one of the two child-groups of the box.
void etk_box_insert (Etk_Box *box, Etk_Widget *child, Etk_Box_Group group, Etk_Widget *after, Etk_Box_Fill_Policy fill_policy, int padding)
 Packs a widget after another widget, in one of the two child-groups of the box.
void etk_box_insert_at (Etk_Box *box, Etk_Widget *child, Etk_Box_Group group, int pos, Etk_Box_Fill_Policy fill_policy, int padding)
 Packs a widget at a given position, in one of the two child-groups of the box.
Etk_Widget * etk_box_child_get_at (Etk_Box *box, Etk_Box_Group group, int pos)
 Gets the child at a given position in the box.
void etk_box_child_position_set (Etk_Box *box, Etk_Widget *child, Etk_Box_Group group, int pos)
 Changes the position of a child of the box.
Etk_Bool etk_box_child_position_get (Etk_Box *box, Etk_Widget *child, Etk_Box_Group *group, int *pos)
 Gets the position of a child of the box.
void etk_box_child_packing_set (Etk_Box *box, Etk_Widget *child, Etk_Box_Fill_Policy fill_policy, int padding)
 Changes the packing settings of a child of the box.
Etk_Bool etk_box_child_packing_get (Etk_Box *box, Etk_Widget *child, Etk_Box_Fill_Policy *fill_policy, int *padding)
 Gets the packing settings of a child of the box.
void etk_box_spacing_set (Etk_Box *box, int spacing)
 Sets the amount of free space between two cells.
int etk_box_spacing_get (Etk_Box *box)
 Gets the amount of free space between two cells.
void etk_box_homogeneous_set (Etk_Box *box, Etk_Bool homogeneous)
 Sets whether or not all the cells of the box should have the same size.
Etk_Bool etk_box_homogeneous_get (Etk_Box *box)
 Gets whether or not all the cells of the box have the same size.