The Gnome Chemistry Utils
0.14.0
|
A Gtk+ using gcu::CmdContext implementation. More...
#include <gcugtk/cmd-context-gtk.h>
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) |
Application * | GetApp (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 |
Application * | m_App |
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.
gcugtk::CmdContextGtk::CmdContextGtk | ( | Application * | App | ) |
App | the application owning the command context. |
The constructor.
|
virtual |
The destructor.
|
virtual |
message | the message string. |
responses | the 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.
Implements gcu::CmdContext.
|
virtual |
message | the message string. |
severity | the Severity of the situation. |
modal | whether 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.