|
| bool | Open (int mode, LPCTSTR path=0) |
| | Overrides TDocument::Open and opens the file using the specified path.
|
| bool | Close () |
| | < String-aware overload
|
| TInStream * | InStream (int mode, LPCTSTR strmId=0) |
| | Overrides TDocument::InStream and provides generic input for the particular storage medium.
|
| TOutStream * | OutStream (int mode, LPCTSTR strmId=0) |
| | < String-aware overload
|
| bool | Commit (bool force=false) |
| | < String-aware overload
|
| bool | Revert (bool clear=false) |
| | Calls TDocument::Revert to notify the views to refresh their data.
|
| int | FindProperty (LPCTSTR name) |
| | return index
|
| int | PropertyFlags (int index) |
| | < String-aware overload
|
| LPCTSTR | PropertyName (int index) |
| | Returns the text name of the property given the index value.
|
| int | GetProperty (int index, void *dest, int textlen=0) |
| | Overrides TDocument::GetProperty.
|
| bool | SetProperty (int index, const void *src) |
| | Sets the property data, which must be in the native data type (either string or binary).
|
| bool | Open (HFILE fhdl) |
| | open on existing file handle
|
| bool | Open (int mode, const tstring &path) |
| TInStream * | InStream (int mode, const tstring &streamId) |
| TOutStream * | OutStream (int mode, const tstring &streamId) |
| int | FindProperty (const tstring &name) |
| | TFileDocument (TDocument *parent=0) |
| | Constructs a TFileDocument object with the optional parent document.
|
| | ~TFileDocument () |
| | Destroys a TFileDocument object.
|
| bool | IsOpen () |
| | Is nonzero if the document or any streams are open.
|
| int | PropertyCount () |
| | Return the number of property support by this document.
|
| | TDocument (TDocument *parent=nullptr) |
| | Although you do not create a TDocument object directly, you must call the constructor when you create a derived class.
|
| virtual | ~TDocument () |
| | Deletes a TDocument object.
|
| TInStream * | InStream (int mode, const tstring &streamId) |
| TOutStream * | OutStream (int mode, const tstring &streamId) |
| bool | Open (int mode, const tstring &path) |
| virtual TDocument & | RootDocument () |
| | Returns the this pointer as the root document.
|
| TDocManager & | GetDocManager () |
| | Returns a pointer to the current document manager.
|
| void | SetDocManager (TDocManager &dm) |
| | Sets the current document manager to the argument dm.
|
| TDocument * | GetParentDoc () |
| | Returns either the parent document of the current document or 0 if there is no parent document.
|
| TDocTemplate * | GetTemplate () |
| | Gets the template used for document creation.
|
| bool | SetTemplate (TDocTemplate *tpl) |
| | Sets the document template.
|
| LPCTSTR | GetDocPath () const |
| | Returns the directory path for the document.
|
| virtual bool | SetDocPath (LPCTSTR path) |
| | Sets the document path for Open and Save operations.
|
| bool | SetDocPath (const tstring &path) |
| LPCTSTR | GetTitle () const |
| | Returns the title of the document.
|
| virtual void | SetTitle (LPCTSTR title) |
| | Sets the title of the document.
|
| void | SetTitle (const tstring &title) |
| virtual bool | IsDirty () |
| | Also queries doc and view hierarchy.
|
| void | SetDirty (bool dirty=true) |
| | Updates the document's dirty flag using the specified parameter.
|
| virtual bool | CanClose () |
| | Returns false if unable to close.
|
| virtual bool | HasFocus (HWND hwnd) |
| | Document (or child doc) has Focus.
|
| virtual TDocument * | DocWithFocus (HWND hwnd) |
| | Return pointer to this document or one of its child documents if the spcecified window parameter is a view associated with the document.
|
| bool | NotifyViews (int eventId, TParam2=0, TView *exclude=nullptr) |
| | Notifies the views of this document, and the views of any child documents, of a change.
|
| bool | NotifyOwnViews (int eventId, TParam2=0, TView *exclude=nullptr) |
| | Notifies the views of this document of a change.
|
| TView * | QueryViews (int eventId, TParam2=0, TView *exclude=nullptr) |
| | Queries the views of the current document, and the views of any child documents, about a specified event.
|
| virtual uint | PostError (uint sid, uint choice=MB_OK) |
| | Posts the error message passed as a string resource ID in sid.
|
| int | FindProperty (const tstring &name) |
| TList & | GetChildren () |
| | Return reference to the children document list.
|
| TView * | GetViewList () const |
| | Return pointer to the head of the link list of views associated with this document.
|
| TView * | NextView (const TView *view) |
| | Gets the next view in the list of views. Holds 0 if none exists.
|
| TStream * | GetStreamList () const |
| | Returns head of the link list of streams associated with this document.
|
| TStream * | NextStream (const TStream *strm) |
| | Gets the next entry in the stream. Holds 0 if none exists.
|
| void * | GetTag () const |
| | Returns pointer to user-defined data [i.e. tag] attached to this document.
|
| void | SetTag (void **tag) |
| | Attach an arbitrary (user-defined) pointer with this document.
|
| int | GetOpenMode () const |
| | Gets the mode and protection flag values for the current document.
|
| void | SetOpenMode (int mode) |
| | Sets the mode and protection flag values for the current document.
|
| TView * | InitView (TView *view) |
| | called from template InitView
|
| bool | IsEmbedded () const |
| | Returns true if the document is embedded in an OLE 2 container.
|
| void | SetEmbedded (bool embed) |
| | Marks the document as being embedded in an OLE 2 container.
|
| virtual bool | InitDoc () |
| | A virtual method that is overridden by TOleDocument::InitDoc.
|
| | TDocument (TDocManager *docMan) |
| | create a dummy document to hold docmgr
|
| virtual | ~TStreamableBase () |
Derived from TDocument, TFileDocument opens and closes views and provides stream support for views.
TFileDocument has member functions that continue to process FileNew and FileOpen messages after a view is constructed. You can add support for specialized file types by deriving classes from TFileDocument. TFileDocument makes this process easy by hiding the actual process of storing file types.
Definition at line 34 of file filedoc.h.