TDocumentAncestor Class
Definition
Manage an abstracted document file.
type TDocumentAncestor = class(TObject)
- Inheritance
-
TObjectTDocumentAncestor
- Derived
Remarks
Descend from its descendants for your real documents.
Constructors
| Create |
Used to create a new instance of this class. It's better to use TDocument.DefaultDocument if you have only one document in your project, but create instances for each document if you want to edit more than one at the same time. |
Properties
| FileName |
The FileName for this document (no path, no extension) if opened by LoadFromFile(WithAName) or it has been saved by SaveToFile(WithAName) |
| HasChanged |
Returns True if a document parameter has changed since last Clear(), LoadXXX() or SaveXXX() |
| Path |
Path to the folder where this document will be saved. |
Methods
| Clear |
Used to clean current instance and reset all properties and fields to their default values |
| GetDocumentExtension |
Returns the file extension for the storrage file of this document. |
| GetDocumentGUID |
Returns the unique identifier used in the document jeader to check if the file is compatible with this project. |
| GetFileName | |
| GetPath | |
| IsCrypted |
Return True if this document is crypted. |
| LoadFromFile(string) |
Used to load the document from a file after clearing the instance. |
| SaveToFile(string) |
Used to save current document to a file |
| SetHasChanged(Boolean) | |
| SetPath(string) |