• Keine Ergebnisse gefunden

Application Directory AHributes Structure

Im Dokument PenPofnt GO (Seite 123-130)

. This· structure is used to specify and pass back the directory attributes in one chunk.

• appClass The document's application class (sub-class of clsApp).

• uuid The document's uuid. Can be used in msgNew to clsDirHandle or clsAppDir to open a handle on a document directory.

• sequence The I-based position of a document within its embeddor. If the document is in a notebook, this is the document's position within its section.

• numChildren The total number of embedded children.

typedef structAPP_DIR_ATTRS {

CLASS appClass;

UUID uuid;

U32 sequence;

U32 numChildren;

APP DIR FLAGS flags;

APP_DIR_ATTRS, *P_APP_DIR_ATTRS;

Messages

msgNew

Creates a new AppDir.

II

Application class.

II

Application uuid.

II

Local sequence number.

II

Number of child apps (recursive).

II

Flags.

Takes P _FS_NEW, returns STATUS. Category: class message.

See fs.h for the FS_NEW structure definition.

clsAppDir has no method for msgNewDefaults. See fs.h for a description of clsDirHandle's handler for msgNewDefaults.

Arguments

Message Argument's

Message Arguments

APPDIR.H 113 Messages

msgAppDirGetAttrs

Passes back a document's application directory attributes.

Takes P _APP _DIR_GET_SET_ATTRS, returns STATUS.

tdefine msgAppDirGetAttrs MakeMsg(clsAppDir, 1) typedef struct APP DIR GET SET ATTRS

P_STRING - pP~thi-

II-in:

Path relative to target directory.

APP DIR ATTRS attrs;

II

in/out: Application directory attributes.

APP_DIR_GET_SET_ATTRS, *P_APP_DIR_GET_SET_ATTRS;

If you are interested in only one of the attributes, use the individual msgAppDirGet ... messages described below. They're generally faster.

msgAppDirSetAttrs

Specifies a document's application directory attributes.

Takes P _APP _DIR_GET_SET_ATTRS, returns STATUS.

tdefine msgAppDirSetAttrs MakeMsg(clsAppDir, 2) typedef struct APP_DIR_GET_SET_ATTRS {

P_STRING pPath;

II

in: Path relative to target directory.

APP_DIR~TTRS attrs;

II

in/out: Application directory attributes.

APP_DIR_GET_SET_ATTRS, *P_APP_DIR_GET_SET_ATTRS;

If you are interested in only one of the attributes, use the individual msgAppDirSet ... messages described below. They're generally faster.

msgAppDirGetFlags

Passes back a document's application directory flags.

Takes P _APP _DIR_GET_SET_FLAGS, returns STATUS.

tdefine msgAppDirGetFlags MakeMsg(clsAppDir, 3) typedef struct APP DIR GET SET FLAGS

P_STRING - pP~th;-

II-in:

Path relative to target directory.

APP DIR FLAGS flags;

II

in/out: Application directory control flags.

APP_DIR_GET_SET_FLAGS, *P~P_DIR_GET_SET_FLAGS;

msgAppDirSetFlags

Specifies a document's application directory flags.

Takes P_APP_DIR_GET_SET_FLAGS, returns STATUS.

tdefine msgAppDirSetFlags MakeMsg(clsAppDir, 4) typedef struct APP_DIR_GET_SET_FLAGS {

P_STRING pPath;

II

in: Path relative to target directory.

APP_DIR_FLAGS flags;

II

in/out: Application directory control flags.

APP_DIR_GET_SET_FLAGS, *P_APP_DIR_GET_SET_FLAGS;

114 PENPOINT API REFERENCE

M0$Stlge At"~~PJmerds

MeS$C1g0

Arguments

Part 2 I PenPoint Application Framework

msgAppDirGetClass

Passes back a document's application class.

Takes P _APP _DIR_UPDATE_CLASS, returns STATUS.

#define msgAppDirGetClass MakeMsg(clsAppDir, 5) typedef struct APP DIR UPDATE CLASS {

P_STRING" ppath;-

17

in: Path relative to target directory.

CLASS appClass;

II

in/out: Application directory class.

APP_DIR_UPDATE_CLASS, *P_APP_DIR_UPDATE_CLASS;

msgAppDirSetClass

Specifies a document's application class.

Takes P _APP _DIR_UPDATE_CLASS, returns STATUS.

#define msgAppDirSetClass MakeMsg(clsAppDir, 6) typedef struct APP_DIR_UPDATE_CLASS {

P_STRING pPath;

II

in: Path relative to target directory.

CLASS appClass;

II

in/out: Application directory class.

APP_DIR_UPDATE_CLASS, *P_APP_DIR_UPDATE_CLASSi

msgAppDirGetUUID

Passes back an application directory's uuid.

Takes P _APP _DIICUPDATE_UUID, returns STATUS.

#define msgAppDirGetUUID MakeMsg(clsAppDir, 7) typedef struct APP_DIR_UPDATE_UUID {

P STRING pPath;

II

in: Path relative to target directory.

UUID uuid;

II

in/out: Application directory uuid.

APP_DIR_UPDATE_UUID, *P_APP_DIR_UPDATE_UUID;

msgAppDirSetUUID

Specifies an application directory's uuid.

Takes P_APP_DIR_UPDATE_UUID, returns STATUS.

#define msgAppDirSetUUID MakeMsg(clsAppDir, 8) typedef struct APP_DIR_UPDATE_UUlD {

P_STRING pPath; II in: Path relative to target directory.

UUID uuid;

II

in/out: Application directory uuid.

APP_DIR_UPDATE_UUID, *P_APP_DlR_UPDATE_UUID;

msgAppDirGetUID

Passes back an application directory's uid.

Takes P _APP _DIR_UPDATE_UID, returns STATUS.

#define msgAppDirGetUID MakeMsg(clsAppDir, 9) typedef struct APP_DIR_UPDATE_UID {

P STRING pPath; II in: Path relative to target directory.

UlD uid;

II

in/out: App directory uid.

APP_DIR_UPDATE_UID, *P_APP_DIR_UPDATE_UID;

Message Arguments

Arguments

Comments

Mess(lge Arguments

Comments

Arguments

Message Arguments

APPDIR.H 115 Messages

msgAppDirSetUID

Specifies an application directory's uid.

Takes P _APP _DIR_UPDATE_UID, returns SfATUS.

fdefine msgAppDirSetUID MakeMsg(clsAppDir, 10) typedef struct APP DIR UPDATE UID {

P STRING pPath;- // in: Path relative to target directory.

UlD uid; // in/out: App directory uid.

APP_DIR_UPDATE_UID, *P_APP_DIR_UPDATE_UID;

msgAppDirGetSequence

Passes back an application directory's sequence number.

Takes P _APP _DIR_UPDATE_SEQ, returns SfATUS.

fdefine msgAppDirGetSequence MakeMsg(clsAppDir, 11) typedef struct APP DIR UPDATE SEQUENCE {

P STRING pPath;-

/7

in: Path relative to target directory.

U32 sequence; // in/out: Application directory sequence.

APP_DIR_UPDATE_SEQUENCE, *P_APP_DIR_UPDATE_SEQUENCE;

If the document is in a notebook, the sequence number is a I-based position within the section.

msgAppDirSetSequence

Specifies an application directory's sequence number.

Takes P _APP _DIR_UPDATE_SEQUENCE, returns STATUS.

fdefine msgAppDirSetSequence MakeMsg(clsAppDir, 12) typedef struct APP DIR UPDATE SEQUENCE {

P STRING pPath;-

/7

in: Path relative to target directory.

U32 sequence; // in/out: Application directory sequence.

} APP_DIR_UPDATE_SEQUENCE, *P_APP_DIR_UPDATE_SEQUENCE;

If the document is in a notebook, the sequence number is a I-based position ~ithin the section.

msgAppDirGetNumChildren

Passes back the total number of embedded children of a document.

Takes P _APP _DIR_UPDATE_NUM_CHILDREN, returns SfATUS.

fdefine msgAppDirGetNumChildren MakeMsg(clsAppDir, 22) typedef struct APP DIR UPDATE NUM CHILDREN {

P STRING pPath;- -

/7

in: Path relative to target directory.

U32 numChildren; // in/out: App directory attr numchildren.

APP_DI R_UPDATE_NUM_CHI LDREN, *P_APP_D I R_UPDATE_NUM_CH I LDREN;

msgAppDirSetNumChildren

Specifies the total number of embedded children of a document.

Takes P _APP _DIR_UPDATE_NUM_CHILDREN, returns SfATUS.

fdefine msgAppDirSetNumChildren MakeMsg(clsAppDir, 23) typedef struct APP DIR UPDATE NUM CHILDREN {

P STRING pPath;- -

/7

in: Path relative to target directory.

U32 numChildren; // in/out: App directory attr numchildren.

APP_DI~UPDATE_NUM_CHILDREN, *P_APP_DIR_UPDATE_NUM_CHILDREN;

116 PENPOINT API REFERENCE

Part 2 I PenPoint Application Framework

msgAppDirGetGlobalSequence

Passes back an application directory's global sequence number.

Takes P _APP _DIR_GET_GLOBAL_SEQUENCE, returns SfATUS.

tdefine msgAppDirGetGlobalSequence MakeMsg(clsAppDir, 21) typedef struct APP DIR GET GLOBAL SEQUENCE {

P_STRING pPath;- -

1/

in: Path relative to target directory.

U32 globalSequence;

II

in/out: App directory global sequence.

APP_DIR_GET_GLOBAL_SEQUENCE, *P_APP_DIR_GET_GLOBAL_SEQUENCE;

The global sequence number is the I-based position of a document within its clsRootContainerApp embeddor (i.e., the document's page number in the notebook).

msgAppDirGetBookmark

Passes back an document's application tab.

Takes P _APP _DIR_GET_BOOKMARK, returns STATUS.

tdefine msgAppDirGetBookmark MakeMsg(clsAppDir, 13) typedef struct APP_DIR_GET_BOOKMARK

P_STRING pPath;

II

in: Path relative to target directory.

char label [nameBuf Length];

II

out: tab label.

APP_DIR_GET_BOOKMARK, *P_APP_DIR_GET_BOOKMARK;

If the application directory has no tab (appDirFlags.bookmark==false), msgAppDirGetBookmark will return stsOK and pArgs->label will be unchanged. For this reason it is recommended that you drop a null byte into pArgs->label[O] before calling msgAppDirGetBookmark. Then, if the application directory has no tab, you will get back a null string.

msgAppDirSetBookmark

Specifies a document's application tab.

Takes P _APP _DIR_SET_BOOKMARK, returns STATUS.

tdefine msgAppDirSetBookmark MakeMsg(clsAppDir, 14) typedef struct APP_DIR_SET_BOOKMARK

BOOLEAN on;

II

in: Turn bookmark on or off.

P STRING pPath;

II

in: Path relative to target directory.

char label [nameBuf Length];

II

in/out: tab label.

APP_DIR_SET_BOOKMARK, *P_APP_DIR_SET_BOOKMARK;

clsAppDir sends msgAppChanged to observers of clsApp as a result of this message. See app.h for a description of ms~ppChanged.

Iflabel[O] is NULL, clsAppDir uses the default label, which is the name of the document.

msgAppDirGetNextlnit

Initializes an APP _DIR_NEXT structure.

Takes P _APP _DIR_NEXT, returns STATUS.

tdefine msgAppDirGetNextInit MakeMsg(clsAppDir, 15)

Send this message to an application directory to prepare it for an ensuing msgAppDirGetNext loop.

Arguments

Passes back the attributes of the next application directory.

Takes P _APP _DI R_N EXT, returns STATUS.

#define msgAppDirGetNext typedef struct APP_DIR_NEXT

APP_DIR_ATTRS attrsi P_STRING pName;

U32 fsFlags;

P UNKNOWN pFirst;

P UNKNOWN pNext;

P UNKNOWN handle;

APP_DIR_NEXT, *P_APP_DIR_NEXT;

II

out:

MakeMsg(clsAppDir, 16) attrs for next child.

Send this message to an application directory in a loop to get the appDirAttrs for each embedded document (not recursive), ordered by sequence number.

You generally do not change the values in the APP _DIR_NEXT structure between calls to msgAppDirGetNext. Doing so jeopardizes the traversal of the embedded documents.

msgAppDirReset

Frees resources after a series of msgAppDirGetNext messages.

Takes P _APP _DIR_NEXT, returns STATUS.

#define msgAppDirReset MakeMsg(clsAppDir, 17) typedef struct APP_DIR_NEXT

APP DIR ATTRS attrs;

II

out: attrs for next child.

APP_DIR_NEXT, *P_APP_DIR_NEXT;

You must send this message to the application directory after the msgAppDirGetNext loop has completed. Failing to do so can cause internally allocated memory not to be deallocated.

msgAppDirSeqToName

Passes back the name of the embedded document with a specified sequence number.

Takes P _APP _DIR_SEQ...TO_NAME, returns STATUS.

#define msgAppDirSeqToName MakeMsg(clsAppDir, 18) typedef struct APP DIR SEQ TO NAME

U32 se~ence; - -

II

in: Sequence number.

P STRING pNamei

II

out: Buffer for name.

II

Must be nameBufLength long.

APP_DIR_SEQ_TO_NAME, *P_APP_DIR_SEQ_TO_NAME;

msgAppDirGetDirectNumChildren

Passes back the number of directly embedded documents (not recursive).

Takes P_U32, returns STATUS.

#define msgAppDirGetDirectNumChildren MakeMsg(clsAppDir, 19)

" 8 PENPOINT API REFERENCE

Part 2 I Pen Point Application Framework

msgAppDirGetTotalNumChildren

Passes back the total number of embedded documents (recursive).

Takes P _U32, returns STATUS.

#define msgAppDirGetTotalNumChildren MakeMsg(clsAppDir, 20)

APPMGR.H

This file contains the API definition for clsAppMgr.

clsAppMgr inherits from clsClass.

Provides support for application classes and document management.

"AppMgr" stands for Application Manager.

Introduction

When you create a new application class (i.e., install an application), rather than sending msgNew to clsClass you send msgNew to clsAppMgr. This allows you to specify properties of the application class, and also to specify in advance some default properties of the documents (i.e., instances) of the

application class.

There is one instance of clsAppMgr for each installed application class. This object is given the well-known uid of the application class. The application manager class implements document management messages and stores information about the installed application class in its instance data.

#ifndef APPMGR_INCLUDED

#define APPMGR_INCLUDED

#include <fs.h>

#include <geo.h>

Common #defines and typedefs

typedef OBJECT APPMGR, *P_APPMGRi

Im Dokument PenPofnt GO (Seite 123-130)