Inherited by XGP::XInfoApplication.
Public Member Functions | |
| XApplication (const char *pTitle) | |
| ~XApplication () | |
Static Public Member Functions | |
| static void | initI18n () |
| static void | initI18n (const char *package, const char *dir) |
Protected Types | |
| typedef boost::scoped_ptr < Gtk::VBox > | PVBox |
Protected Member Functions | |
| virtual void | setIconProgram (const guint8 *iconData, int lenData) |
| Gtk::VBox * | getClient () const |
| void | addHelpMenu (Glib::ustring &uiString, bool withDynTrace=false) |
Help menu handling | |
| virtual const char * | getHelpfile () |
| virtual void | showAboutbox () |
| void | showHelp () |
| void | selectHelpBrowser () |
| void | showTraceObjects () |
Protected Attributes | |
| PVBox | vboxClient |
| Glib::RefPtr< Gtk::ActionGroup > | grpAction |
| Glib::RefPtr< Gtk::UIManager > | mgrUI |
| Glib::ustring | helpBrowser |
Furthermore there exists the posibility to add a help-menu consisting of:
To get the last two entries, the getHelpfile() method must not return NULL.
The following algorithm is used to determine the help file to display:
/) and does not specify the file-protocoll (starting with file://), just pass the filename to the browser.LANGUAGE is not empty, take that value, else the locale settings (LC_MESSAGES).de_AT to de).typedef boost::scoped_ptr<Gtk::VBox> XGP::XApplication::PVBox [protected] |
Smart pointer for a vbox.
| XGP::XApplication::XApplication | ( | const char * | pTitle | ) |
Constructor; creates a program-window showing only an empty menu and an area (a GTK::VBox) for the client.
Furthermore SIGSEGV and SIGBUS signals are trapped to produce a stackdump in the log file.
| pTitle | Pointer to title of the application |
| XGP::XApplication::~XApplication | ( | ) |
Destructor.
| void XGP::XApplication::addHelpMenu | ( | Glib::ustring & | uiString, | |
| bool | withDynTrace = false | |||
| ) | [protected] |
Adds a help-menu at the end of the menu.
This menu consists of an "About"-entry and - if the method getHelpfile() does return a value - entries to display a help-file and to configure the help browser.
Additionally an entry to show a dialog enabling to change the trace-level dynamically is added, if withDynTrace is set to true.
| uiString | String, to which the menu-structure is appended | |
| withDynTrace | Flag, if an entry to show the trace-window should be added |
| Gtk::VBox* XGP::XApplication::getClient | ( | ) | const [inline, protected] |
Returns the client window.
| const char * XGP::XApplication::getHelpfile | ( | ) | [protected, virtual] |
Returns the name of the help file to display.
| void XGP::XApplication::initI18n | ( | const char * | package, | |
| const char * | dir | |||
| ) | [static] |
Initializes the program for internationalization by setting the locale and loading the messagefile.
| package | Name of the message-catalog | |
| dir | Root-directory for message-catalogs |
| void XGP::XApplication::initI18n | ( | ) | [static] |
Initializes the program for localization by setting the locale and loading the messagefile.
| void XGP::XApplication::selectHelpBrowser | ( | ) | [protected] |
Shows the dialog to select the browser to display the help.
| void XGP::XApplication::setIconProgram | ( | const guint8 * | pIconData, | |
| int | lenData | |||
| ) | [protected, virtual] |
Sets the program icon which is used by some window managers when minimising the program.
| pIconData | Array of characters describing the icon (inline format) | |
| lenData,: | Length of inline data |
Reimplemented in XGP::XInfoApplication.
| void XGP::XApplication::showAboutbox | ( | ) | [protected, virtual] |
Displays the about box. See also XAbout for a dialog implementing one.
| void XGP::XApplication::showHelp | ( | ) | [protected] |
Shows the help to the program.
| void XGP::XApplication::showTraceObjects | ( | ) | [protected] |
Shows the dialog to set the levels of the dynamic trace.
Glib::RefPtr<Gtk::ActionGroup> XGP::XApplication::grpAction [protected] |
Actions of the application.
Glib::ustring XGP::XApplication::helpBrowser [protected] |
Name of the browser to show the help.
Glib::RefPtr<Gtk::UIManager> XGP::XApplication::mgrUI [protected] |
UI-manager.
PVBox XGP::XApplication::vboxClient [protected] |
Client window of the application.