Inherited by XGP::BrowserDlg, XGP::ConnectDlg, XGP::HTMLViewer, XGP::LoginDialog, XGP::PrintDialog, XGP::SearchDialog, XGP::TraceDlg, XGP::XAbout, and XGP::XDate.
Public Member Functions | |
virtual | ~XDialog () |
Protected Types | |
enum | buttons { NONE = 0, OK = 1, CANCEL = 2, OKCANCEL = (OK | CANCEL) } |
Protected Member Functions | |
XDialog (const Glib::ustring &title, Gtk::Window &parent, unsigned int buttons=OKCANCEL, bool modal=false, bool use_separator=false) | |
XDialog (const Glib::ustring &title, unsigned int buttons=OKCANCEL, bool modal=false, bool use_separator=false) | |
XDialog (unsigned int buttons=OKCANCEL, bool modal=false, bool use_separator=false) | |
void | init (unsigned int buttons=OKCANCEL) |
virtual bool | isDataOK () |
virtual void | okEvent () |
virtual void | cancelEvent () |
virtual void | command (int action) |
void | free (int) |
void | on_response (int cmd) |
Protected Attributes | |
Gtk::Button * | ok |
Gtk::Button * | cancel |
Installs OK and/or Cancel buttons and registers a command handler for them. Pressing OK is reported with the okEvent() method; cancel with the cancelEvent() method. The baseclase destroys the dialog in both cases.
Pressing ESC
is equal to selecting the CANCEL
button.
enum XGP::XDialog::buttons [protected] |
XGP::XDialog::~XDialog | ( | ) | [virtual] |
Destructor.
XGP::XDialog::XDialog | ( | const Glib::ustring & | title, | |
Gtk::Window & | parent, | |||
unsigned int | buttons = OKCANCEL , |
|||
bool | modal = false , |
|||
bool | use_separator = false | |||
) | [protected] |
(Default-)Constructor; creates the dialog with the specified buttons
buttons | Bitfield for buttons to display | |
title | Title to display | |
parent | Parent of the dialog | |
modal | Flag, if the dialog is modal | |
use_separator | Flag, if the dialog should display a separator line between its contents and its buttons |
XGP::XDialog::XDialog | ( | const Glib::ustring & | title, | |
unsigned int | buttons = OKCANCEL , |
|||
bool | modal = false , |
|||
bool | use_separator = false | |||
) | [protected] |
Constructor; creates the dialog with the specified buttons.
buttons | Bitfield for buttons to display | |
title | Title to display | |
modal | Flag, if the dialog is modal | |
use_separator | Flag, if the dialog should display a separator line between its contents and its buttons |
XGP::XDialog::XDialog | ( | unsigned int | buttons = OKCANCEL , |
|
bool | modal = false , |
|||
bool | use_separator = false | |||
) | [protected] |
Constructor; creates the dialog with the specified buttons.
buttons | Bitfield for buttons to display | |
modal | Flag, if the dialog is modal | |
use_separator | Flag, if the dialog should display a separator line between its contents and its buttons |
void XGP::XDialog::cancelEvent | ( | ) | [protected, virtual] |
void XGP::XDialog::command | ( | int | action | ) | [protected, virtual] |
Command handler of the dialog.
action | Selected action |
Reimplemented in XGP::ConnectDlg, and XGP::LoginDialog.
void XGP::XDialog::free | ( | int | ) | [protected] |
Frees the dialog.
void XGP::XDialog::init | ( | unsigned int | buttons = OKCANCEL |
) | [protected] |
Adds the specified buttons to the dialog.
buttons | Bitfield for buttons to display |
bool XGP::XDialog::isDataOK | ( | ) | [protected, virtual] |
Checks if the data entered in the dialog is OK.
void XGP::XDialog::okEvent | ( | ) | [protected, virtual] |
Callback after pressing the OK button; the user can override that to implemnt own behaviour.
Reimplemented in XGP::ConnectDlg.
void XGP::XDialog::on_response | ( | int | cmd | ) | [protected] |
Callback after button-events.
cmd | ID of pressed button |
Gtk::Button* XGP::XDialog::cancel [protected] |
Cancel button of the dialog.
Gtk::Button* XGP::XDialog::ok [protected] |
OK button of the dialog.