The Gnome Chemistry Utils
0.13.6
|
#include <gcugtk/application.h>
Public Member Functions | |
Application (std::string name, std::string datadir=DATADIR, char const *help_name=NULL, char const *icon_name=NULL, CmdContextGtk *cc=NULL) | |
virtual | ~Application () |
GtkWidget * | GetImageResolutionWidget () |
GtkWidget * | GetImageSizeWidget () |
virtual void | ReceiveTargets (G_GNUC_UNUSED GtkClipboard *clipboard, G_GNUC_UNUSED GtkSelectionData *selection_data) |
GtkRecentManager * | GetRecentManager (void) const |
Static Public Member Functions | |
static WindowState | GetDefaultWindowState () |
static void | OnReceiveTargets (GtkClipboard *clipboard, GtkSelectionData *selection_data, Application *App) |
Protected Member Functions | |
virtual void | NoMoreDocsEvent () |
void | CreateDefaultCmdContext () |
bool | LoopRunning () |
This class is a base class for applications. It provides some basic services.
Definition at line 86 of file gcugtk/application.h.
gcugtk::Application::Application | ( | std::string | name, |
std::string | datadir = DATADIR , |
||
char const * | help_name = NULL , |
||
char const * | icon_name = NULL , |
||
CmdContextGtk * | cc = NULL |
||
) |
name | the name of the application. |
datadir | where data for the application are stored. |
help_name | the name to use for the help file (with .xml extension). If NULL, the name parameter is used. |
icon_name | the name to use for the default icon of all windows. If NULL, the help_name or name parameters will be used. |
cc | the associated CmdContextGtk. |
The datadir variable is used to build the full path to the help file: "file://"+datadir+"/gnome/help/"+name+"/"+LANG+"/"+name".xml".
virtual gcugtk::Application::~Application | ( | ) | [virtual] |
void gcugtk::Application::CreateDefaultCmdContext | ( | ) | [protected, virtual] |
Creates a default GtkCmdContext instance for the application.
Reimplemented from gcu::Application.
static WindowState gcugtk::Application::GetDefaultWindowState | ( | ) | [inline, static] |
Definition at line 111 of file gcugtk/application.h.
GtkWidget* gcugtk::Application::GetImageResolutionWidget | ( | ) |
GtkWidget* gcugtk::Application::GetImageSizeWidget | ( | ) |
gcugtk::Application::GetRecentManager | ( | void | ) | const [inline] |
Definition at line 173 of file gcugtk/application.h.
bool gcugtk::Application::LoopRunning | ( | ) | [inline, protected, virtual] |
Reimplemented from gcu::Application.
Definition at line 165 of file gcugtk/application.h.
virtual void gcugtk::Application::NoMoreDocsEvent | ( | ) | [inline, protected, virtual] |
This method is called by the framework when all the documents have been removed from the set of opened documents. The default behavior is to call gtk_main_quit and exit the program. Derived class might overide this method to change this.
Reimplemented from gcu::Application.
Definition at line 155 of file gcugtk/application.h.
static void gcugtk::Application::OnReceiveTargets | ( | GtkClipboard * | clipboard, |
GtkSelectionData * | selection_data, | ||
Application * | App | ||
) | [inline, static] |
clipboard | a GtkClipboard |
selection_data | the current GtkSelectionData |
App | the Application target |
Static callback to pass as third argument to gtk_clipboard_request_contents(). App must be used as fourth argument (user_data).
Definition at line 143 of file gcugtk/application.h.
References ReceiveTargets().
virtual void gcugtk::Application::ReceiveTargets | ( | G_GNUC_UNUSED GtkClipboard * | clipboard, |
G_GNUC_UNUSED GtkSelectionData * | selection_data | ||
) | [inline, virtual] |
clipboard | a GtkClipboard |
selection_data | the current GtkSelectionData |
The virtual member called by OnReceiveTargets(). The defaullt implementation does nothing. This method should be overriden for derived classes supporting clipboard operations.
Definition at line 133 of file gcugtk/application.h.
Referenced by OnReceiveTargets().