OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Doc/View classes

Doc/View class support the Doc/View model, a system in which data is contained in and accessed through a document object, and displayed and manipulated through a view object. More...

Classes

class  owl::TTreeViewCtrlView
 
class  owl::TListViewCtrlView
 
class  owl::TDocManager
 TDocManager creates a document manager object that manages the list of current documents and registered templates, handles standard file menu commands, and displays the user-interface for file and view selection boxes. More...
 
class  owl::TDvOpenSaveData
 TDvOpenSaveData encapsulates the information used to initialized the Open or Save As dialog box by ObjectWindows' DocView manager. More...
 
class  owl::TDvOpenSaveDataOwner
 TDvOpenSaveDataOwner is a mixin class used by the DocView encapsulation of the FileOpen and FileSave dialogs. More...
 
class  owl::TDvFileOpenDialog
 TDvFileOpenDialog encapsulates the FileOpen dialog used by the DocView manager. More...
 
class  owl::TDvFileSaveDialog
 TDvFileSaveDialog encapsulates the FileSave dialog used by the DocView manager. More...
 
class  owl::TDocTemplate
 TDocTemplate is an abstract base class that contains document template functionality. More...
 
class  owl::TDocTemplateT< D, V >
 To register the associated document and view classes, a parameterized subclass, TDocTemplateT<D,V>, is used to construct a particular document and view, where D represents the document class and V represents the view class. More...
 
class  owl::TDocument
 An abstract base class, TDocument is the base class for all document objects and serves as an interface between the document, its views, and the document manager (TDocManager class). More...
 
class  owl::TView
 Abstract base class for view access from document. More...
 
class  owl::TWindowView
 Derived from both TWindow and TView, TWindowView is a streamable base class that can be used for deriving window-based views. More...
 
class  owl::TDialogView
 Derived from TDialog and TView. More...
 
class  owl::TStream
 An abstract base class, TStream provides links between streams and documents, views, and document files. More...
 
class  owl::TInStream
 Derived from TStream and istream, TInStream is a base class used to define input streams for documents. More...
 
class  owl::TOutStream
 Derived from TStream and ostream, TOutStream is a base class used to create output storage streams for a document. More...
 
struct  owl::TDispatch< WM_OWLDOCUMENT >
 
struct  owl::TDispatch< WM_OWLVIEW >
 
struct  owl::TDispatch< WM_OWLNOTIFY >
 
struct  owl::TDispatch< WM_OWLNOTIFY >::TNotificationDispatch< vnDocOpened >
 
struct  owl::TDispatch< WM_OWLNOTIFY >::TNotificationDispatch< vnDocClosed >
 
struct  owl::TDispatch< WM_OWLNOTIFY >::TNotificationDispatch< vnViewOpened >
 
struct  owl::TDispatch< WM_OWLNOTIFY >::TNotificationDispatch< vnViewClosed >
 
struct  owl::TDispatch< WM_OWLNOTIFY >::TNotificationDispatch< vnCommit >
 
struct  owl::TDispatch< WM_OWLNOTIFY >::TNotificationDispatch< vnRevert >
 
struct  owl::TDispatch< WM_OWLNOTIFY >::TNotificationDispatch< vnIsDirty >
 
struct  owl::TDispatch< WM_OWLNOTIFY >::TNotificationDispatch< vnIsWindow >
 
class  owl::TEditView
 Derived from TView and TEditSearch, TEditView provides a view wrapper for the ObjectWindows text edit class (TEdit). More...
 
class  owl::TFileDocument
 Derived from TDocument, TFileDocument opens and closes views and provides stream support for views. More...
 
class  owl::TListBoxView
 Provides views for list boxes. More...
 
class  owl::TPaneSplitterView
 

Macros

#define _DOCVIEWCLASS   _USERCLASS
 
#define DECLARE_STREAMABLE_OPSDV(cls)
 
#define PREV_OPEN   (ofNoCreate|ofNoReplace)
 
#define IS_PREV_OPEN(omode)   ((omode & PREV_OPEN)==PREV_OPEN)
 
#define VN_DEFINE(id, method, dispatcher)    {{WM_OWLNOTIFY}, static_cast<::owl::uint>(id), OWL_DISPATCH(dispatcher, method)}
 Defines a DocView notification response entry.
 
#define VN_DEFINE_STANDARD_(id, method)
 

Typedefs

typedef TTreeViewCtrlView owl::TTreeWindowView
 

Enumerations

enum  { owl::dnCreate , owl::dnClose , owl::dnRename }
 Definitions of dnXxx document/view message notifications. More...
 
enum  { owl::ofRead_workaround = std::ios::in , owl::ofWrite_workaround = std::ios::out }
 
enum  owl::TDocMode {
  owl::ofParent = 0 , owl::ofRead = std::ios::in , owl::ofWrite = std::ios::out , owl::ofReadWrite = ofRead_workaround | ofWrite_workaround , owl::ofAtEnd = std::ios::ate , owl::ofAppend = std::ios::app , owl::ofTruncate = std::ios::trunc , owl::ofNoCreate = 0x40 , owl::ofNoReplace = 0x80 , owl::ofBinary = std::ios::binary ,
  owl::ofIosMask = 0x00FF , owl::ofTransacted = 0x1000 , owl::ofPreserve = 0x2000 , owl::ofPriority = 0x4000 , owl::ofTemporary = 0x8000 , owl::shCompat = 0x0600 , owl::shNone = 0x0800 , owl::shRead = 0x0A00 , owl::shWrite = 0x0C00 , owl::shReadWrite = 0x0E00 ,
  owl::shDefault = 0 , owl::shMask = (shCompat|shNone|shRead|shWrite)
}
 Document open and sharing modes - used in storage and stream constructors. More...
 
enum  owl::TFileDocument::TFileDocProp { owl::TFileDocument::PrevProperty = TDocument::NextProperty-1 , owl::TFileDocument::CreateTime , owl::TFileDocument::ModifyTime , owl::TFileDocument::AccessTime , owl::TFileDocument::StorageSize , owl::TFileDocument::FileHandle , owl::TFileDocument::NextProperty }
 Contains constants that define the following properties of the document: More...
 

Functions

bool owl::TFileDocument::Open (int mode, LPCTSTR path=0)
 Overrides TDocument::Open and opens the file using the specified path.
 
bool owl::TFileDocument::Close ()
 < String-aware overload
 
TInStreamowl::TFileDocument::InStream (int mode, LPCTSTR strmId=0)
 Overrides TDocument::InStream and provides generic input for the particular storage medium.
 
TOutStreamowl::TFileDocument::OutStream (int mode, LPCTSTR strmId=0)
 < String-aware overload
 
bool owl::TFileDocument::Commit (bool force=false)
 < String-aware overload
 
bool owl::TFileDocument::Revert (bool clear=false)
 Calls TDocument::Revert to notify the views to refresh their data.
 
int owl::TFileDocument::FindProperty (LPCTSTR name)
 return index
 
int owl::TFileDocument::PropertyFlags (int index)
 < String-aware overload
 
LPCTSTR owl::TFileDocument::PropertyName (int index)
 Returns the text name of the property given the index value.
 
int owl::TFileDocument::GetProperty (int index, void *dest, int textlen=0)
 Overrides TDocument::GetProperty.
 
bool owl::TFileDocument::SetProperty (int index, const void *src)
 Sets the property data, which must be in the native data type (either string or binary).
 
bool owl::TFileDocument::Open (HFILE fhdl)
 open on existing file handle
 
HFILE owl::TFileDocument::OpenThisFile (int omode, const tstring &fileName, std::streampos *pseekpos)
 Opens the file document after checking the file sharing mode (omode).
 
void owl::TFileDocument::CloseThisFile (HFILE fhdl, int omode)
 Closes the file handle if the associated file was opened by TFileDocument.
 

Variables

const uint owl::dtProhibited
 Flags which are stripped off when invoking Open/Save dialogs [See SelectDocPath() method for more information ].
 
const uint owl::dtNewDoc = 0x80000000L
 create new document, no path used
 
const uint owl::dtAutoDelete = 0x40000000L
 delete doc when last view is deleted
 
const uint owl::dtNoAutoView = 0x20000000L
 no automatic create of default view
 
const uint owl::dtSingleView = 0x10000000L
 only a single view per document
 
const uint owl::dtAutoOpen = 0x08000000L
 open document upon creation
 
const uint owl::dtUpdateDir = 0x04000000L
 syncronize directory with dialog dir
 
const uint owl::dtHidden = 0x02000000L
 hide template from user selection
 
const uint owl::dtSelected = 0x01000000L
 indicates template last selected
 
const uint owl::dtDynRegInfo = 0x00800000L
 reginfo table is dynamic, not static
 
const uint owl::dtSingleUse = 0x00400000L
 to be registered as single use
 
const uint owl::dtRegisterExt = 0x00200000L
 register extension with this app
 
const uint owl::dtForbidNew = 0x00100000L
 forbids creating new document
 
const uint owl::dtReadOnly = 0x0001
 
const uint owl::dtOverwritePrompt = 0x0002
 
const uint owl::dtHideReadOnly = 0x0004
 
const uint owl::dtPathMustExist = 0x0800
 
const uint owl::dtFileMustExist = 0x1000
 
const uint owl::dtCreatePrompt = 0x2000
 
const uint owl::dtNoReadOnly = 0x8000
 
const uint owl::dtNoTestCreate = 0x10000L
 

Friends

class owl::TFileDocument::TFileInStream
 
class owl::TFileDocument::TFileOutStream
 

Definitions of dmXxx document manager operational mode flags

const uint owl::dmSDI = 0x0001
 Does not support multiple open documents.
 
const uint owl::dmMDI = 0x0002
 Supports multiple open documents.
 
const uint owl::dmMenu = 0x0004
 Set IDs for file menu.
 
const uint owl::dmSaveEnable = 0x0010
 Enable FileSave even if doc is unmodified.
 
const uint owl::dmNoRevert = 0x0020
 Disable FileRevert menu item.
 

Definitions of WM_OWLNOTIFY event IDs (view notifications)

event ID's up to vnCustomBase reserved for general doc-view notifications

const uint owl::vnViewOpened = 1
 a new view has just been constructed
 
const uint owl::vnViewClosed = 2
 another view is about to be destructed
 
const uint owl::vnDocOpened = 3
 document has just been opened
 
const uint owl::vnDocClosed = 4
 document has just been closed
 
const uint owl::vnCommit = 5
 document is committing, flush cached changes
 
const uint owl::vnRevert = 6
 document has reverted, reload data from doc
 
const uint owl::vnIsDirty = 7
 respond true if uncommitted changes present
 
const uint owl::vnIsWindow = 8
 respond true if passed HWND is that of view
 
const uint owl::vnCustomBase = 100
 base of document class specific notifications
 

Document and view property access flags

Define document and view property attributes.

Documents, views, and applications use these attributes to determine how to process a document or view.

const uint owl::pfGetText = 1
 property accessible as text format
 
const uint owl::pfGetBinary = 2
 property accessible as native non-text format
 
const uint owl::pfConstant = 4
 property is invariant for object instance
 
const uint owl::pfSettable = 8
 property settable as native format
 
const uint owl::pfUnknown = 16
 property defined but unavailable in object
 
const uint owl::pfHidden = 32
 property should be hidden from normal browse
 
const uint owl::pfUserDef =128
 property has been user-defined at run time
 
 owl::TFileDocument::TFileDocument (TDocument *parent=0)
 Constructs a TFileDocument object with the optional parent document.
 
 owl::TFileDocument::~TFileDocument ()
 Destroys a TFileDocument object.
 
bool owl::TFileDocument::IsOpen ()
 Is nonzero if the document or any streams are open.
 
int owl::TFileDocument::PropertyCount ()
 Return the number of property support by this document.
 

Custom OWL Window Messages

These macros handle OWL-defined window messages used internally by the framework:

#define EV_WM_PREPROCMENU   OWL_EV_(WM_OWLPREPROCMENU, EvPreProcessMenu)
 
#define EV_WM_CANCLOSE   OWL_EV_(WM_OWLCANCLOSE, EvCanClose)
 
#define EV_WM_WAKEUP   OWL_EV_(WM_OWLWAKEUP, EvWakeUp)
 

Standard view notificaton events

These macros handle view-related messages generated by the document manager.

#define EV_VN_VIEWOPENED   VN_DEFINE_STANDARD_(::owl::vnViewOpened, VnViewOpened)
 
#define EV_VN_VIEWCLOSED   VN_DEFINE_STANDARD_(::owl::vnViewClosed, VnViewClosed)
 
#define EV_VN_DOCOPENED   VN_DEFINE_STANDARD_(::owl::vnDocOpened, VnDocOpened)
 
#define EV_VN_DOCCLOSED   VN_DEFINE_STANDARD_(::owl::vnDocClosed, VnDocClosed)
 
#define EV_VN_COMMIT   VN_DEFINE_STANDARD_(::owl::vnCommit, VnCommit)
 
#define EV_VN_REVERT   VN_DEFINE_STANDARD_(::owl::vnRevert, VnRevert)
 
#define EV_VN_ISDIRTY   VN_DEFINE_STANDARD_(::owl::vnIsDirty, VnIsDirty)
 
#define EV_VN_ISWINDOW   VN_DEFINE_STANDARD_(::owl::vnIsWindow, VnIsWindow)
 

Detailed Description

Doc/View class support the Doc/View model, a system in which data is contained in and accessed through a document object, and displayed and manipulated through a view object.

Any number of views can be associated with a particular document type. Various classes control the flow of information within this system. Several classes also provide support for OLE's compound document and compound file structure within the Doc/View model.

TDocManager is the base class designed to handle documents, templates, messages and so on.

Macro Definition Documentation

◆ _DOCVIEWCLASS

#define _DOCVIEWCLASS   _USERCLASS

Definition at line 32 of file docmanag.h.

◆ DECLARE_STREAMABLE_OPSDV

#define DECLARE_STREAMABLE_OPSDV ( cls)
Value:
static ipstream& readRef( ipstream& is, cls& cl ); \
friend inline ipstream& operator >> ( ipstream& is, cls& cl ) \
{ return cls::readRef( is, cl ); } \
static ipstream& readPtr( ipstream& is, cls*& cl ); \
friend inline ipstream& operator >> ( ipstream& is, cls*& cl ) \
{ return cls::readPtr( is, cl ); } \
static opstream& writeRef( opstream& is, const cls& cl ); \
friend inline opstream& operator << ( opstream& os, const cls& cl ) \
{ return cls::writeRef( os, cl ); } \
static opstream& writePtr( opstream& is, const cls* cl ); \
friend inline opstream& operator << ( opstream& os, const cls* cl ) \
{ return cls::writePtr( os, cl ); }

Definition at line 135 of file doctpl.h.

◆ EV_VN_COMMIT

#define EV_VN_COMMIT   VN_DEFINE_STANDARD_(::owl::vnCommit, VnCommit)

Definition at line 800 of file docview.h.

◆ EV_VN_DOCCLOSED

#define EV_VN_DOCCLOSED   VN_DEFINE_STANDARD_(::owl::vnDocClosed, VnDocClosed)

Definition at line 799 of file docview.h.

◆ EV_VN_DOCOPENED

#define EV_VN_DOCOPENED   VN_DEFINE_STANDARD_(::owl::vnDocOpened, VnDocOpened)

Definition at line 798 of file docview.h.

◆ EV_VN_ISDIRTY

#define EV_VN_ISDIRTY   VN_DEFINE_STANDARD_(::owl::vnIsDirty, VnIsDirty)

Definition at line 802 of file docview.h.

◆ EV_VN_ISWINDOW

#define EV_VN_ISWINDOW   VN_DEFINE_STANDARD_(::owl::vnIsWindow, VnIsWindow)

Definition at line 803 of file docview.h.

◆ EV_VN_REVERT

#define EV_VN_REVERT   VN_DEFINE_STANDARD_(::owl::vnRevert, VnRevert)

Definition at line 801 of file docview.h.

◆ EV_VN_VIEWCLOSED

Definition at line 797 of file docview.h.

◆ EV_VN_VIEWOPENED

Definition at line 796 of file docview.h.

◆ EV_WM_CANCLOSE

#define EV_WM_CANCLOSE   OWL_EV_(WM_OWLCANCLOSE, EvCanClose)

Definition at line 358 of file docmanag.h.

◆ EV_WM_PREPROCMENU

#define EV_WM_PREPROCMENU   OWL_EV_(WM_OWLPREPROCMENU, EvPreProcessMenu)

Definition at line 357 of file docmanag.h.

◆ EV_WM_WAKEUP

#define EV_WM_WAKEUP   OWL_EV_(WM_OWLWAKEUP, EvWakeUp)

Definition at line 359 of file docmanag.h.

◆ IS_PREV_OPEN

#define IS_PREV_OPEN ( omode)    ((omode & PREV_OPEN)==PREV_OPEN)

Definition at line 95 of file docview.h.

◆ PREV_OPEN

#define PREV_OPEN   (ofNoCreate|ofNoReplace)

Definition at line 94 of file docview.h.

◆ VN_DEFINE

Defines a DocView notification response entry.

  • 'id' is the notification id,
  • 'method' is the name of the method to be notified, and
  • 'dispatcher' is the name of the dispatcher to use.

Definition at line 767 of file docview.h.

◆ VN_DEFINE_STANDARD_

#define VN_DEFINE_STANDARD_ ( id,
method )
Value:
{{WM_OWLNOTIFY}, static_cast<::owl::uint>(id),\
#define WM_OWLNOTIFY
Definition dispatch.h:4104
#define OWL_DISPATCH(dispatch, method)
Definition dispatch.h:128
Undefined default template for dispatchers Template specialization is used to allow the compiler to l...
Definition dispatch.h:255

Definition at line 785 of file docview.h.

Typedef Documentation

◆ TTreeWindowView

Enumeration Type Documentation

◆ anonymous enum

Definitions of dnXxx document/view message notifications.

Enumerator
dnCreate 

New document or view has been created.

dnClose 

Document or view has been closed.

dnRename 

Document has been renamed.

Definition at line 56 of file docmanag.h.

◆ anonymous enum

Enumerator
ofRead_workaround 
ofWrite_workaround 

Definition at line 42 of file docview.h.

◆ TDocMode

Document open and sharing modes - used in storage and stream constructors.

Defines the document and open sharing modes used for constructing streams and storing data. Any constants that have the same functionality as those used by OLE 2.0 doc files are indicated in the following table; for example, STGM_TRANSACTED, STGM_CONVERT, STGM_PRIORITY, and STGM_DELETEONRELEASE. Although files are typically used for data storage, databases or spreadsheets can also be used. I/O streams rather than DOS use these bit values. Documents open the object used for storage in one of the following modes:

Note
the bits values are those of file streams, not same as RTL or OLE
Enumerator
ofParent 

use open mode of parent storage

ofRead 

ios::in, open for reading

ofWrite 

ios::out, open for writing

ofReadWrite 
ofAtEnd 

ios::ate, seek to eof upon original open

ofAppend 

ios::app, append mode: all additions at eof

ofTruncate 

ios::trunc, truncate file if already exists

ofNoCreate 

ios::nocreate, open fails if file doesn't exist

ofNoReplace 

ios::noreplace, open fails if file already exists

ofBinary 
ofIosMask 
ofTransacted 

STGM_TRANSACTED, supports commit and revert.

ofPreserve 

STGM_CONVERT, backup old data of same name.

ofPriority 

STGM_PRIORITY, temporary efficient peeking.

ofTemporary 

STGM_DELETEONRELEASE, delete when destructed.

shCompat 

for non-compliant applications, avoid if possible

shNone 

EXCLUSIVE functionality.

shRead 

DENY_WRITE functionality.

shWrite 

DENY_READ functionality.

shReadWrite 

DENY_NONE functionality.

shDefault 

use stream implementation default value

shMask 

Definition at line 57 of file docview.h.

◆ TFileDocProp

Contains constants that define the following properties of the document:

Enumerator
PrevProperty 
CreateTime 

The time the view or document was created (FILETIME)

ModifyTime 

The time the view or document was modified (FILETIME)

AccessTime 

The time the view or document was last accessed (FILETIME)

StorageSize 

An unsigned long containing the storage size (ulong)

FileHandle 

The platform file handle (HFILE if Windows)

NextProperty 

Definition at line 37 of file filedoc.h.

Function Documentation

◆ TFileDocument()

owl::TFileDocument::TFileDocument ( TDocument * parent = 0)
inline

Constructs a TFileDocument object with the optional parent document.

Definition at line 107 of file filedoc.h.

◆ ~TFileDocument()

owl::TFileDocument::~TFileDocument ( )
inline

Destroys a TFileDocument object.

Definition at line 115 of file filedoc.h.

◆ Close()

bool owl::TFileDocument::Close ( )
virtual

< String-aware overload

Closes the document but does not delete or detach any associated views.

Before closing the document, Close calls TDocument::Close to make sure all child documents are closed. If any children are open, Close returns 0 and does not close the document. If all children are closed, Close checks to see if any associated streams are open, and if so, returns 0 and does not close the document. If there are no open streams, Close closes the file.

Reimplemented from owl::TDocument.

Definition at line 266 of file filedoc.cpp.

◆ CloseThisFile()

void owl::TFileDocument::CloseThisFile ( HFILE fhdl,
int omode )
protected

Closes the file handle if the associated file was opened by TFileDocument.

Calls TDocument::NotifyViews() to notify all views that the file document has closed.

Definition at line 212 of file filedoc.cpp.

References IS_PREV_OPEN, and owl::vnDocClosed.

◆ Commit()

bool owl::TFileDocument::Commit ( bool force = false)
virtual

< String-aware overload

Calls TDocument::Commit and clears TDocument's DirtyFlag data member, thus indicating that there are no unsaved changes made to the document.

Reimplemented from owl::TDocument.

Definition at line 284 of file filedoc.cpp.

◆ FindProperty()

int owl::TFileDocument::FindProperty ( LPCTSTR name)
virtual

return index

Gets the property index, given the property name (name).

Returns 0 if the name is not found.

Reimplemented from owl::TDocument.

Definition at line 354 of file filedoc.cpp.

References _tcscmp.

◆ GetProperty()

int owl::TFileDocument::GetProperty ( int index,
void * dest,
int textlen = 0 )
virtual

Overrides TDocument::GetProperty.

See also
TFileDocument::TFileDocProp

Reimplemented from owl::TDocument.

Definition at line 368 of file filedoc.cpp.

References _stprintf, _T, and COUNTOF.

◆ InStream()

TInStream * owl::TFileDocument::InStream ( int omode,
LPCTSTR strmId = 0 )
virtual

Overrides TDocument::InStream and provides generic input for the particular storage medium.

InStream returns a pointer to a TInStream. mode is a combination of the ios bits defined in iostream.h. strmId is not used for file documents. The view reads data from the document as a stream or through stream functions.

Reimplemented from owl::TDocument.

Definition at line 448 of file filedoc.cpp.

References owl::ofBinary, owl::ofParent, owl::ofRead, and PREV_OPEN.

◆ IsOpen()

bool owl::TFileDocument::IsOpen ( )
inlinevirtual

Is nonzero if the document or any streams are open.

Reimplemented from owl::TDocument.

Definition at line 122 of file filedoc.h.

References owl::TDocument::IsOpen().

◆ Open() [1/2]

bool owl::TFileDocument::Open ( HFILE fhdl)

open on existing file handle

Opens a file document using an existing file handle.

Sets TDocument::OpenMode to PREV_OPEN and read/write. Sets the document path to 0. Sets FHdl to fhdl. Always returns a nonzero value.

Definition at line 249 of file filedoc.cpp.

References owl::ofReadWrite, and PREV_OPEN.

◆ Open() [2/2]

bool owl::TFileDocument::Open ( int omode,
LPCTSTR path = 0 )
virtual

Overrides TDocument::Open and opens the file using the specified path.

If the file is already open, returns 0. Calls TDocument::SetDocPath to set the directory path. If mode is not 0, sets TDocument::OpenMode to mode. If the file cannot be opened, returns 0.

Reimplemented from owl::TDocument.

Definition at line 227 of file filedoc.cpp.

◆ OpenThisFile()

HFILE owl::TFileDocument::OpenThisFile ( int omode,
const tstring & fileName,
std::streampos * pseekpos )
protected

Opens the file document after checking the file sharing mode (omode).

If a file mode is not specified as read, write, or read and write, OpenThisFile returns 0.

Todo
This method uses obsolete WinApi functions for 16-bit compatibility which is no longer supported

Definition at line 145 of file filedoc.cpp.

References _USES_CONVERSION, _W2A, owl::ofAppend, owl::ofAtEnd, owl::ofNoCreate, owl::ofNoReplace, owl::ofRead, owl::ofTruncate, owl::ofWrite, owl::shCompat, owl::shMask, owl::shRead, owl::shReadWrite, and owl::vnDocOpened.

◆ OutStream()

TOutStream * owl::TFileDocument::OutStream ( int omode,
LPCTSTR strmId = 0 )
virtual

< String-aware overload

Overrides TDocument::OutStream and provides generic input for the particular storage medium.

OutStream returns a pointer to a TOutStream. mode is a combination of the ios bits defined in iostream.h. strmId is not used for file documents. Instead, the view reads data from the document through stream functions.

Reimplemented from owl::TDocument.

Definition at line 483 of file filedoc.cpp.

References owl::ofBinary, owl::ofParent, owl::ofWrite, and PREV_OPEN.

◆ PropertyCount()

int owl::TFileDocument::PropertyCount ( )
inlinevirtual

Return the number of property support by this document.

Note
The property count includes properties inherited from base document classes.

Reimplemented from owl::TDocument.

Definition at line 132 of file filedoc.h.

References owl::TFileDocument::NextProperty.

◆ PropertyFlags()

int owl::TFileDocument::PropertyFlags ( int index)
virtual

< String-aware overload

Returns the property attribute constants (pfGetText, pfHidden, and so on).

Reimplemented from owl::TDocument.

Definition at line 339 of file filedoc.cpp.

◆ PropertyName()

LPCTSTR owl::TFileDocument::PropertyName ( int index)
virtual

Returns the text name of the property given the index value.

Reimplemented from owl::TDocument.

Definition at line 325 of file filedoc.cpp.

◆ Revert()

bool owl::TFileDocument::Revert ( bool clear = false)
virtual

Calls TDocument::Revert to notify the views to refresh their data.

If clear is false, the data is restored instead of cleared.

Reimplemented from owl::TDocument.

Definition at line 297 of file filedoc.cpp.

◆ SetProperty()

bool owl::TFileDocument::SetProperty ( int index,
const void * src )
virtual

Sets the property data, which must be in the native data type (either string or binary).

Reimplemented from owl::TDocument.

Definition at line 434 of file filedoc.cpp.

Variable Documentation

◆ dmMDI

const uint owl::dmMDI = 0x0002

Supports multiple open documents.

Definition at line 38 of file docmanag.h.

◆ dmMenu

const uint owl::dmMenu = 0x0004

Set IDs for file menu.

Definition at line 39 of file docmanag.h.

◆ dmNoRevert

const uint owl::dmNoRevert = 0x0020

Disable FileRevert menu item.

Definition at line 41 of file docmanag.h.

◆ dmSaveEnable

const uint owl::dmSaveEnable = 0x0010

Enable FileSave even if doc is unmodified.

Definition at line 40 of file docmanag.h.

◆ dmSDI

const uint owl::dmSDI = 0x0001

Does not support multiple open documents.

Definition at line 37 of file docmanag.h.

◆ dtAutoDelete

const uint owl::dtAutoDelete = 0x40000000L

delete doc when last view is deleted

Definition at line 220 of file doctpl.h.

◆ dtAutoOpen

const uint owl::dtAutoOpen = 0x08000000L

open document upon creation

Definition at line 223 of file doctpl.h.

◆ dtCreatePrompt

const uint owl::dtCreatePrompt = 0x2000

Definition at line 240 of file doctpl.h.

◆ dtDynRegInfo

const uint owl::dtDynRegInfo = 0x00800000L

reginfo table is dynamic, not static

Definition at line 227 of file doctpl.h.

◆ dtFileMustExist

const uint owl::dtFileMustExist = 0x1000

Definition at line 239 of file doctpl.h.

◆ dtForbidNew

const uint owl::dtForbidNew = 0x00100000L

forbids creating new document

Definition at line 230 of file doctpl.h.

◆ dtHidden

const uint owl::dtHidden = 0x02000000L

hide template from user selection

Definition at line 225 of file doctpl.h.

◆ dtHideReadOnly

const uint owl::dtHideReadOnly = 0x0004

Definition at line 237 of file doctpl.h.

◆ dtNewDoc

const uint owl::dtNewDoc = 0x80000000L

create new document, no path used

Definition at line 219 of file doctpl.h.

◆ dtNoAutoView

const uint owl::dtNoAutoView = 0x20000000L

no automatic create of default view

Definition at line 221 of file doctpl.h.

◆ dtNoReadOnly

const uint owl::dtNoReadOnly = 0x8000

Definition at line 241 of file doctpl.h.

◆ dtNoTestCreate

const uint owl::dtNoTestCreate = 0x10000L

Definition at line 242 of file doctpl.h.

◆ dtOverwritePrompt

const uint owl::dtOverwritePrompt = 0x0002

Definition at line 236 of file doctpl.h.

◆ dtPathMustExist

const uint owl::dtPathMustExist = 0x0800

Definition at line 238 of file doctpl.h.

◆ dtProhibited

const uint owl::dtProhibited
Initial value:

Flags which are stripped off when invoking Open/Save dialogs [See SelectDocPath() method for more information ].

Definition at line 48 of file docmanag.h.

◆ dtReadOnly

const uint owl::dtReadOnly = 0x0001

Definition at line 235 of file doctpl.h.

◆ dtRegisterExt

const uint owl::dtRegisterExt = 0x00200000L

register extension with this app

Definition at line 229 of file doctpl.h.

◆ dtSelected

const uint owl::dtSelected = 0x01000000L

indicates template last selected

Definition at line 226 of file doctpl.h.

◆ dtSingleUse

const uint owl::dtSingleUse = 0x00400000L

to be registered as single use

Definition at line 228 of file doctpl.h.

◆ dtSingleView

const uint owl::dtSingleView = 0x10000000L

only a single view per document

Definition at line 222 of file doctpl.h.

◆ dtUpdateDir

const uint owl::dtUpdateDir = 0x04000000L

syncronize directory with dialog dir

Definition at line 224 of file doctpl.h.

◆ pfConstant

const uint owl::pfConstant = 4

property is invariant for object instance

Definition at line 121 of file docview.h.

◆ pfGetBinary

const uint owl::pfGetBinary = 2

property accessible as native non-text format

Definition at line 120 of file docview.h.

◆ pfGetText

const uint owl::pfGetText = 1

property accessible as text format

Definition at line 119 of file docview.h.

◆ pfHidden

const uint owl::pfHidden = 32

property should be hidden from normal browse

Definition at line 124 of file docview.h.

◆ pfSettable

const uint owl::pfSettable = 8

property settable as native format

Definition at line 122 of file docview.h.

◆ pfUnknown

const uint owl::pfUnknown = 16

property defined but unavailable in object

Definition at line 123 of file docview.h.

◆ pfUserDef

const uint owl::pfUserDef =128

property has been user-defined at run time

Definition at line 125 of file docview.h.

◆ vnCommit

const uint owl::vnCommit = 5

document is committing, flush cached changes

Definition at line 106 of file docview.h.

◆ vnCustomBase

const uint owl::vnCustomBase = 100

base of document class specific notifications

Definition at line 110 of file docview.h.

◆ vnDocClosed

const uint owl::vnDocClosed = 4

document has just been closed

Definition at line 105 of file docview.h.

◆ vnDocOpened

const uint owl::vnDocOpened = 3

document has just been opened

Definition at line 104 of file docview.h.

◆ vnIsDirty

const uint owl::vnIsDirty = 7

respond true if uncommitted changes present

Definition at line 108 of file docview.h.

◆ vnIsWindow

const uint owl::vnIsWindow = 8

respond true if passed HWND is that of view

Definition at line 109 of file docview.h.

◆ vnRevert

const uint owl::vnRevert = 6

document has reverted, reload data from doc

Definition at line 107 of file docview.h.

◆ vnViewClosed

const uint owl::vnViewClosed = 2

another view is about to be destructed

Definition at line 103 of file docview.h.

◆ vnViewOpened

const uint owl::vnViewOpened = 1

a new view has just been constructed

Definition at line 102 of file docview.h.

Friends

◆ TFileInStream

friend class TFileInStream
friend

Definition at line 90 of file filedoc.h.

◆ TFileOutStream

friend class TFileOutStream
friend

Definition at line 91 of file filedoc.h.