Public Member Functions | |
Application (std::string name, std::string datadir=DATADIR, char const *help_name=NULL, char const *icon_name=NULL) | |
void | OnHelp (std::string s="") |
bool | HasHelp () |
std::string & | GetName () |
virtual GtkWindow * | GetWindow () |
virtual bool | FileProcess (const gchar *filename, const gchar *mime_type, bool bSave, GtkWindow *window, Document *pDoc=NULL) |
char const * | GetCurDir () |
void | SetCurDir (char const *dir) |
void | SetCurDir (std::string const &dir) |
void | ShowURI (std::string &uri) |
void | OnBug (char const *uri=PACKAGE_BUGREPORT) |
void | OnWeb (char const *uri="http://gchemutils.nongnu.org/") |
void | OnMail (char const *MailAddress="mailto:gchemutils-main@nongnu.org") |
bool | HasMailAgent () |
bool | HasWebBrowser () |
GtkWidget * | GetImageResolutionWidget () |
GtkWidget * | GetImageSizeWidget () |
std::map< std::string, GdkPixbufFormat * > & | GetSupportedPixbufFormats () |
char const * | GetPixbufTypeName (std::string &filename, char const *mime_type) |
Protected Member Functions | |
virtual void | NoMoreDocsEvent () |
Protected Attributes | |
std::map< std::string, GdkPixbufFormat * > | m_SupportedPixbufFormats |
Definition at line 50 of file gcu/application.h.
gcu::Application::Application | ( | std::string | name, | |
std::string | datadir = DATADIR , |
|||
char const * | help_name = NULL , |
|||
char const * | icon_name = 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. |
void gcu::Application::OnHelp | ( | std::string | s = "" |
) |
s | an optional tag in the help file. Displays the help file using the file browser retrieved from GConf using the "/desktop/gnome/applications/help_viewer/exec" key. If a tag is given, it will be added to the help uri. For an application named "myapp" and a tag "mytag", the uri will be: helpfilename#myapp-mytag. |
bool gcu::Application::HasHelp | ( | ) |
std::string& gcu::Application::GetName | ( | ) | [inline] |
Definition at line 85 of file gcu/application.h.
virtual GtkWindow* gcu::Application::GetWindow | ( | ) | [inline, virtual] |
Definition at line 90 of file gcu/application.h.
virtual bool gcu::Application::FileProcess | ( | const gchar * | filename, | |
const gchar * | mime_type, | |||
bool | bSave, | |||
GtkWindow * | window, | |||
Document * | pDoc = NULL | |||
) | [inline, virtual] |
filename | the uri of the file. | |
mime_type | the mime type of the file if known. | |
bSave | true if saving, and false if loading. | |
window | the current top level window. | |
pDoc | an optional document. |
Definition at line 105 of file gcu/application.h.
char const* gcu::Application::GetCurDir | ( | ) | [inline] |
void gcu::Application::SetCurDir | ( | char const * | dir | ) |
dir | the path to the new current directory. |
void gcu::Application::SetCurDir | ( | std::string const & | dir | ) |
dir | the path to the new current directory. |
void gcu::Application::ShowURI | ( | std::string & | uri | ) |
void gcu::Application::OnBug | ( | char const * | uri = PACKAGE_BUGREPORT |
) | [inline] |
uri | the uri to the package bugs database. Default value is PACKAGE_BUGREPORT. |
Definition at line 135 of file gcu/application.h.
References ShowURI().
void gcu::Application::OnWeb | ( | char const * | uri = "http://gchemutils.nongnu.org/" |
) | [inline] |
uri | the uri to the main web page of the program. Default value is "http://gchemutils.nongnu.org/". |
Definition at line 142 of file gcu/application.h.
References ShowURI().
void gcu::Application::OnMail | ( | char const * | MailAddress = "mailto:gchemutils-main@nongnu.org" |
) |
MailAddress | the mail adress to which a message will be sent. Defaults to the Gnome Chemistry Utils main list. |
bool gcu::Application::HasMailAgent | ( | ) | [inline] |
Definition at line 156 of file gcu/application.h.
bool gcu::Application::HasWebBrowser | ( | ) | [inline] |
Definition at line 161 of file gcu/application.h.
GtkWidget* gcu::Application::GetImageResolutionWidget | ( | ) |
GtkWidget* gcu::Application::GetImageSizeWidget | ( | ) |
std::map<std::string, GdkPixbufFormat*>& gcu::Application::GetSupportedPixbufFormats | ( | ) | [inline] |
Definition at line 178 of file gcu/application.h.
References m_SupportedPixbufFormats.
char const* gcu::Application::GetPixbufTypeName | ( | std::string & | filename, | |
char const * | mime_type | |||
) |
filename | the file name. | |
mime_type | the file mime type. |
virtual void gcu::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.
Definition at line 204 of file gcu/application.h.
std::map<std::string, GdkPixbufFormat*> gcu::Application::m_SupportedPixbufFormats [protected] |
std::map of the supported pixbuf formats. Keys are the mime type names.
Definition at line 226 of file gcu/application.h.
Referenced by GetSupportedPixbufFormats().