OptionalContentMembershipDict Class Documentation

classOptionalContentMembershipDict

Namespace:datalogics_interface

Detailed Description

Form, container, and annotation objects can be associated with one or more optional content groups. By associating them with an optional content group, they become part of that 'layer', and the user can control the visibility of the content.

Note that by placing other element objects in a container, they can also be associated with an optional content group.

An OptionalContentMembershipDict connects content to the OptionalContentGroup; it contains a list of OptionalContentGroups, and rules for determining visibility when the OptionalContentGroups have conflicting on/off states in the active OptionalContentContext.

An OptionalContentMembershipDict cannot be changed once created; you must create a new OptionalContentMembershipDict and change the objects to point to it.

Referenced by

Constructor & Destructor Documentation

OptionalContentMembershipDict

OptionalContentMembershipDict(const Document &doc, const std::vector< OptionalContentGroup > &ocgs, VisibilityPolicyvp, const PDFArray &visibility_expression)

Parameters

doc: const Document &

The document that the new OptionalContentMembershipDict will belong to.

ocgs: const std::vector< OptionalContentGroup > &

The list of OptionalContentGroups this MembershipDict refers to.

vp: VisibilityPolicy

The VisibilityPolicy of this MembershipDict.

visibility_expression: const PDFArray &

Create a new OptionalContentMembershipDict.

~OptionalContentMembershipDict

~OptionalContentMembershipDict()

Member Function Documentation

get_optional_content_groups

std::vector< OptionalContentGroup >get_optional_content_groups()

Returns:

An array containing OptionalContentGroups.

Gets the list of OptionalContentGroups for this membership dictionary. This may consist of one OCG or several.

get_visibility_expression

std::unique_ptr< PDFArray >get_visibility_expression()

Returns:

A Visibility Expression array.

GetVisibilityExpression Gets the Visibility Expression for this membership dictionary.

get_visibility_policy

VisibilityPolicyget_visibility_policy()

Returns:

A Visibility Policy.

Gets the Visbility Policy for this membership dictionary.

operator==

Parameters

other: const OptionalContentMembershipDict &

The OptionalContentMembershipDict to compare with.

Returns:

true if both objects refer to the same membership dictionary; false otherwise.

Two OptionalContentMembershipDict objects are considered equal if they refer to the same underlying PDOCMD object.

to_string

std::stringto_string()

Returns:

A string describing this OptionalContentMembershipDict.

The string includes the names of all associated OptionalContentGroups and the current VisibilityPolicy.