Ewl_Border: A container with a border and label
Detailed Description
Defines the Ewl_Border class used for adding a border decoration around a group of widgets.
- Remarks:
- Inherits from Ewl_Box.
Tutorial
Data Structures | |
struct | Ewl_Border |
Inherits from Ewl_Box to allow drawing a border and label decoration around widgets. More... | |
Defines | |
#define | EWL_BORDER(border) ((Ewl_Border *) border) |
#define | EWL_BORDER_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_BORDER_TYPE)) |
#define | EWL_BORDER_TYPE "border" |
Typedefs | |
typedef struct Ewl_Border | Ewl_Border |
Functions | |
int | ewl_border_init (Ewl_Border *b) |
Initialize a border container to default values. | |
unsigned int | ewl_border_label_alignment_get (Ewl_Border *b) |
Retruns the alignment setting of the label for this border container. | |
void | ewl_border_label_alignment_set (Ewl_Border *b, unsigned int align) |
alters the alignment setting of the label on the border | |
const char * | ewl_border_label_get (Ewl_Border *b) |
Get the label from a border widget. | |
Ewl_Position | ewl_border_label_position_get (Ewl_Border *b) |
Gets the label position of the border. | |
void | ewl_border_label_position_set (Ewl_Border *b, Ewl_Position pos) |
Sets the position of the label in the border container. | |
void | ewl_border_label_set (Ewl_Border *b, const char *t) |
Set the label for the border. | |
Ewl_Widget * | ewl_border_new (void) |
Allocate and initialize a new border container. |
Define Documentation
#define EWL_BORDER | ( | border | ) | ((Ewl_Border *) border) |
Typecast a pointer to an Ewl_Separator pointer.
#define EWL_BORDER_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_BORDER_TYPE)) |
Returns TRUE if the widget is an Ewl_Border widget, FALSE otherwise
#define EWL_BORDER_TYPE "border" |
- Widget Theme Keys:
- /border/file
- Widget Theme Keys:
- /border/group
Referenced by ewl_border_init(), ewl_border_label_alignment_get(), ewl_border_label_alignment_set(), ewl_border_label_get(), ewl_border_label_position_get(), ewl_border_label_position_set(), and ewl_border_label_set().
Typedef Documentation
typedef struct Ewl_Border Ewl_Border |
Ewl_Border provides a container that has a labeled border.
Function Documentation
int ewl_border_init | ( | Ewl_Border * | b | ) |
Initialize a border container to default values.
- Parameters:
-
b,: the border container to initialize
- Returns:
- Returns TRUE on success, FALSE on failure.
References body, DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BORDER_TYPE, EWL_BOX, ewl_box_init(), ewl_box_orientation_set(), EWL_CONTAINER, ewl_container_child_append(), ewl_container_redirect_set(), EWL_FLAG_FILL_FILL, ewl_label_new(), EWL_OBJECT, ewl_object_fill_policy_set(), EWL_ORIENTATION_VERTICAL, EWL_POSITION_TOP, ewl_vbox_new(), EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), ewl_widget_internal_set(), ewl_widget_show(), label, and label_position.
Referenced by ewl_border_new().
unsigned int ewl_border_label_alignment_get | ( | Ewl_Border * | b | ) |
Retruns the alignment setting of the label for this border container.
- Parameters:
-
b,: The Ewl_Border to get the alignment from
- Returns:
- Returns the alignment of the label for the border.
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BORDER_TYPE, EWL_OBJECT, ewl_object_alignment_get(), and label.
void ewl_border_label_alignment_set | ( | Ewl_Border * | b, | |
unsigned int | align | |||
) |
alters the alignment setting of the label on the border
- Parameters:
-
b,: The Ewl_Border to set the alignment on align,: The alignment to set on the label
- Returns:
- Retruns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_BORDER_TYPE, EWL_OBJECT, ewl_object_alignment_set(), and label.
const char* ewl_border_label_get | ( | Ewl_Border * | b | ) |
Get the label from a border widget.
- Parameters:
-
b,: the border to retrieve the label text
- Returns:
- Returns the border label text on success, NULL on failure.
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_BORDER_TYPE, EWL_LABEL, ewl_label_text_get(), and label.
Ewl_Position ewl_border_label_position_get | ( | Ewl_Border * | b | ) |
Gets the label position of the border.
- Parameters:
-
b,: The Ewl_Border to get the label position from
- Returns:
- Returns the Ewl_Position setting of the label on this border
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BORDER_TYPE, EWL_POSITION_LEFT, and label_position.
void ewl_border_label_position_set | ( | Ewl_Border * | b, | |
Ewl_Position | pos | |||
) |
Sets the position of the label in the border container.
- Parameters:
-
b,: The Ewl_Border to set the label position on pos,: The Ewl_Position to set on for the label.
- Returns:
- Returns no value.
References body, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_BORDER_TYPE, EWL_BOX, ewl_box_orientation_set(), EWL_CONTAINER, ewl_container_child_append(), ewl_container_child_prepend(), ewl_container_child_remove(), ewl_container_redirect_set(), EWL_ORIENTATION_HORIZONTAL, EWL_ORIENTATION_VERTICAL, EWL_POSITION_BOTTOM, EWL_POSITION_LEFT, EWL_POSITION_RIGHT, EWL_POSITION_TOP, EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_configure(), label, and label_position.
void ewl_border_label_set | ( | Ewl_Border * | b, | |
const char * | t | |||
) |
Set the label for the border.
- Parameters:
-
b,: the border widget to change the text t,: the text to set for the border label
- Returns:
- Returns no value. Change the text of the border label to the string t.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_BORDER_TYPE, EWL_LABEL, ewl_label_text_set(), and label.
Ewl_Widget* ewl_border_new | ( | void | ) |
Allocate and initialize a new border container.
- Returns:
- Returns a new border container on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_border_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.