kOCMDVisibility_AllOn | |
kOCMDVisibility_AnyOn | |
kOCMDVisibility_AnyOff | |
kOCMDVisibility_AllOff |
typedef
struct
_t_PDOCMD
*
PDOCMD
;
For value options see PDOCMDVisPolicies.
typedef
ASUns8
PDOCMDVisPolicy
;
Creates a new optional-content membership dictionary (OCMD) object in the given document for the given groups and visibility policy.
To add a group to an existing OCMD, get the current OCG list, modify it, then create a new OCMD with the new list of groups.
PDOCMD
PDOCMDCreate(
PDDoc
pdDoc
,
PDOCG
*
ocgs
,
PDOCMDVisPolicy
policy
);
pdDoc | The document in which the dictionary is used.
|
ocgs | A
NULL -terminated array of optional-content groups (OCGs) to be members of the dictionary. |
policy | The visibility policy that determines the visibility of content with respect to the
ON-OFF state of OCGs listed in the dictionary. |
NULL
if no groups are supplied. Locates an existing optional-content membership dictionary (OCMD) object that references the given groups, and that uses the same visibility policy. If no such dictionary is found, the method creates one.
If only one group is supplied, the policy is kOCMDVisibility_AnyOn or kOCMDVisibility_AllOn, and no matching dictionary is found, the method creates an OCMD that directly contains the group without the level of indirection normally introduced by an OCMD. If the indirection is needed to add more groups to the OCMD, use PDOCMDCreate().
To add a group to an existing OCMD, get the current OCG list, modify it, then create a new OCMD with the new list of groups.
PDOCMD
PDOCMDFindOrCreate(
PDDoc
pdDoc
,
PDOCG
*
ocgs
,
PDOCMDVisPolicy
policy
);
pdDoc | The document in which the dictionary is used.
|
ocgs | A
NULL -terminated array of optional-content groups (OCGs) to be members of the dictionary. |
policy | The visibility policy that determines the visibility of content with respect to the
ON-OFF state of OCGs listed in the dictionary. |
NULL
if no groups are supplied. Locates an existing optional-content membership dictionary (PDOCMD) object that references the given groups, uses the same visibility policy, and uses the same visibility expression. If no such PDOCMD is found, the method creates one.
The fourth parameter, veObj
must be a CosNull object or a CosArray object. If it is a CosNull object, this call is identical to PDOCMDFindOrCreate(). If it is an array object, it is used as the OCMD's visibility expression.
PDOCMD
PDOCMDFindOrCreateEx(
PDDoc
pdDoc
,
PDOCG
*
ocgs
,
PDOCMDVisPolicy
policy
,
CosObj
veObj
);
pdDoc | |
ocgs | A list of OCGs, or
NULL if only a visibility expression is to be used. |
policy | The visibility policy to use. unused if
ocgs is NULL . |
veObj | A CosObj containing a visibility expression.
|
CosObj
PDOCMDGetCosObj(
PDOCMD
pdocmd
);
pdocmd | The dictionary object.
|
PDOCMD
PDOCMDGetFromCosObj(
CosObj
obj
);
obj | The Cos object.
|
PDOCG
*
PDOCMDGetOCGs(
PDOCMD
pdocmd
);
pdocmd | The membership dictionary whose OCGs are obtained.
|
PDDoc
PDOCMDGetPDDoc(
PDOCMD
pdocmd
);
pdocmd | The dictionary for which the document is desired.
|
ON-OFF
state of OCGs listed in the dictionary. PDOCMDVisPolicy
PDOCMDGetVisPolicy(
PDOCMD
pdocmd
);
pdocmd | The dictionary whose policy is obtained.
|
ASBool
PDOCMDGetVisibilityExpression(
PDOCMD
ocmd
,
CosObj
*
veObj
);
ocmd | The PDOCMD in which to check for a visibility expression.
|
veObj | The cos object in which to return the visibility expression.
|
Based on the optional-content groups listed in the dictionary, the current ON-OFF
state of those groups within the specified context, and the dictionary's visibility policy, test whether the content tagged with this dictionary would be visible.
It ignores the context's current PDOCDrawEnumType and NonOCDrawing settings.
ASBool
PDOCMDIsCurrentlyVisible(
PDOCMD
pdocmd
,
PDOCContext
ocContext
);
pdocmd | The dictionary.
|
ocContext | The context in which the visibility of content is tested.
|
true
. ASBool
PDOCMDsAreCurrentlyVisible(
PDOCMD
*
pdocmds
,
PDOCContext
ocContext
);
pdocmds | A
NULL -terminated array of dictionaries to test. |
ocContext | The context in which visibility is tested.
|
Makes content that uses any of a set of optional-content membership dictionaries visible in a given optional-content context. The method manipulates the states of optional-content groups in the dictionaries so that any content controlled by any of the dictionaries will be visible in the given context. There can be more than one combination of states that satisfies the request. The particular combination of states is not guaranteed from one call to the next.
The method returns false
if it is not possible to make the content visible (for example, if there are nested dictionaries where one specifies "show
if
the
group
state
is
ON"
and the other specifies "show
if
the
group
state
is
OFF"
). In such a case, visibility is always off, so no state setting can make the content visible.
This method ignores the context's draw type.
ASBool
PDOCMDsMakeContentVisible(
PDOCMD
*
ocmds
,
PDOCContext
ocContext
);
ocmds | A
NULL -terminated array of dictionaries to act upon. |
ocContext | The context in which the contents are made visible.
|