The IpeDocument class is the engine behind the Ipe program. It represents the contents of an Ipe document, and all the methods necessary to load, save, and edit it. It is independent of a specific user interface.
IpeDocument's cannot be copied or assigned.
Note that the IpeDocument owns the IpeRepository that defines the meaning of all object's attributes. Therefore, the document is the largest extent where IpeObject's make sense. You can have several documents at once, but you cannot move IpeObject's (or IpeStyleSheet's) from one to the other. If you need to do so, you'll have externalize them to XML and internalize them into the other document.
|
Construct an empty document for filling by a client. As constructed, it has no pages, A4 media, and only the standard style sheet. |
|
Destructor.
|
|
Construct a document from a file. Returns 0 if file couldn't be read or parsed, and a reason explaining that in reason. If reason is positive, it is a file (stream) offset where parsing failed. If reason is negative, it is an error code. If it is smaller than -60000, then it is the negative value of the Ipe version that created that file (and which exceeds the version of this Ipe).
Note that the file name fname is an 8-bit string, and passed through unchanged to |
|
Save in a file. Returns true if sucessful. Does not reset IsEdited().
Note that the file name fname is an 8-bit string, and passed through unchanged to |
|
Save in XML format into an IpeStream.
You can set creator to set the tag. |
|
Return document properties.
|
|
Set document properties.
|
|
Replace the style sheet cascade. The previous contents is not deleted (because this function is often used to insert style sheets into the cascade). Sets the edited flag. |
|
Return const pointer to topmost stylesheet.
|
|
Return modifiable stylesheet.
|
|
Return true if document has been edited since last save.
|
|
Set whether document has been edited. Methods that can modify the document already set the flag, so you only need to call this when inserting or deleting pages, etc. When modifying an IpePage, rather call IpePage::SetEdited(true). Clients need to manually reset the edited flag when they save the document, or after constructing it during loading.
Note that calling this with |
|
Check all symbolic attributes in the document. This function verifies that all symbolic attributes in the document are defined in the style sheet. It appends to seq all symbolic attributes (in no particular order, but with not duplicates) that are NOT defined.
Returns |
|
Return attribute repository.
|
|
Return attribute repository (const version).
|