The Gnome Chemistry Utils
0.14.0
|
#include <gcu/dialog.h>
Public Member Functions | |
Dialog (Application *App, const char *windowname, DialogOwner *owner=NULL) throw (std::runtime_error) | |
virtual | ~Dialog () |
void | SetRealName (char const *name, DialogOwner *owner) throw (std::runtime_error) |
virtual void | Present ()=0 |
virtual void | Destroy ()=0 |
std::string & | GetWindowName () |
Application * | GetApp (void) |
Protected Attributes | |
Application * | m_App |
This class is base class for dialog boxes. It provides some basic services.
gcu::Dialog::Dialog | ( | Application * | App, |
const char * | windowname, | ||
DialogOwner * | owner = NULL |
||
) | throw (std::runtime_error) |
App,: | the Application which owns the dialog. |
windowname,: | the name of the top level GtkWidget of the dialog box in the glade file. This name should be unique for the application. It is used to access the contextual help and to ensure the uniqueness of the dialog (in some cases). |
owner,: | the address of an owner object, might be App or a document or NULL (the default). when owner is not NULL, the dialog will be unique for it. |
|
virtual |
The destructor
Reimplemented in gcugtk::Dialog.
|
pure virtual |
Destroys the dialog. This is a pure virtual function and derived classes must implement it.
Implemented in gcugtk::Dialog.
|
inline |
|
inline |
Dialogs are referenced by their DialogOwner through their name which must be unique. This makes possible to display a hidden dialog without having two instances of it.
|
pure virtual |
Make sure the dialog is visible. This is a pure virtual function and derived classes must implement it.
Implemented in gcugtk::Dialog.
void gcu::Dialog::SetRealName | ( | char const * | name, |
DialogOwner * | owner | ||
) | throw (std::runtime_error) |
name | a new name for the window. |
owner | the address of an dialog owner object. |
Usually, the Dialog is registered using its window name as passed to the constructor. If several occurences of the same Dialog are acceptable, another unique name is needed. owner might be NULL if it has already been set in the constructor. The existence of a Dialog with the same name should be checked before calling this method, because that would throw an error.
|
protected |
The Application instance owning the dialog.