Ewl_Dialog: A dialog window
Detailed Description
Defines the Ewl_Dialog class which extends the Ewl_Window class.
- Remarks:
- Inherits from Ewl_Window.
Tutorial
Data Structures | |
struct | Ewl_Dialog |
Inherits from Ewl_Window and extends to provide a dialog widget. More... | |
Defines | |
#define | EWL_DIALOG(dialog) ((Ewl_Dialog *) dialog) |
#define | EWL_DIALOG_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_DIALOG_TYPE)) |
#define | EWL_DIALOG_TYPE "dialog" |
Typedefs | |
typedef struct Ewl_Dialog | Ewl_Dialog |
Functions | |
unsigned int | ewl_dialog_action_alignment_get (Ewl_Dialog *dialog) |
Checks the alignment of the action area. | |
void | ewl_dialog_action_alignment_set (Ewl_Dialog *d, unsigned int a) |
Changes the action area's alignment for the dialog. | |
unsigned int | ewl_dialog_action_fill_policy_get (Ewl_Dialog *dialog) |
Checks the fill policy of the action area. | |
void | ewl_dialog_action_fill_policy_set (Ewl_Dialog *d, unsigned int pol) |
Changes the action area's fill policy for the dialog. | |
Ewl_Position | ewl_dialog_action_position_get (Ewl_Dialog *dialog) |
Checks the action area position for a dialog. | |
void | ewl_dialog_action_position_set (Ewl_Dialog *d, Ewl_Position pos) |
Changes the action area position for a dialog. | |
Ewl_Position | ewl_dialog_active_area_get (Ewl_Dialog *d) |
Retrieve the location of the dialog widgets will be packed into. | |
void | ewl_dialog_active_area_set (Ewl_Dialog *d, Ewl_Position pos) |
Sets the section of the dialog that will have widgets packed into it. | |
unsigned int | ewl_dialog_has_separator_get (Ewl_Dialog *dialog) |
Checks if dialog has a separator or not. | |
void | ewl_dialog_has_separator_set (Ewl_Dialog *dialog, unsigned int has_sep) |
Sets the separator of dialog. | |
int | ewl_dialog_init (Ewl_Dialog *dialog) |
Initialize an internal dialog to starting values. | |
Ewl_Widget * | ewl_dialog_new (void) |
Create a new internal dialog. |
Define Documentation
#define EWL_DIALOG | ( | dialog | ) | ((Ewl_Dialog *) dialog) |
Typecasts a pointer to an Ewl_Dialog pointer.
Referenced by ewl_colordialog_init(), ewl_dialog_has_separator_set(), and ewl_filedialog_init().
#define EWL_DIALOG_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_DIALOG_TYPE)) |
Returns TRUE if the widget is an Ewl_Dialog, FALSE otherwise
#define EWL_DIALOG_TYPE "dialog" |
- Widget Theme Keys:
- /dialog/file
- Widget Theme Keys:
- /dialog/group
Referenced by ewl_dialog_action_alignment_get(), ewl_dialog_action_alignment_set(), ewl_dialog_action_fill_policy_get(), ewl_dialog_action_fill_policy_set(), ewl_dialog_action_position_get(), ewl_dialog_action_position_set(), ewl_dialog_active_area_get(), ewl_dialog_active_area_set(), ewl_dialog_has_separator_get(), ewl_dialog_has_separator_set(), and ewl_dialog_init().
Typedef Documentation
typedef struct Ewl_Dialog Ewl_Dialog |
The dialog structure is a window with two areas: a box (vbox) to hold messages and another box (action_area) to put buttons (usually). These boxes can be separated by a line.
Function Documentation
unsigned int ewl_dialog_action_alignment_get | ( | Ewl_Dialog * | d | ) |
Checks the alignment of the action area.
- Parameters:
-
d,: dialog to check the alignment of the action area
- Returns:
- Returns the current alignment of the action area.
References action_box, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_DIALOG_TYPE, EWL_FLAG_FILL_NONE, EWL_OBJECT, ewl_object_alignment_get(), and EWL_POSITION_BOTTOM.
void ewl_dialog_action_alignment_set | ( | Ewl_Dialog * | d, | |
unsigned int | align | |||
) |
Changes the action area's alignment for the dialog.
- Parameters:
-
d,: dialog to change the alignment of the action area position align,: The new alignment to set
- Returns:
- Returns no value.
References action_box, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_DIALOG_TYPE, EWL_OBJECT, and ewl_object_alignment_set().
unsigned int ewl_dialog_action_fill_policy_get | ( | Ewl_Dialog * | d | ) |
Checks the fill policy of the action area.
- Parameters:
-
d,: dialog to check the fill policy of the action area
- Returns:
- Returns the current fill policy of the action area.
References action_box, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_DIALOG_TYPE, EWL_FLAG_FILL_NONE, EWL_OBJECT, ewl_object_fill_policy_get(), and EWL_POSITION_BOTTOM.
void ewl_dialog_action_fill_policy_set | ( | Ewl_Dialog * | d, | |
unsigned int | pol | |||
) |
Changes the action area's fill policy for the dialog.
- Parameters:
-
d,: dialog to change fill policy of the action area position pol,: The new fill policy to set
- Returns:
- Returns no value.
References action_box, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_DIALOG_TYPE, EWL_OBJECT, and ewl_object_fill_policy_set().
Ewl_Position ewl_dialog_action_position_get | ( | Ewl_Dialog * | d | ) |
Checks the action area position for a dialog.
- Parameters:
-
d,: dialog to check action area position
- Returns:
- Returns the current action area position.
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_DIALOG_TYPE, EWL_POSITION_BOTTOM, and position.
void ewl_dialog_action_position_set | ( | Ewl_Dialog * | d, | |
Ewl_Position | pos | |||
) |
Changes the action area position for a dialog.
- Parameters:
-
d,: dialog to change action area position pos,: the new position for the new action area
- Returns:
- Returns no value.
References action_area, action_box, box, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_BOX, ewl_box_orientation_set(), EWL_CONTAINER, ewl_container_child_append(), ewl_container_child_prepend(), ewl_container_child_remove(), EWL_DIALOG_TYPE, EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_VFILL, EWL_OBJECT, ewl_object_fill_policy_set(), EWL_ORIENTATION_HORIZONTAL, EWL_ORIENTATION_VERTICAL, EWL_POSITION_LEFT, EWL_POSITION_RIGHT, EWL_POSITION_TOP, EWL_SEPARATOR, ewl_separator_orientation_set(), position, and separator.
Referenced by ewl_colordialog_init().
Ewl_Position ewl_dialog_active_area_get | ( | Ewl_Dialog * | d | ) |
Retrieve the location of the dialog widgets will be packed into.
- Parameters:
-
d,: The Ewl_Dialog to get the active area from
- Returns:
- Returns the active portion of the dialog
References active_area, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_DIALOG_TYPE, and EWL_POSITION_TOP.
void ewl_dialog_active_area_set | ( | Ewl_Dialog * | d, | |
Ewl_Position | pos | |||
) |
Sets the section of the dialog that will have widgets packed into it.
- Parameters:
-
d,: The Ewl_Dialog to work with pos,: The area of the dialog to set active
- Returns:
- Returns no value
References action_box, active_area, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_redirect_set(), EWL_DIALOG_TYPE, position, and vbox.
Referenced by ewl_colordialog_init(), ewl_dialog_init(), and ewl_filedialog_init().
unsigned int ewl_dialog_has_separator_get | ( | Ewl_Dialog * | dialog | ) |
Checks if dialog has a separator or not.
- Parameters:
-
dialog,: the dialog.
- Returns:
- Returns TRUE if dialog has a separator.
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_DIALOG_TYPE, and separator.
void ewl_dialog_has_separator_set | ( | Ewl_Dialog * | dialog, | |
unsigned int | has_sep | |||
) |
Sets the separator of dialog.
- Parameters:
-
dialog,: the dialog. has_sep,: TRUE to draw the separator, FALSE to hide it.
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CONTAINER, ewl_container_child_insert(), ewl_container_child_iterate_begin(), ewl_container_child_next(), EWL_DIALOG, EWL_DIALOG_TYPE, EWL_FLAG_FILL_SHRINK, ewl_hseparator_new(), EWL_OBJECT, ewl_object_fill_policy_set(), ewl_widget_destroy(), ewl_widget_show(), separator, and vbox.
Referenced by ewl_filedialog_init().
int ewl_dialog_init | ( | Ewl_Dialog * | dialog | ) |
Initialize an internal dialog to starting values.
- Parameters:
-
dialog,: the dialog to initialize.
- Returns:
- Return TRUE on success, FALSE otherwise.
References action_area, action_box, box, DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BOX, ewl_box_homogeneous_set(), ewl_cell_new(), EWL_CONTAINER, ewl_container_child_append(), ewl_dialog_active_area_set(), EWL_DIALOG_TYPE, EWL_FLAG_FILL_ALL, EWL_FLAG_FILL_HFILL, EWL_FLAG_FILL_NONE, ewl_hbox_new(), ewl_hseparator_new(), EWL_OBJECT, ewl_object_fill_policy_set(), EWL_POSITION_BOTTOM, ewl_vbox_new(), EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), ewl_widget_internal_set(), ewl_widget_show(), EWL_WINDOW, ewl_window_init(), position, separator, and vbox.
Referenced by ewl_colordialog_init(), ewl_dialog_new(), and ewl_filedialog_init().
Ewl_Widget* ewl_dialog_new | ( | void | ) |
Create a new internal dialog.
- Returns:
- Returns a pointer to a new dialog on success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_dialog_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.