The Gnome Chemistry Utils
0.14.0
|
error output channel. More...
#include <gcu/cmd-context.h>
Public Types | |
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... |
Public Member Functions | |
CmdContext (Application *App) | |
virtual | ~CmdContext () |
virtual Response | GetResponse (char const *message, int responses)=0 |
virtual void | Message (char const *message, Severity severity, bool modal)=0 |
GOIOContext * | GetNewGOIOContext () |
GOCmdContext * | GetGOCmdContext (void) |
Application * | GetApp (void) |
Protected Attributes | |
GOCmdContext * | m_GOCmdContext |
Application * | m_App |
error output channel.
This class is used to display errors. It uses a GOCmdContext from Goffice internally. This class is actually a virtual base class.
Definition at line 42 of file cmd-context.h.
Responses which might be proposed to the user.
gcu/cmd-context.h This enum list the various answers that might be proposed to the user in case an error occured.
Definition at line 63 of file cmd-context.h.
Error severity.
gcu/cmd-context.h This enum list the severity of the errors that might occur.
SeverityMessage |
A simple information. |
SeverityWarning |
A warning: something wrong occured but the program can proceed anyway. |
SeverityError |
An error: the program can't do what was requested. |
Definition at line 95 of file cmd-context.h.
gcu::CmdContext::CmdContext | ( | Application * | App | ) |
App | the application for which the CmdContext is created. |
Initializes a CmdContext and attach it to App.
|
virtual |
The destructor.
|
inline |
Definition at line 152 of file cmd-context.h.
|
inline |
Definition at line 144 of file cmd-context.h.
GOIOContext* gcu::CmdContext::GetNewGOIOContext | ( | ) |
Just calls go_io_context_new().
|
pure 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.
Implemented in gcugtk::CmdContextGtk.
|
pure 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. This method is pure virtual and must be implemented in derived classes.
Implemented in gcugtk::CmdContextGtk.
|
protected |
The Application instance associated with the CmdContext.
Definition at line 152 of file cmd-context.h.
|
protected |
The associated GOCmdContext.
Definition at line 144 of file cmd-context.h.