#include <App_WithDoc.h>
Inheritance diagram for Bakery::App_WithDoc:
Public Types | |
enum | enumSaveChanges { SAVECHANGES_Save, SAVECHANGES_Cancel, SAVECHANGES_Discard } |
Public Member Functions | |
App_WithDoc (const Glib::ustring &appname="") | |
Don't forget to call init() too. | |
virtual | ~App_WithDoc () |
virtual void | init () |
virtual void | on_menu_file_open () |
virtual void | on_menu_file_saveas () |
virtual void | offer_saveas () |
virtual void | on_menu_file_save () |
virtual void | on_menu_file_close () |
virtual void | on_menu_edit_copy () |
virtual void | on_menu_edit_paste () |
virtual void | on_menu_edit_clear () |
Protected Types | |
typedef std::list< Glib::ustring > | type_list_strings |
Protected Member Functions | |
virtual void | init_create_document () |
virtual Document * | get_document () |
static_cast<> or dynamic_cast<> this pointer to the correct type. | |
virtual const Document * | get_document () const |
static_cast<> or dynamic_cast<> this pointer to the correct type. | |
virtual void | set_document_modified (bool bModified=true) |
virtual bool | open_document (const Glib::ustring &file_uri) |
bool indicates success. | |
virtual void | document_history_add (const Glib::ustring &file_uri) |
virtual void | document_history_remove (const Glib::ustring &file_uri) |
virtual void | on_document_modified (bool modified) |
Update visual status. | |
virtual bool | on_document_load () |
override this to show document contents. | |
virtual void | offer_to_save_changes () |
virtual void | cancel_close_or_exit () |
Stop the File|Close or the File|Exit. | |
virtual void | close_mark_or_destroy () |
destroy it or mark it for destruction. | |
virtual void | update_window_title () |
virtual void | after_successful_save () |
virtual void | ui_warning (const Glib::ustring &text)=0 |
virtual Glib::ustring | ui_file_select_open ()=0 |
virtual Glib::ustring | ui_file_select_save (const Glib::ustring &old_file_uri)=0 |
Present a user interface that allows the user to select a location to save the file. | |
virtual void | ui_show_modification_status ()=0 |
virtual enumSaveChanges | ui_offer_to_save_changes ()=0 |
virtual bool | ui_ask_overwrite (const std::string &file_uri)=0 |
Static Protected Member Functions | |
void | add_mime_type (const Glib::ustring &mime_type) |
Add a MIME-type that this application can support. | |
Glib::ustring | get_conf_fullkey (const Glib::ustring &key) |
Protected Attributes | |
Document * | m_pDocument |
bool | m_bCloseAfterSave |
Static Protected Attributes | |
type_list_strings | m_mime_types |
This is an abstract class. You must use a class such as App_WithDoc_Gtk, which implements the ui_* methods for a particular GUI toolkit.
Features:
TODO: Bonobo integration - when Bonobo is ready. (An App subclass?)
|
|
|
|
|
Don't forget to call init() too.
|
|
|
|
Add a MIME-type that this application can support. You should also register the MIME-type when the application is installed: See http://freedesktop.org/Standards/AddingMIMETutor |
|
|
|
Stop the File|Close or the File|Exit.
|
|
destroy it or mark it for destruction.
|
|
Reimplemented in Bakery::App_WithDoc_Gtk. |
|
Reimplemented in Bakery::App_WithDoc_Gtk. |
|
|
|
static_cast<> or dynamic_cast<> this pointer to the correct type.
|
|
static_cast<> or dynamic_cast<> this pointer to the correct type.
|
|
Reimplemented from Bakery::App. Reimplemented in Bakery::App_WithDoc_Gtk. |
|
|
|
|
|
|
|
override this to show document contents.
|
|
Update visual status.
|
|
Reimplemented from Bakery::App. |
|
Reimplemented from Bakery::App. |
|
Reimplemented from Bakery::App. |
|
Reimplemented from Bakery::App. |
|
|
|
|
|
|
|
bool indicates success.
|
|
|
|
Implemented in Bakery::App_WithDoc_Gtk. |
|
Implemented in Bakery::App_WithDoc_Gtk. |
|
Present a user interface that allows the user to select a location to save the file.
Implemented in Bakery::App_WithDoc_Gtk. |
|
Implemented in Bakery::App_WithDoc_Gtk. |
|
Implemented in Bakery::App_WithDoc_Gtk. |
|
Implemented in Bakery::App_WithDoc_Gtk. |
|
Reimplemented in Bakery::App_WithDoc_Gtk. |
|
|
|
|
|
|