VCF::Document Class Reference
A document is a component that interacts with a valid model instance and has many extra features like saving, loading, cutting no implemented within the scope of a model.
More...
#include <vcf/ApplicationKit/Document.h>
Inheritance diagram for VCF::Document:
List of all members.
Detailed Description
A document is a component that interacts with a valid model instance and has many extra features like saving, loading, cutting no implemented within the scope of a model.
Member Enumeration Documentation
Constructor & Destructor Documentation
| DocumentChanged VCF::Document::Document |
( |
|
) |
|
|
|
|
the document's constructor
|
| virtual VCF::Document::~Document |
( |
|
) |
[virtual] |
|
Member Function Documentation
| void VCF::Document::addSupportedClipboardFormat |
( |
const MIMEType & |
type |
) |
[inline] |
|
|
|
adds a clip format to the list of supported formats.
- Parameters:
-
| String,the | string identifying the clip format to be added. |
|
| void VCF::Document::addView |
( |
View * |
view |
) |
|
|
| virtual bool VCF::Document::canCopyFromDocument |
( |
|
) |
[inline, virtual] |
|
|
|
tells if we can perform a copy operation on the document.
By default a document has not thisoperation enabled. - Returns:
- bool returns true if it does, false if it doesn't
|
| virtual bool VCF::Document::canCutFromDocument |
( |
|
) |
[inline, virtual] |
|
|
|
tells if we can perform a cut operation on the document.
By default a document has not thisoperation enabled. - Returns:
- bool returns true if it does, false if it doesn't
|
| virtual bool VCF::Document::canPasteToDocument |
( |
|
) |
[virtual] |
|
|
|
tells if we can perform a paste operation on the document.
By default a document has not thisoperation enabled. - Returns:
- bool returns true if it does, false if it doesn't
|
| virtual DataObject* VCF::Document::copy |
( |
|
) |
[virtual] |
|
|
|
performs a copy operation on the document and returns the copied object.
- Returns:
- DataObject*, a pointer to the data that has been copied.
|
| virtual DataObject* VCF::Document::cut |
( |
|
) |
[inline, virtual] |
|
|
|
performs a cut operation on the document and returns the cut object.
- Returns:
- DataObject*, a pointer to the data that has been cut.
|
| virtual void VCF::Document::empty |
( |
|
) |
[virtual] |
|
| String VCF::Document::getFileName |
( |
|
) |
[inline] |
|
|
|
gets the full filename associated to the document in the file system.
- Returns:
- String, the filename.
|
| bool VCF::Document::getKeepsBackUpFile |
( |
|
) |
[inline] |
|
|
|
tells if we keep a backup copy of the file when saving the document.
- Returns:
- bool, true if we keep a backup copy of the document.
|
| Model* VCF::Document::getModel |
( |
|
) |
|
|
|
|
gets the enumerator of the clip formats supported by the document.
This document will be able to cut & paste data from the clipboard of the OS only for these specified formats. - Returns:
- Enumerator<String>*, the enumerator.
|
| virtual String VCF::Document::getTitle |
( |
|
) |
const [inline, virtual] |
|
|
|
gets the basename associated to the document in the file system.
This is the name of the file without its path component - Returns:
- String, the filename.
|
| Window* VCF::Document::getWindow |
( |
|
) |
[inline] |
|
|
|
gets the window associated to the document.
- Returns:
- Window*, the pointer to the associated window.
|
| virtual void VCF::Document::initNew |
( |
|
) |
[inline, virtual] |
|
|
|
callback function called by the document manager framework as soon as a new document has been successfully created.
Override this to initializations specific of your document. |
| void VCF::Document::internalModelChanged |
( |
Event * |
|
) |
[inline, protected] |
|
| bool VCF::Document::isModified |
( |
|
) |
[inline] |
|
|
|
tells is the document has been modified since the last time it has been saved
- Returns:
- bool returns true if it has been modified
|
| void VCF::Document::modelChanged |
( |
ModelEvent * |
e |
) |
|
|
| virtual bool VCF::Document::openFromType |
( |
const MIMEType & |
fileType, |
|
|
InputStream & |
stream |
|
) |
[virtual] |
|
|
|
opens the document from an input stream.
The type of file has to be specified too, because this tells how to treat the stream. - Parameters:
-
| const | String& fileType, the type of file to be open as. |
| const | InputStream& stream, the input stream. |
- Returns:
- bool, true if the file has been succesfully opened.
|
| virtual bool VCF::Document::openFromType |
( |
const String & |
fileName, |
|
|
const MIMEType & |
fileType |
|
) |
[virtual] |
|
|
|
this actually opens/loads the file associated to the document.
It calls a custom function specific to the document that appropriately opens and manages the file. - Parameters:
-
| const | String& fileName, the filename to open. |
| const | String& fileType, the type of file to be open as. |
- Returns:
- bool, true if the file has been succesfully opened.
fire event:: ModelChanged.
event type: Document::deOpened.
|
| virtual bool VCF::Document::paste |
( |
DataObject * |
data |
) |
[inline, virtual] |
|
|
|
performs a past operation on the document.
- Parameters:
-
| DataObject*,a | pointer to the data to paste. |
- Returns:
- bool, true if the operation has been performed successfully.
|
| virtual bool VCF::Document::saveAsType |
( |
const MIMEType & |
fileType, |
|
|
OutputStream & |
stream |
|
) |
[virtual] |
|
|
|
saves the document as a specified type of file.
The output stream is also specified. - Parameters:
-
| const | String& fileType, the type of file to be saved as. |
| OutputStream& | stream, the output stream to be saved into. |
- Returns:
- bool, true if the file has been succesfully saved.
|
| virtual bool VCF::Document::saveAsType |
( |
const String & |
fileName, |
|
|
const String & |
fileType |
|
) |
[virtual] |
|
|
|
saves the document as a specified type of file with a name that could be different than the current name for the document.
We may need to save the document as a different type without renaming this document, so it is let to the user to call setFileName() first if he needs. - Parameters:
-
| const | String& fileName, the filename to be saved as. |
| const | String& fileType, the type of file to be saved as. |
- Returns:
- bool, true if the file has been succesfully saved.
|
| void VCF::Document::setFileName |
( |
const String & |
fileName |
) |
[inline] |
|
|
|
sets the full filename associated to the document in the file system.
- Parameters:
-
| const | String&, the filename. |
|
| void VCF::Document::setKeepsBackUpFile |
( |
const bool & |
val |
) |
[inline] |
|
|
|
sets the flag stating that we want to keep a backup copy of the file when saving the document.
- Parameters:
-
| bool,true | if we want to keep a backup copy of the document. |
|
| void VCF::Document::setModel |
( |
Model * |
val |
) |
|
|
| void VCF::Document::setModified |
( |
bool |
val |
) |
[inline] |
|
|
|
sets the modification flag for the document.
- Parameters:
-
| bool | true, to set the document as modified. |
|
| virtual void VCF::Document::setTitle |
( |
const String & |
name |
) |
[inline, virtual] |
|
|
|
sets the basename to be associated to the document.
This is the name of the file without its path component. The full filename, which is accordingly updated, keeps the same path component of the previous filename. - Parameters:
-
|
| void VCF::Document::setWindow |
( |
Window * |
val |
) |
[inline] |
|
|
|
sets the window to be associated to the document.
- Parameters:
-
| Window*,the | pointer to window to be associated. |
|
| void VCF::Document::updateAllViews |
( |
|
) |
|
|
Member Data Documentation
The documentation for this class was generated from the following file: