Layer | PD_Layer |
Object | PDOCMD |
The PDOCMD object represents an optional-content membership dictionary (OCMD) that allows the visibility of optional content to depend on the states in a set of optional-content groups (PDOCG). The object corresponds to the PDF OCMD dictionary.
An OCMD collects a set of OCGs. It sets a visibility policy, so that content in the member groups is visible only when all groups are ON or OFF, or when any of the groups is ON or OFF. This makes it possible to set up complex dependencies among groups.
An optional-content context can contain a stack of OCMD objects, which you can manipulate with PDOCContextPopOCMD(), PDOCContextPushOCMD(), and PDOCContextResetOCMDStack().
An OCMD can be associated with an annotation (PDAnnotSetOCMD()) or a PDE element (PDEElementSetOCMD()).
Typedef | ||
---|---|---|
PDOCMD
A PDOCMD is an object that is attached to content to indicate membership in an OCG or group of OCGs.
|
Enumeration | ||
---|---|---|
PDOCMDVisPolicy
PDOCMDVisPolicy represents the four legal values for the /P key in an Optional Content Membership Dictionary (OCMD) dictionary. They specify the visibility of content with respect to the on/off state of the Optional Content Groups (OCGs) listed in the OCMD.
|
Method | ||
---|---|---|
Creates a new optional-content membership dictionary (OCMD) object in the given document for the given groups and visibility policy.
|
||
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.
|
||
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.
|
||
CosObj PDOCMDGetCosObj(PDOCMD pdocmd)
Gets the Cos object associated with the optional-content membership dictionary (OCMD) object.
|
||
PDOCMD PDOCMDGetFromCosObj(CosObj obj)
Gets an optional-content membership dictionary (OCMD) object from the associated Cos object.
|
||
PDOCG* PDOCMDGetOCGs(PDOCMD pdocmd)
Gets the optional-content groups listed in a membership dictionary.
|
||
PDDoc PDOCMDGetPDDoc(PDOCMD pdocmd)
Gets the document that contains an optional-content membership dictionary.
|
||
If the PDOCMD has a visibility expression entry, the function returns true, and if veObj is non-NULL, *veObj is set to the CosObj for the visibility expression. If the PDOCMD does not have a visibility expression entry, the function returns false.
|
||
PDOCMDVisPolicy PDOCMDGetVisPolicy(PDOCMD pdocmd)
Gets the optional-content membership dictionary's visibility policy, which determines the visibility of content with respect to the ON-OFF state of OCGs listed in the dictionary.
|
||
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.
|
||
Tests a set of optional-content membership dictionaries to determine whether contents tagged with any of them is visible in a given optional-content context. The method calls PDOCMDIsCurrentlyVisible() on each of the dictionaries. If content is visible in the given context in any of the dictionaries, this method returns true.
|
||
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.
|
PDOCMD |
Product availability: All |
Platform availability: All |
typedef struct _t_PDOCMD* PDOCMD;
A PDOCMD is an object that is attached to content to indicate membership in an OCG or group of OCGs.
File: PDExpT.h |
Line: 5529 |
PDOCMDVisPolicy |
Product availability: All |
Platform availability: All |
enum PDOCMDVisPolicy {
kOCMDVisibility_AllOn,
kOCMDVisibility_AnyOn,
kOCMDVisibility_AnyOff,
kOCMDVisibility_AllOff
}
File: PDExpT.h |
Line: 5557 |
PDOCMDCreate | () |
Product availability: All |
Platform availability: All |
PDOCMD PDOCMDCreate(PDDoc pdDoc, PDOCG* ocgs, PDOCMDVisPolicy policy)
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.
Parameters
pdDoc — | The document in which the dictionary is used. |
|
ocgs — | A |
|
policy — | The visibility policy that determines the visibility of content with respect to the |
The newly created dictionary object, or |
See Also
Since
File: PDProcs.h |
Line: 9101 |
PDOCMDFindOrCreate | () |
Product availability: All |
Platform availability: All |
PDOCMD PDOCMDFindOrCreate(PDDoc pdDoc, PDOCG* ocgs, PDOCMDVisPolicy policy)
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.
Parameters
pdDoc — | The document in which the dictionary is used. |
|
ocgs — | A |
|
policy — | The visibility policy that determines the visibility of content with respect to the |
The newly created or existing dictionary object, or |
See Also
Since
File: PDProcs.h |
Line: 9135 |
PDOCMDFindOrCreateEx | () |
Product availability: All |
Platform availability: All |
PDOCMD PDOCMDFindOrCreateEx(PDDoc pdDoc, PDOCG* ocgs, PDOCMDVisPolicy policy, CosObj veObj)
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.
Parameters
pdDoc — | ||
ocgs — | A list of OCGs, or |
|
policy — | ||
veObj — | A CosObj containing a visibility expression. |
See Also
Since
File: PDProcs.h |
Line: 11081 |
PDOCMDGetCosObj | () |
Product availability: All |
Platform availability: All |
Gets the Cos object associated with the optional-content membership dictionary (OCMD) object.
Parameters
pdocmd — | The dictionary object. |
The Cos object. |
See Also
Since
File: PDProcs.h |
Line: 9145 |
PDOCMDGetFromCosObj | () |
Product availability: All |
Platform availability: All |
Gets an optional-content membership dictionary (OCMD) object from the associated Cos object.
Parameters
obj — | The Cos object. |
The dictionary object. |
See Also
Since
File: PDProcs.h |
Line: 9168 |
PDOCMDGetOCGs | () |
Product availability: All |
Platform availability: All |
Gets the optional-content groups listed in a membership dictionary.
Parameters
pdocmd — | The membership dictionary whose OCGs are obtained. |
A |
Since
File: PDProcs.h |
Line: 9180 |
PDOCMDGetPDDoc | () |
Product availability: All |
Platform availability: All |
Gets the document that contains an optional-content membership dictionary.
Parameters
pdocmd — | The dictionary for which the document is desired. |
The document object. |
See Also
Since
File: PDProcs.h |
Line: 9157 |
PDOCMDGetVisibilityExpression | () |
Product availability: All |
Platform availability: All |
If the PDOCMD has a visibility expression entry, the function returns true
, and if veObj
is non-NULL
, *veObj
is set to the CosObj for the visibility expression. If the PDOCMD does not have a visibility expression entry, the function returns false
.
Parameters
ocmd — | ||
veObj — | The cos object in which to return the visibility expression. |
|
See Also
Since
File: PDProcs.h |
Line: 11095 |
PDOCMDGetVisPolicy | () |
Product availability: All |
Platform availability: All |
PDOCMDVisPolicy PDOCMDGetVisPolicy(PDOCMD pdocmd)
Gets the optional-content membership dictionary's visibility policy, which determines the visibility of content with respect to the ON-OFF
state of OCGs listed in the dictionary.
Parameters
pdocmd — | The dictionary whose policy is obtained. |
The visibility policy. |
See Also
Since
File: PDProcs.h |
Line: 9193 |
PDOCMDIsCurrentlyVisible | () |
Product availability: All |
Platform availability: All |
ASBool PDOCMDIsCurrentlyVisible(PDOCMD pdocmd, PDOCContext ocContext)
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.
Parameters
pdocmd — | The dictionary. |
|
ocContext — | The context in which the visibility of content is tested. |
|
See Also
Since
File: PDProcs.h |
Line: 9253 |
PDOCMDsAreCurrentlyVisible | () |
Product availability: All |
Platform availability: All |
ASBool PDOCMDsAreCurrentlyVisible(PDOCMD* pdocmds, PDOCContext ocContext)
Tests a set of optional-content membership dictionaries to determine whether contents tagged with any of them is visible in a given optional-content context. The method calls PDOCMDIsCurrentlyVisible() on each of the dictionaries. If content is visible in the given context in any of the dictionaries, this method returns true
.
Parameters
pdocmds — | A |
|
ocContext — | The context in which visibility is tested. |
|
See Also
Since
File: PDProcs.h |
Line: 9272 |
PDOCMDsMakeContentVisible | () |
Product availability: All |
Platform availability: All |
ASBool PDOCMDsMakeContentVisible(PDOCMD* ocmds, PDOCContext ocContext)
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.
Parameters
ocmds — | A |
|
ocContext — | The context in which the contents are made visible. |
|
See Also
Since
File: PDProcs.h |
Line: 9320 |