# Bakery::App Class Reference

Bakery's Main Window. More...

`#include <App.h>`

Inheritance diagram for Bakery::App:

[legend]

List of all members.

## Public Types
typedef std::vector < Glib::ustring > | type_vecStrings
typedef sigc::signal< void > | type_signal_hide
## Public Member Functions
| App (const Glib::ustring &appname=Glib::ustring())
| Don't forget to call init() too.
virtual | ~App ()
virtual void | init ()
virtual Glib::ustring | get_version () const
type_signal_hide | ui_signal_hide ()
virtual void | on_menu_file_new ()
virtual void | on_menu_file_close ()
virtual void | on_menu_file_exit ()
virtual void | on_menu_edit_cut ()
virtual void | on_menu_edit_copy ()
virtual void | on_menu_edit_paste ()
virtual void | on_menu_edit_clear ()
virtual void | on_menu_help_about ()=0
virtual void | on_about_close ()
## Static Public Member Functions
static void | set_about_information (const Glib::ustring &strVersion, const type_vecStrings &vecAuthors, const Glib::ustring &strCopyright, const Glib::ustring &strDescription)
static void | set_about_information (const Glib::ustring &strVersion, const type_vecStrings &vecAuthors, const Glib::ustring &strCopyright, const Glib::ustring &strDescription, const type_vecStrings &vecDocumenters, const Glib::ustring &strTranslatorCredits)
static void | set_command_line_args (int argc, char **&argv)
## Protected Member Functions
virtual void | init_ui_manager ()
| Builds the intial ui string, with placeholders.
virtual void | init_menus ()
| Override this to add more menus or different menus.
virtual void | init_menus_file ()=0
| Call this from init_menus() to add the standard file menu.
virtual void | init_menus_edit ()=0
| Call this from init_menus() to add the standard edit menu.
virtual void | init_menus_help ()=0
| Call this from init_menus() to add the standard help menu.
virtual void | init_toolbars ()
virtual App * | new_instance ()=0
virtual void | ui_hide ()=0
virtual void | ui_bring_to_front ()=0
## Static Protected Member Functions
static void | init_app_name (const Glib::ustring &appname)
static void | set_operation_cancelled (bool bVal=true)
static bool | get_operation_cancelled ()
## Protected Attributes
type_signal_hide | m_signal_hide
## Static Protected Attributes
static Glib::ustring | m_strAppName
static HelpInfo | m_HelpInfo
static AppInstanceManager | m_AppInstanceManager
static bool | m_bOperationCancelled
static bool | m_bAboutShown
static Glib::ustring | m_strCommandLine_0
## Friends
class | AppInstanceManager

## Detailed Description

Bakery's Main Window.

This is an abstract class. You must use a class such as App_Gtk, which implements the ui_* methods for a particular GUI toolkit.

Features:

- Override methods to add/change menus/toolbars/statusbar.
  - Default is basic File, Edit, Help menus and toolbar icons.
- Configurable about box via set_about_information().

TODO:

- Command-line args - wrap popt?
- Session Management - need Command-line args.

## Member Typedef Documentation

typedef std::vector<Glib::ustring> Bakery::App::type_vecStrings

typedef sigc::signal<void> Bakery::App::type_signal_hide

## Constructor & Destructor Documentation

Bakery::App::App | ( | const Glib::ustring & | appname = `Glib::ustring()` | ) |

Don't forget to call init() too.

virtual Bakery::App::~App | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual void Bakery::App::init | ( |  | ) | `[virtual]`

Reimplemented in Bakery::App_Gtk, Bakery::App_WithDoc, and Bakery::App_WithDoc_Gtk.

static void Bakery::App::set_about_information | ( | const Glib::ustring & | strVersion,
|  | const type_vecStrings & | vecAuthors,
|  | const Glib::ustring & | strCopyright,
|  | const Glib::ustring & | strDescription |
| ) |  |  | `[static]`

static void Bakery::App::set_about_information | ( | const Glib::ustring & | strVersion,
|  | const type_vecStrings & | vecAuthors,
|  | const Glib::ustring & | strCopyright,
|  | const Glib::ustring & | strDescription,
|  | const type_vecStrings & | vecDocumenters,
|  | const Glib::ustring & | strTranslatorCredits |
| ) |  |  | `[static]`

virtual Glib::ustring Bakery::App::get_version | ( |  | ) | const`[virtual]`

static void Bakery::App::set_command_line_args | ( | int | argc,
|  | char **& | argv |
| ) |  |  | `[static]`

type_signal_hide Bakery::App::ui_signal_hide | ( |  | ) |

static void Bakery::App::init_app_name | ( | const Glib::ustring & | appname | ) | `[static, protected]`

virtual void Bakery::App::init_ui_manager | ( |  | ) | `[protected, virtual]`

Builds the intial ui string, with placeholders.

This allows us to merge in actual menus and toolbars in the other init_*() methods.

Reimplemented in Bakery::App_Gtk.

virtual void Bakery::App::init_menus | ( |  | ) | `[protected, virtual]`

Override this to add more menus or different menus.

Reimplemented in Bakery::App_Gtk.

virtual void Bakery::App::init_menus_file | ( |  | ) | `[protected, pure virtual]`

Call this from init_menus() to add the standard file menu.

Implemented in Bakery::App_Gtk, and Bakery::App_WithDoc_Gtk.

virtual void Bakery::App::init_menus_edit | ( |  | ) | `[protected, pure virtual]`

Call this from init_menus() to add the standard edit menu.

Implemented in Bakery::App_Gtk.

virtual void Bakery::App::init_menus_help | ( |  | ) | `[protected, pure virtual]`

Call this from init_menus() to add the standard help menu.

Implemented in Bakery::App_Gtk.

virtual void Bakery::App::init_toolbars | ( |  | ) | `[protected, virtual]`

Reimplemented in Bakery::App_Gtk, and Bakery::App_WithDoc_Gtk.

virtual App* Bakery::App::new_instance | ( |  | ) | `[protected, pure virtual]`

virtual void Bakery::App::on_menu_file_new | ( |  | ) | `[virtual]`

virtual void Bakery::App::on_menu_file_close | ( |  | ) | `[virtual]`

Reimplemented in Bakery::App_WithDoc.

virtual void Bakery::App::on_menu_file_exit | ( |  | ) | `[virtual]`

virtual void Bakery::App::on_menu_edit_cut | ( |  | ) | `[virtual]`

virtual void Bakery::App::on_menu_edit_copy | ( |  | ) | `[virtual]`

Reimplemented in Bakery::App_WithDoc.

virtual void Bakery::App::on_menu_edit_paste | ( |  | ) | `[virtual]`

Reimplemented in Bakery::App_WithDoc.

virtual void Bakery::App::on_menu_edit_clear | ( |  | ) | `[virtual]`

Reimplemented in Bakery::App_WithDoc.

virtual void Bakery::App::on_menu_help_about | ( |  | ) | `[pure virtual]`

Implemented in Bakery::App_Gtk.

virtual void Bakery::App::on_about_close | ( |  | ) | `[virtual]`

Reimplemented in Bakery::App_Gtk.

virtual void Bakery::App::ui_hide | ( |  | ) | `[protected, pure virtual]`

Implemented in Bakery::App_Gtk.

virtual void Bakery::App::ui_bring_to_front | ( |  | ) | `[protected, pure virtual]`

Implemented in Bakery::App_Gtk.

static void Bakery::App::set_operation_cancelled | ( | bool | bVal = `true` | ) | `[static, protected]`

static bool Bakery::App::get_operation_cancelled | ( |  | ) | `[static, protected]`

## Friends And Related Function Documentation

friend class AppInstanceManager`[friend]`

Reimplemented in Bakery::App_Gtk.

## Member Data Documentation

Glib::ustring Bakery::App::m_strAppName`[static, protected]`

HelpInfo Bakery::App::m_HelpInfo`[static, protected]`

AppInstanceManager Bakery::App::m_AppInstanceManager`[static, protected]`

bool Bakery::App::m_bOperationCancelled`[static, protected]`

bool Bakery::App::m_bAboutShown`[static, protected]`

Glib::ustring Bakery::App::m_strCommandLine_0`[static, protected]`

type_signal_hide Bakery::App::m_signal_hide`[protected]`

The documentation for this class was generated from the following file:

- App.h