#include <Document.h>
Inheritance diagram for Bakery::Document:
Public Types | |
typedef SigC::Signal0< void > | type_signal_modified |
Public Member Functions | |
Document () | |
virtual | ~Document () |
virtual bool | save () |
virtual bool | load () |
virtual bool | get_modified () const |
virtual void | set_modified (bool bVal=true) |
virtual bool | get_is_new () const |
Whether this just a default document. | |
void | set_is_new (bool bVal) |
Called by App_WithDoc::init_create_document(). | |
virtual Glib::ustring | get_contents () const |
virtual void | set_contents (const Glib::ustring &strVal) |
virtual Glib::ustring | get_filepath () const |
virtual void | set_filepath (const Glib::ustring &strVal, bool bEnforceFileExtension=false) |
virtual Glib::ustring | get_name () const |
Gets filename part of filepath, or 'untitled'. | |
virtual bool | get_read_only () const |
virtual void | set_read_only (bool bVal) |
virtual void | set_view (ViewBase *pView) |
If you don't want to use a View, then don't use set_view(). | |
virtual ViewBase * | get_view () |
virtual void | set_file_extension (const Glib::ustring &strVal) |
virtual Glib::ustring | get_file_extension () const |
type_signal_modified & | signal_modified () |
Static Public Member Functions | |
Glib::ustring | util_filepath_get_name (const Glib::ustring &filePath) |
Protected Member Functions | |
virtual bool | load_after () |
overrideable. | |
virtual bool | save_before () |
overrideable. | |
virtual bool | read_from_disk () |
virtual bool | write_to_disk () |
Protected Attributes | |
Glib::ustring | m_strContents |
Glib::ustring | m_strFilePath |
Glib::ustring | m_strFileExtension |
ViewBase * | m_pView |
type_signal_modified | signal_modified_ |
bool | m_bModified |
bool | m_bIsNew |
bool | m_bReadOnly |
Each App should have a Document. Each View gets and sets data in its document.
|
|
|
|
|
|
|
|
|
|
|
|
|
Whether this just a default document.
|
|
|
|
Gets filename part of filepath, or 'untitled'.
|
|
|
|
|
|
|
|
overrideable. Does anything which should be done after the data has been loaded from disk, but before updating the View. Reimplemented in Bakery::Document_XML. |
|
|
|
|
|
overrideable. Does anything which should be done before the view has saved its data, before writing to disk.. Reimplemented in Bakery::Document_XML. |
|
|
|
|
|
|
|
Called by App_WithDoc::init_create_document().
|
|
|
|
|
|
If you don't want to use a View, then don't use set_view().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|