The Gnome Chemistry Utils  0.14.0
Public Member Functions | Protected Attributes | List of all members
gcu::Dialog Class Reference

#include <gcu/dialog.h>

Inheritance diagram for gcu::Dialog:
gcugtk::Dialog gcp::DocPropDlg gcp::HPosDlg gcp::NewFileDlg gcp::PrefsDlg gcp::ReactionPropDlg gcp::Tools gcp::ZoomDlg gcr::AtomsDlg gcr::CellDlg gcr::CleavagesDlg gcr::LinesDlg gcr::PrefsDlg gcr::SizeDlg gcr::ViewSettingsDlg gcugtk::PrintSetupDlg gcugtk::StringDlg gcugtk::StringInputDlg

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 ()
ApplicationGetApp (void)

Protected Attributes

Applicationm_App

Detailed Description

This class is base class for dialog boxes. It provides some basic services.

Definition at line 41 of file dialog.h.

Constructor & Destructor Documentation

gcu::Dialog::Dialog ( Application App,
const char *  windowname,
DialogOwner owner = NULL 
) throw (std::runtime_error)
Parameters
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 gcu::Dialog::~Dialog ( )
virtual

The destructor

Reimplemented in gcugtk::Dialog.

Member Function Documentation

virtual void gcu::Dialog::Destroy ( )
pure virtual

Destroys the dialog. This is a pure virtual function and derived classes must implement it.

Implemented in gcugtk::Dialog.

gcu::Dialog::GetApp ( void  )
inline
Returns
the Application instance owning the dialog.

Definition at line 102 of file dialog.h.

std::string& gcu::Dialog::GetWindowName ( )
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.

Returns
the dialog window name.

Definition at line 88 of file dialog.h.

virtual void gcu::Dialog::Present ( )
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)
Parameters
namea new name for the window.
ownerthe 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.

Member Data Documentation

gcu::Dialog::m_App
protected

The Application instance owning the dialog.

Definition at line 102 of file dialog.h.


The documentation for this class was generated from the following file: