Table 14-1 lists the clsApp messages.
msgNew P_APP_NEW
msgN ewDefaults P~PP_NEW
msgApp Dispatch nothing
msgAppInit DIR_HANDLE
msgAppActivate nothing
msgAppOpen P_APP_OPEN
msgAppOpenTo U32
msgAppClose nothing
msgAppCloseT 0 U32
msgApp TerminateOK nothing
msgAppTerminate BOOLEAN
msgAppSave nothing
msgAppSaveT 0 DIR_HANDLE
msgAppRestore nothing
Creates and initializes a new document.
Initializes the APP _NEW structure to default values.
Starts message dispatching.
Creates the default document data file and main window.
Activates a document and its children.
Opens a document's main window.
Opens a document to a specific state.
Closes a document's main window.
Closes a document to a specific state.
Checks if a document is willing to terminate.
Terminates a document.
Saves a document to its working directory.
Saves a document to a specified directory.
Restores an document from its saved instance data.
158 PENPOINT ARCHITECTURAL REFERENCE
Restores an document from a specified directory.
Deletes a document from the system.
Destroys a document.
Checks to see if a document and its children are willing to be freed.
Gets the document's root document (which is typically the Notebook).
Sets the parent document.
Activates the document's embedded documents.
Instantiates and activates an embedded document.
Saves the specified child document.
Saves a document's children.
Opens all of the documents on the metrics.children list.
Opens a specific child.
Closes a document's children.
Closes a specific child.
Gets a document's direct parent in the filesystem heirarchy.
Creates a link to another document.
Deletes the specified link handle.
Gets the document's UUID for the specified link handle.
Activates the embedded documents in the cork margin.
Document Attributes Turns hot mode on or off
Sets the document's main window.
Gets a copy of the application metrics.
Sets a document's displayed name (in its main window title).
Gets a document's name.
Renames a document.
Sets the read only flag.
Sets the dele table flag.
Sets the movable flag. Not implemented.
Sets the copyable flag. Not implemented.
Tests if any object in a document owns the selection.
Asks a document if it shows up as a page in the Notebook (as opposed to being embedded).
Tells the document to save itself before terminating.
(onfinued
Message
Turns the document's title line on or off.
Turns the document's menu bar on or off.
Turns the document's scroll bars on or off.
Sets the border style.
Turns the document's cork margin on or off.
Asks a document to provide its main window.
Creates the standard application menu bar.
Creates the document's client window.
P _APP _GET_EMBEDDED_ WIN Finds the specified clsEmbeddedWin object within a document.
P _APP _GET _APP _ WIN WIN
WIN
Finds a clsApp Win object within a document.
Adds a window to the document's list of floating windows.
Removes a window from the document's list of floating windows.
P _APP _FIND_FLOATING_WIN Finds the floating window that matches the given tag.
WIN Sets the window that is used as the parent window for child documents.
nothing Hides an open document.
P_RECT32 Sets a document's floating size and position.
P_RECT32 Sets a document's open size and position.
Standard Menu
BOOLEAN Reverts to the filed copy of the document.
OBJECT Sends a document.
OBJECT Prints a document.
nothing Displays the print setup option sheet.
nothing Obsolete message. Not implemented.
OBJECT Prepares to export a document as a file.
nothing Displays the document's ''About'' option sheet.
nothinged Shows help for the application. Not implemented -reserved.
nothing Undoes the previous operation.
nothing Prepares to move the document's selection.
nothing Prepares to copy the document's selection.
nothing Deletes the document's selection.
nothing Selects all of the objects in the document.
OBJECT Searches a document for a string.
OBJECT Prepares to check the document's spelling.
OBJECT Routes a message to a manager.
(onth'1ued
160 PENPOINT ARCHITECTURAL REFERENCE Part 2 I PenPoint Application Framework
msgAppExecute msgAppExecuteGesture
Descripth:in
Sent to the manager to execute the manager's behavior on a document.
Invokes the default gesture behavior for a document's title line.
msgAppAddCards msgAppShowOptionSheet
P _OPTION_TAG Adds cards to the specified option sheet.
P _APP _SHOW_OPTION_SHEET Shows or hides an option sheet.
msgAppGetOptionSheet P _APP _GET_OPTION_SHEET Gets the requested option sheet.
msgAppGetDocOptionSheetClient P _OBJECT Gets the client for the document's option sheets.
msgAppApplyEmbeddeeProps msgApp TerminateConditionChanged nothing
msgAppSelChanged BOOLEAN
msgAppOpened APP_OPENED
msgAppClosed APP_CLOSED
msgAppCreated P _APP _CREATED
msgAppMoved P _APP _MOVED_COPIED
msgAppCopied P _APP _MOVED_COPIED
msgAppChanged P_APP_CHANGED
msgAppChildChanged P _APP _CHILD_CHANGED
msgAppInstalled CLASS
msgAppDeInstalled CLASS
Applies Embedded Printing option card values to first level embeddees.
Gets the document's border metrics.
Turns controls on or off
Turns screen decorations off for printing.
Sent to observers of clsApp when a document is deleted.
Sent to observers when a document is floated or unfloated.
Try to terminate the document; sent when a terminate condition changed.
Sent to a document when something in it becomes selected or deselected.
Sent to observers when a document is opened.
Sent to observers when a document is closed.
Sent to observers of clsApp when a document is created.
Sent to observers of clsApp when a document is moved.
Sent to observers of clsApp when a document is copied.
Sent to observers of clsApp when a document has changed.
Sent to observers of a document when a child document is opened or closed.
Sent to observers of clsApp when an application is installed.
Sent to observers of clsApp when an application is deinstalled.
Although the header file for clsApp (APP.H) describes msgNew in its comments, clsApp does not define a method for msgNew. If you subclass clsApp, you should provide a method for msgNew that initializes a new document life cycle messages.
CHAPTER 14 I THE APPLICATION CLASS 161