Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

Dialog: A Window to prompt the user for

Displaying Messages, asking questions or warnings. Defines the Ewl_Dialog class which extends the Ewl_Window class. More...

Data Structures

struct  _Ewl_Dialog
 Extends the Ewl_Window class. More...

struct  _Ewl_Dialog
 Extends the Ewl_Window class. More...


Defines

#define EWL_DIALOG(dialog)   ((Ewl_Dialog *) dialog)
 Typecasts a pointer to an Ewl_Dialog pointer.


Typedefs

typedef _Ewl_Dialog Ewl_Dialog
 The dialog structure is a window with two area: a box (vbox) to hold messages and another box (action_area) to put buttons (usually).


Functions

Ewl_Widgetewl_dialog_new (Ewl_Position pos)
 Create a new internal dialog.

int ewl_dialog_init (Ewl_Dialog *dialog, Ewl_Position pos)
 Initialize an internal dialog to starting values.

void ewl_dialog_widget_add (Ewl_Dialog *dialog, Ewl_Widget *w)
 Convenient function to add widgets in the vbox.

Ewl_Widgetewl_dialog_button_add (Ewl_Dialog *dialog, char *button_text, int response_id)
 Add a (stock) button on the right of the action_area of dialog.

Ewl_Widgetewl_dialog_button_left_add (Ewl_Dialog *dialog, char *button_text, int response_id)
 Same as ewl_dialog_add_button(), but add the button on the left.

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.


Detailed Description

Displaying Messages, asking questions or warnings. Defines the Ewl_Dialog class which extends the Ewl_Window class.


Typedef Documentation

typedef struct _Ewl_Dialog Ewl_Dialog
 

The dialog structure is a window with two area: 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

Ewl_Widget* ewl_dialog_button_add Ewl_Dialog dialog,
char *  button_text,
int  response_id
 

Add a (stock) button on the right of the action_area of dialog.

Parameters:
dialog: the dialog to add the button in.
button_text: the text of the button or a stock Id.
response_id: The Id that will be retured when clicking on the button.
Returns:
Returns a button, or NULL on failure.

Ewl_Widget* ewl_dialog_button_left_add Ewl_Dialog dialog,
char *  button_text,
int  response_id
 

Same as ewl_dialog_add_button(), but add the button on the left.

Parameters:
dialog: the dialog to add the button in.
button_text: the text of the button or a stock Id.
response_id: The Id that will be retured when clicking on the button.
Returns:
Returns a button, or NULL on failure.

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.

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.

int ewl_dialog_init Ewl_Dialog dialog,
Ewl_Position  pos
 

Initialize an internal dialog to starting values.

Parameters:
dialog: the dialog to initialize.
pos: the position of the action area.
Returns:
Return TRUE on success, FALSE otherwise.

Ewl_Widget* ewl_dialog_new Ewl_Position  pos  ) 
 

Create a new internal dialog.

Parameters:
pos: the position of the action area.
Returns:
Returns a pointer to a new dialog on success, NULL on failure.

void ewl_dialog_widget_add Ewl_Dialog dialog,
Ewl_Widget w
 

Convenient function to add widgets in the vbox.

Parameters:
dialog: the dialog to add the widget in.
w: the widget to add in the vbox.
Returns:
Returns no value.