The Gnome Chemistry Utils  0.14.0
Public Member Functions | List of all members
gcugtk::CmdContextGtk Class Reference

A Gtk+ using gcu::CmdContext implementation. More...

#include <gcugtk/cmd-context-gtk.h>

Inheritance diagram for gcugtk::CmdContextGtk:
gcu::CmdContext

Public Member Functions

 CmdContextGtk (Application *App)
virtual ~CmdContextGtk ()
Response GetResponse (char const *message, int responses)
void Message (char const *message, Severity severity, bool modal)
- Public Member Functions inherited from gcu::CmdContext
 CmdContext (Application *App)
virtual ~CmdContext ()
GOIOContext * GetNewGOIOContext ()
GOCmdContext * GetGOCmdContext (void)
ApplicationGetApp (void)

Additional Inherited Members

- Public Types inherited from gcu::CmdContext
enum  Response {
  ResponseDefault, ResponseOK = 1 << 0, ResponseCancel = 1 << 1, ResponseYes = 1 << 2,
  ResponseNo = 1 << 3, ResponseClose = 1 << 4
}
 Responses which might be proposed to the user. More...
enum  Severity { SeverityMessage, SeverityWarning, SeverityError }
 Error severity. More...
- Protected Attributes inherited from gcu::CmdContext
GOCmdContext * m_GOCmdContext
Applicationm_App

Detailed Description

A Gtk+ using gcu::CmdContext implementation.

This class uses GtkMessageBox dialogs to interact with the user.

Definition at line 36 of file cmd-context-gtk.h.

Constructor & Destructor Documentation

gcugtk::CmdContextGtk::CmdContextGtk ( Application App)
Parameters
Appthe application owning the command context.

The constructor.

virtual gcugtk::CmdContextGtk::~CmdContextGtk ( )
virtual

The destructor.

Member Function Documentation

Response gcugtk::CmdContextGtk::GetResponse ( char const *  message,
int  responses 
)
virtual
Parameters
messagethe message string.
responsesthe responses that are meaningful such as 'ResponseYes | ResponseNo'.

Ask a question to the user about what should be done. A message box is displayed showing the message and with a button for each bit in the response bits field.

Returns
the response chosen by the user.

Implements gcu::CmdContext.

void gcugtk::CmdContextGtk::Message ( char const *  message,
Severity  severity,
bool  modal 
)
virtual
Parameters
messagethe message string.
severitythe Severity of the situation.
modalwhether the message should block the program execution or not.

Inform the user of an abnormal situation using a message box with an icon corresponding to severity and a 'Close' button. This method is pure virtual and must be implemented in derived classes.

Implements gcu::CmdContext.


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