The Document is like the 'Model' in the Model-View-Controller framework. More...
|
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.
For instance, void on_document_modified(bool modified);.
Enumerator |
---|
LOAD_FAILURE_CODE_NONE |
|
LOAD_FAILURE_CODE_NOT_FOUND |
|
LOAD_FAILURE_CODE_LAST |
|
GlomBakery::Document::Document |
( |
| ) |
|
virtual GlomBakery::Document::~Document |
( |
| ) |
|
|
virtual |
Glib::ustring GlomBakery::Document::get_contents |
( |
| ) |
const |
Glib::ustring GlomBakery::Document::get_file_extension |
( |
| ) |
const |
Glib::ustring GlomBakery::Document::get_file_uri |
( |
| ) |
const |
Glib::ustring GlomBakery::Document::get_file_uri_with_extension |
( |
const Glib::ustring & |
uri | ) |
|
bool GlomBakery::Document::get_is_new |
( |
| ) |
const |
Whether this just a default document.
bool GlomBakery::Document::get_modified |
( |
| ) |
const |
virtual Glib::ustring GlomBakery::Document::get_name |
( |
| ) |
const |
|
virtual |
Gets filename part of file_uri, or 'untitled'.
Reimplemented in Glom::Document.
bool GlomBakery::Document::get_read_only |
( |
| ) |
const |
ViewBase* GlomBakery::Document::get_view |
( |
| ) |
|
bool GlomBakery::Document::load |
( |
int & |
failure_code | ) |
|
virtual bool GlomBakery::Document::load_after |
( |
int & |
failure_code | ) |
|
|
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.
- Parameters
-
failure_code | Used to return a custom error code that is understood by your application. This must be greater than zero. |
Reimplemented in GlomBakery::Document_XML.
bool GlomBakery::Document::load_from_data |
( |
const guchar * |
data, |
|
|
std::size_t |
length, |
|
|
int & |
failure_code |
|
) |
| |
bool GlomBakery::Document::read_from_disk |
( |
int & |
failure_code | ) |
|
|
protected |
bool GlomBakery::Document::save |
( |
| ) |
|
virtual bool GlomBakery::Document::save_before |
( |
| ) |
|
|
protectedvirtual |
overrideable.
Does anything which should be done before the view has saved its data, before writing to disk..
Reimplemented in GlomBakery::Document_XML.
void GlomBakery::Document::set_file_extension |
( |
const Glib::ustring & |
strVal | ) |
|
virtual void GlomBakery::Document::set_file_uri |
( |
const Glib::ustring & |
file_uri, |
|
|
bool |
bEnforceFileExtension = false |
|
) |
| |
|
virtual |
void GlomBakery::Document::set_is_new |
( |
bool |
bVal | ) |
|
Called by AppWindow_WithDoc::init_create_document().
virtual void GlomBakery::Document::set_modified |
( |
bool |
bVal = true | ) |
|
|
virtual |
void GlomBakery::Document::set_read_only |
( |
bool |
bVal | ) |
|
void GlomBakery::Document::set_view |
( |
ViewBase* |
pView | ) |
|
This signal is emitted when the view should forget the document.
This is used internally, and you should not need to use it yourself.
This signal is emitted when the document has been modified.
It allows the view to update itself to show the new information.
static Glib::ustring GlomBakery::Document::util_file_uri_get_name |
( |
const Glib::ustring & |
file_uri, |
|
|
const Glib::ustring & |
file_extension |
|
) |
| |
|
static |
bool GlomBakery::Document::write_to_disk |
( |
| ) |
|
|
protected |
bool GlomBakery::Document::m_bIsNew |
|
protected |
bool GlomBakery::Document::m_bModified |
|
protected |
bool GlomBakery::Document::m_bReadOnly |
|
protected |
Glib::ustring GlomBakery::Document::m_file_extension |
|
protected |
Glib::ustring GlomBakery::Document::m_file_uri |
|
protected |
Glib::ustring GlomBakery::Document::m_strContents |
|
protected |
The documentation for this class was generated from the following file:
- libglom/document/bakery/document.h