GEOS SDK TechDocs
|
|
3 Basic DC Messages
|
3.2 From the Doc Control Objects
The following are the messages a program might ordinarily send to the GenDocumentGroup object. Many of these messages request information about the GenDocumentControl object or the target document; others request information about the GenDocumentGroup object or instruct it to take actions. Many of the messages require, as an argument, an optr to a document object; however, a null object-pointer can be passed, thus indicating the target document. This is especially useful under single-document models; the application doesn't need to keep track of the document object's optr, since it is always the target document.
void MSG_GEN_DOCUMENT_GROUP_MARK_DIRTY(
optr document); /* document to mark dirty */
This message notifies the GenDocumentGroup object that the specified document has been dirtied. The GenDocumentGroup will enable and disable file menu triggers as appropriate. If the argument is a null pointer, the target document will be marked dirty.
Source: Unrestricted.
Destination: Any GenDocumentGroup object.
Parameters: document optr of document to mark dirty. If a null optr is passed, the target document will be dirtied.
Interception: You should not subclass this message.
Tips: If the document is a VM file and the GenDocumentGroup attribute GDGA_AUTOMATIC_DIRTY_NOTIFICATION is set, the VM routines will notify the GenDocumentGroup that the document has been dirtied whenever the
VMDirty()
(or
DBDirty()
,
CellDirty()
, etc.) routine is called. However, if you change a data cache without changing the actual file, you should send this message (or
MSG_GEN_DOCUMENT_GROUP_MA
RK_DIRTY_BY_FILE) to insure that the changes to the cache will be saved.
void MSG_GEN_DOCUMENT_GROUP_MARK_DIRTY_BY_FILE(
FileHandle file); /* file handle of document to mark dirty */
This message notifies the GenDocumentGroup that the file with the specified handle has been dirtied. The GenDocumentGroup will enable and disable file menu triggers as appropriate. The document is specified by file handle, not document optr.
Source: Unrestricted
Destination: Any GenDocumentGroup object.
Parameters: file The handle of the file to dirty.
Interception: You should not subclass this message.
Tips: If the document is a VM file and the GenDocumentGroup attribute GDGA_AUTOMATIC_DIRTY_NOTIFICATION is set, the VM routines will notify the GenDocumentGroup that the document has been dirtied whenever the
VMDirty()
(or
DBDirty()
,
CellDirty()
, etc.) routine is called. However, if you change a data cache without changing the actual file, you should send this message (or
MSG_GEN_DOCUMENT_GROUP_MARK_DIRTY
) to insure that the changes to the cache will be saved.
optr MSG_GEN_DOCUMENT_GROUP_GET_DOC_BY_FILE(
FileHandle file);
Use this message if you know the file handle of a document and you need to get an object-pointer to the document object corresponding to the file. In the inverse situation (you know the object, and need to get the file handle), send
MSG_GEN_DOCUMENT_GET_FILE_HANDLE
directly to the document object.
Source: Unrestricted.
Destination: Any GenDocumentGroup object.
Parameters: file The handle of file whose document object is needed.
Return: Returns the optr of document object
Interception: You should not subclass this message.
void MSG_GEN_DOCUMENT_GROUP_SAVE_AS_CANCELLED();
If you are in the midst of handling a "Save As" operation, and you need to cancel it, send this message to the GenDocumentGroup object.
Source: Unrestricted
Destination: Any GenDocumentGroup object.
Interception: This message is not generally subclassed.
GEOS SDK TechDocs
|
|
3 Basic DC Messages
|
3.2 From the Doc Control Objects