#include <Fl_Dialog.h>
Inheritance diagram for Fl_Dialog:
Public Types | |
enum | ButtonTypes { BTN_OK = 1, BTN_CANCEL = 2, BTN_YES = 4, BTN_NO = 8, BTN_RETRY = 16, BTN_REFRESH = 32, BTN_CONFIRM = 64, BTN_IGNORE = 128, BTN_HELP = 256 } |
Button ID's for Fl_Dialog. More... | |
Public Methods | |
Fl_Dialog (int w, int h, const char *label=0, Fl_Data_Source *ds=0) | |
Constructs empty dialog with give size. More... | |
~Fl_Dialog () | |
Destroys dialog, frees resources. | |
virtual bool | load_data (Fl_Data_Source *ds=0) |
Load dialog widget values from datasource. More... | |
virtual bool | save_data (Fl_Data_Source *ds=0) |
Save dialog widget values to datasource. More... | |
const Fl_Variant & | operator[] (const char *field_name) const |
This function is designed to access the values in widgets that have field_name() defined, after the save_data() is successfully called and dialog is closed. More... | |
Fl_Variant & | operator[] (const char *field_name) |
This function is designed to access the values in widgets that have field_name() defined, after the save_data() is successfully called and dialog is closed. More... | |
int | show_modal () |
Show dialog as application modal window. More... | |
void | submit (int button_id) |
This function emulates user button click. More... | |
void | buttons (int buttons_mask, int default_button) |
Set buttons to dialog, For OK and CANCEL it is: buttons(Fl_Dialog::BTN_OK | Fl_Dialog::BTN_CANCEL, Fl_Dialog::BTN_OK); Default button has double border. More... | |
void | enable_button (int button_id, bool enable=true) |
Enable or disable buttons in dialog. More... | |
void | clear_buttons () |
Removes all buttons from dialog button group. | |
void | user_button (int button_id, Fl_String label, Fl_Pixmap *pixmap=NULL) |
Adds user-defined button to the dialog. More... | |
Fl_Scroll * | new_scroll (const char *label) |
Add new scrollable page to dialog. More... | |
Fl_Group * | new_page (const char *label) |
Same as new_scroll(const char *label). More... | |
Fl_Group * | new_group (const char *label) |
Add new NON-scrollable page to dialog. More... | |
virtual int | handle (int event) |
Internal handle. More... | |
Protected Methods | |
Fl_Widget * | find_widget (const char *field_name) const |
Returns widget for given field_name, returns NULL if not found. | |
Static Protected Methods | |
void | buttons_callback (Fl_Button *btn, long id) |
Internal callback for default dialog buttons. | |
Protected Attributes | |
Fl_Tabs * | m_tabs |
Idea is to provide standard look and feel for all dialogs in application.
Definition at line 40 of file Fl_Dialog.h.
|
Button ID's for Fl_Dialog.
Definition at line 57 of file Fl_Dialog.h. |
|
Constructs empty dialog with give size.
|
|
Set buttons to dialog, For OK and CANCEL it is: buttons(Fl_Dialog::BTN_OK | Fl_Dialog::BTN_CANCEL, Fl_Dialog::BTN_OK);
|
|
Enable or disable buttons in dialog.
|
|
Internal handle.
Reimplemented from Fl_Window. Reimplemented in Fl_File_Chooser. |
|
Load dialog widget values from datasource.
Reimplemented from Fl_Widget. |
|
Add new NON-scrollable page to dialog. Returns new group.
|
|
Same as new_scroll(const char *label).
Definition at line 171 of file Fl_Dialog.h. |
|
Add new scrollable page to dialog. Returns new scroll group.
|
|
This function is designed to access the values in widgets that have field_name() defined, after the save_data() is successfully called and dialog is closed.
|
|
This function is designed to access the values in widgets that have field_name() defined, after the save_data() is successfully called and dialog is closed.
|
|
Save dialog widget values to datasource. This function is called from 'Ok' button callback. If return value is true (data saved) the dialog will be closed.
Reimplemented from Fl_Widget. Reimplemented in Fl_File_Chooser. |
|
Show dialog as application modal window.
|
|
This function emulates user button click. It is 100% same to click CANCEL button in dialog or call submit(Fl_Dialog::BTN_CANCEL);
|
|
Adds user-defined button to the dialog. The size of the pixmap should be 20x20 or less to conform with the existing dialog buttons and the rest of the system. The id of the button must be greater than BTN_HELP, and unique in the button list for the dialog. If any of these conditions is violated - the exception is thrown. This enforces the dialogs in the system to more or less standard. |