The Document is like the 'Model' in the Model-View-Controller framework.
More...
#include <Document.h>
|
static Glib::ustring | util_file_uri_get_name (const Glib::ustring &file_uri, const Glib::ustring &file_extension) |
|
The Document is like the 'Model' in the Model-View-Controller framework.
Each App should have a Document. Each View gets and sets data in its document.
◆ type_signal_forget
◆ type_signal_modified
For instance, void on_document_modified(bool modified);.
◆ Document()
Bakery::Document::Document |
( |
| ) |
|
◆ ~Document()
virtual Bakery::Document::~Document |
( |
| ) |
|
|
virtual |
◆ get_contents()
virtual Glib::ustring Bakery::Document::get_contents |
( |
| ) |
const |
|
virtual |
◆ get_file_extension()
virtual Glib::ustring Bakery::Document::get_file_extension |
( |
| ) |
const |
|
virtual |
◆ get_file_uri()
virtual Glib::ustring Bakery::Document::get_file_uri |
( |
| ) |
const |
|
virtual |
◆ get_file_uri_with_extension()
virtual Glib::ustring Bakery::Document::get_file_uri_with_extension |
( |
const Glib::ustring & |
uri | ) |
|
|
virtual |
◆ get_is_new()
virtual bool Bakery::Document::get_is_new |
( |
| ) |
const |
|
virtual |
Whether this just a default document.
◆ get_modified()
virtual bool Bakery::Document::get_modified |
( |
| ) |
const |
|
virtual |
◆ get_name()
virtual Glib::ustring Bakery::Document::get_name |
( |
| ) |
const |
|
virtual |
Gets filename part of file_uri, or 'untitled'.
◆ get_read_only()
virtual bool Bakery::Document::get_read_only |
( |
| ) |
const |
|
virtual |
◆ get_view()
virtual ViewBase* Bakery::Document::get_view |
( |
| ) |
|
|
virtual |
◆ load()
bool Bakery::Document::load |
( |
| ) |
|
◆ load_after()
virtual bool Bakery::Document::load_after |
( |
| ) |
|
|
protectedvirtual |
Allow app to update icons/title bar.
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.
◆ load_from_data()
bool Bakery::Document::load_from_data |
( |
const guchar * |
data, |
|
|
std::size_t |
length |
|
) |
| |
◆ read_from_disk()
virtual bool Bakery::Document::read_from_disk |
( |
| ) |
|
|
protectedvirtual |
◆ save()
bool Bakery::Document::save |
( |
| ) |
|
◆ save_before()
virtual bool Bakery::Document::save_before |
( |
| ) |
|
|
protectedvirtual |
overrideable.
Does anything which should be done before the view has saved its data, before writing to disk..
Reimplemented in Bakery::Document_XML.
◆ set_contents()
virtual void Bakery::Document::set_contents |
( |
const Glib::ustring & |
strVal | ) |
|
|
virtual |
◆ set_file_extension()
virtual void Bakery::Document::set_file_extension |
( |
const Glib::ustring & |
strVal | ) |
|
|
virtual |
◆ set_file_uri()
virtual void Bakery::Document::set_file_uri |
( |
const Glib::ustring & |
file_uri, |
|
|
bool |
bEnforceFileExtension = false |
|
) |
| |
|
virtual |
◆ set_is_new()
void Bakery::Document::set_is_new |
( |
bool |
bVal | ) |
|
◆ set_modified()
virtual void Bakery::Document::set_modified |
( |
bool |
bVal = true | ) |
|
|
virtual |
◆ set_read_only()
virtual void Bakery::Document::set_read_only |
( |
bool |
bVal | ) |
|
|
virtual |
◆ set_view()
virtual void Bakery::Document::set_view |
( |
ViewBase * |
pView | ) |
|
|
virtual |
◆ signal_forget()
This signal is emitted when the view should forget the document.
This is used internally, and you should not need to use it yourself.
◆ signal_modified()
This signal is emitted when the document has been modified.
It allows the view to update itself to show the new information.
◆ util_file_uri_get_name()
static Glib::ustring Bakery::Document::util_file_uri_get_name |
( |
const Glib::ustring & |
file_uri, |
|
|
const Glib::ustring & |
file_extension |
|
) |
| |
|
static |
◆ write_to_disk()
virtual bool Bakery::Document::write_to_disk |
( |
| ) |
|
|
protectedvirtual |
◆ m_bIsNew
bool Bakery::Document::m_bIsNew |
|
protected |
◆ m_bModified
bool Bakery::Document::m_bModified |
|
protected |
◆ m_bReadOnly
bool Bakery::Document::m_bReadOnly |
|
protected |
◆ m_file_extension
Glib::ustring Bakery::Document::m_file_extension |
|
protected |
◆ m_file_uri
Glib::ustring Bakery::Document::m_file_uri |
|
protected |
◆ m_pView
◆ m_strContents
Glib::ustring Bakery::Document::m_strContents |
|
protected |
◆ signal_forget_
◆ signal_modified_
The documentation for this class was generated from the following file: