Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
optionalcontent.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
5#ifndef JAWSMAKO_OPTIONALCONTENT_H
6#define JAWSMAKO_OPTIONALCONTENT_H
7
21
22#include <jawsmako/types.h>
23#include <jawsmako/hashable.h>
24
25namespace JawsMako
26{
27 using namespace EDL;
28
29 // Forward declarations
42
53
68
70
77 {
78 public:
79 virtual ~IOptionalContent() {}
80
89 static JAWSMAKO_API IOptionalContentPtr create(const IJawsMakoPtr &jawsMako,
90 const IOptionalContentConfigurationPtr &defaultConfiguration = IOptionalContentConfigurationPtr());
91
97 virtual IOptionalContentPtr clone() = 0;
98
99 /*
100 *
101 * Making content optional - convenience routines.
102 *
103 */
104
113 virtual IOptionalContentGroupPtr makeNewGroup(const U8String &name, bool visible) = 0;
114
138 virtual IDOMNodePtr makeNodeOptional(const IDOMNodePtr &node, const IOptionalContentGroupPtr &group) = 0;
139
148 IDOMNodePtr makeNodeOptionalWithNewGroup(const IDOMNodePtr &node, const U8String &newGroupName, bool visible)
149 {
150 IOptionalContentGroupPtr group = makeNewGroup(newGroupName, visible);
151 return makeNodeOptional(node, group);
152 }
153
154 /*
155 *
156 * Visibility Queries
157 *
158 */
159
171 virtual bool groupIsVisible(const IOptionalContentGroupPtr &group,
173 const IOptionalContentConfigurationPtr &configuration = IOptionalContentConfigurationPtr()) = 0;
174
186 virtual bool groupIsVisible(const IOptionalContentGroupReferencePtr &groupRef,
188 const IOptionalContentConfigurationPtr &configuration = IOptionalContentConfigurationPtr()) = 0;
189
203 virtual bool groupShouldBeIgnored(const IOptionalContentGroupPtr &group,
205 const IOptionalContentConfigurationPtr &configuration = IOptionalContentConfigurationPtr()) = 0;
206
220 virtual bool groupShouldBeIgnored(const IOptionalContentGroupReferencePtr &groupRef,
222 const IOptionalContentConfigurationPtr &configuration = IOptionalContentConfigurationPtr()) = 0;
223
224 /*
225 *
226 * Manipulation and Interrogation
227 *
228 */
229
235 virtual bool groupIsPresent(const IOptionalContentGroupReferencePtr &groupRef) const = 0;
236
243 virtual IOptionalContentGroupPtr getGroup(const IOptionalContentGroupReferencePtr &groupRef) const = 0;
244
259 virtual void forceGroupState(const IOptionalContentGroupPtr &group, bool visible) = 0;
260
266
272 virtual void addGroup(const IOptionalContentGroupPtr &group) = 0;
273
283 virtual void addGroup(const IOptionalContentGroupPtr &group, const IDocumentPtr &sourceDocument) = 0;
284
291 virtual void removeGroup(const IOptionalContentGroupPtr &group) = 0;
292
306 virtual void setDefaultConfiguration(const IOptionalContentConfigurationPtr &configuration) = 0;
307
312 virtual IOptionalContentConfigurationPtr getDefaultConfiguration() const = 0;
313
319 virtual void addConfiguration(const IOptionalContentConfigurationPtr &configuration) = 0;
320
327 virtual void removeConfiguration(const IOptionalContentConfigurationPtr &configuration) = 0;
328
334 };
335
336
345 {
346 public:
348
360
369 static JAWSMAKO_API IOptionalContentDetailsPtr create(const IJawsMakoPtr jawsMako,
370 const IOptionalContentGroupReferencePtr &groupRef = IOptionalContentGroupReferencePtr(),
371 const IOptionalContentPtr &optionalContent = IOptionalContentPtr());
372
385 static JAWSMAKO_API IOptionalContentDetailsPtr create(const IJawsMakoPtr jawsMako,
387 eVisibilityPolicy policy,
388 const IOptionalContentVisibilityExpressionPtr &visibilityExpression = IOptionalContentVisibilityExpressionPtr(),
389 const IOptionalContentPtr &optionalContent = IOptionalContentPtr());
390
395 virtual IOptionalContentDetailsPtr clone() const = 0;
396
414 const IOptionalContentPtr &optionalContent = IOptionalContentPtr()) const = 0;
415
426 virtual void addGroup(const IOptionalContentGroupReferencePtr &groupRef) = 0;
427
432 virtual void removeGroup(const IOptionalContentGroupReferencePtr &groupRef) = 0;
433
439
447 virtual void setVisibilityPolicy(eVisibilityPolicy policy) = 0;
448
454
464 virtual void setVisibilityExpression(const IOptionalContentVisibilityExpressionPtr &expression) = 0;
465
470 virtual IOptionalContentVisibilityExpressionPtr getVisibilityExpression() = 0;
471
472 };
473
480 {
481 public:
483
489 virtual bool equals(const IOptionalContentGroupReferencePtr &reference) const = 0;
490 };
491
498 {
499 public:
501
509 static JAWSMAKO_API IOptionalContentGroupPtr create(const IJawsMakoPtr &jawsMako, const U8String &name);
510
517 virtual IOptionalContentGroupPtr clone() = 0;
518
524 virtual IOptionalContentGroupReferencePtr getReference() const = 0;
525
531 virtual void setName(const U8String &name) = 0;
532
537 virtual U8String getName() const = 0;
538
544 virtual void setIntent(const U8String &intent) = 0;
545
550 virtual void setIntents(const CU8StringVect &intents) = 0;
551
558 virtual CU8StringVect getIntents() const = 0;
559
565 virtual void setUsage(const IOptionalContentGroupUsagePtr &usage) = 0;
566
571 virtual IOptionalContentGroupUsagePtr getUsage() const = 0;
572
578 virtual U8String getGTSProcStepsType () const = 0;
579
585 virtual void setGTSProcStepsType (const U8String &procStepsType) = 0;
586
592 virtual U8String getGTSProcStepsGroup () const = 0;
593
599 virtual void setGTSProcStepsGroup (const U8String &procStepsGroup) = 0;
600 };
601
602
603 /*
604 *
605 *
606 * Advanced API
607 *
608 *
609 */
610
611
626 {
627 public:
629
635 static JAWSMAKO_API IOptionalContentGroupUsagePtr create(const IJawsMakoPtr &jawsMako);
636
641 virtual IOptionalContentGroupUsagePtr clone() const = 0;
642
654 virtual void setLanguage(const U8String &language, bool preferred = false) = 0;
655
661 virtual U8String getLanguage() const = 0;
662
668 virtual bool getLanguageIsPreferred() const = 0;
669
677
685
693 virtual void setZoomVisibility(float minimumZoom, float maximumZoom) = 0;
694
695#ifdef SWIG
696 %apply float & OUTPUT { float &minimumZoom };
697 %apply float & OUTPUT { float &maximumZoom };
698#endif
705 virtual void getZoomVisibility(float &minimumZoom, float &maximumZoom) const = 0;
706#ifdef SWIG
707 %clear float &minimumZoom;
708 %clear float &maximumZoom;
709#endif
710
719 virtual void setPrintVisibility(eOptionalContentVisibility visibility, const U8String &description = U8String()) = 0;
720
727
734
740 virtual void setViewVisibility(eOptionalContentVisibility visibility) = 0;
741
748
758 virtual void setUsers(const U8String &type, const CU8StringVect &users) = 0;
759
766 virtual CU8StringVect getUsers(U8String &type) const = 0;
767
776 virtual void setPageElement(const U8String &type) = 0;
777
783 virtual U8String getPageElement() const = 0;
784
800 };
801
802
810 {
811 public:
813
820 static JAWSMAKO_API IOptionalContentGroupUsageApplicationPtr create(const IJawsMakoPtr &jawsMako,
822
827 virtual IOptionalContentGroupUsageApplicationPtr clone() const = 0;
828
834 virtual void setEvent(eOptionalContentEvent event) = 0;
835
841 virtual eOptionalContentEvent getEvent() const = 0;
842
849
856
862 virtual void addGroup(const IOptionalContentGroupReferencePtr &groupRef) = 0;
863
869 virtual bool groupIsAffected(const IOptionalContentGroupReferencePtr &groupRef) const = 0;
870
876 virtual void setCategories(const COCCategoryVect &categories) = 0;
877
883 virtual COCCategoryVect getCategories() const = 0;
884
890 virtual bool categoryInCategories(eOptionalContentCategory category) const = 0;
891
898 virtual bool categoriesInCategories(const COCCategoryVect &categories) const = 0;
899 };
900
907 {
908 public:
910
916 static JAWSMAKO_API IOptionalContentConfigurationPtr create(const IJawsMakoPtr &jawsMako);
917
922 virtual IOptionalContentConfigurationPtr clone() const = 0;
923
929 virtual void setName(const U8String &name) = 0;
930
936 virtual U8String getName() const = 0;
937
943 virtual void setCreator(const U8String &creator) = 0;
944
950 virtual U8String getCreator() const = 0;
951
957 virtual void setBaseState(eOptionalContentVisibility visibility) = 0;
958
965
972
979
985 virtual bool groupInVisibleGroups(const IOptionalContentGroupReferencePtr &groupRef) const = 0;
986
993
1000
1006 virtual bool groupInInvisibleGroups(const IOptionalContentGroupReferencePtr &groupRef) const = 0;
1007
1013 virtual void setIntent(const U8String &intent) = 0;
1014
1023 virtual void setIntents(const CU8StringVect &intents) = 0;
1024
1031 virtual CU8StringVect getIntents() const = 0;
1032
1040 virtual bool intentInIntents(const U8String &intent) const = 0;
1041
1046 virtual void setAutoStates(const COptionalContentGroupUsageApplicationVect &applications) = 0;
1047
1053
1054 class COrderEntry;
1056 typedef CEDLVector<COrderEntryPtr> COrderEntryVect;
1057
1063 {
1064 public:
1070 static COrderEntryPtr create();
1071
1077 COrderEntryPtr clone();
1078
1085
1086 IOptionalContentGroupReferencePtr groupRef;
1087
1090 };
1091
1096 virtual void setOrder(const COrderEntryVect &order) = 0;
1097
1103 virtual COrderEntryVect getOrder() const = 0;
1104
1114
1120 virtual void setListMode(eListMode listMode) = 0;
1121
1127 virtual eListMode getListMode() const = 0;
1128
1141
1153
1159 virtual void setLockedGroups(const COptionalContentGroupReferenceVect &lockedGroups) = 0;
1160
1167 };
1168
1177 {
1178 public:
1180
1185 virtual IOptionalContentVisibilityExpressionPtr clone() = 0;
1186
1197
1205 static JAWSMAKO_API IOptionalContentVisibilityExpressionPtr createGroupState(const IOptionalContentGroupReferencePtr &groupRef);
1206
1214 static JAWSMAKO_API IOptionalContentVisibilityExpressionPtr createNot(const IOptionalContentVisibilityExpressionPtr &subExpression);
1215
1223 static JAWSMAKO_API IOptionalContentVisibilityExpressionPtr createAnd(const COptionalContentVisibilityExpressionVect &subExpressions);
1224
1232 static JAWSMAKO_API IOptionalContentVisibilityExpressionPtr createOr(const COptionalContentVisibilityExpressionVect &subExpressions);
1233
1239
1245 virtual IOptionalContentGroupReferencePtr getGroup() const = 0;
1246
1253
1261 virtual eOptionalContentVisibility evaluate(const IOptionalContentPtr &optionalContent, eOptionalContentEvent event) const = 0;
1262 };
1263
1264}
1265
1266#endif /* JAWSMAKO_OPTIONALCONTENT_H */
Definition edlvector.h:30
Base class Interface for all Reference Counted objects.
Definition ircobject.h:35
Simple interface to provide a consistent hashing method for Mako objects.
Definition hashable.h:25
Class for presenting the order that groups should be displayed in a user interface....
Definition optionalcontent.h:1063
static COrderEntryPtr create()
Creates a new COrderEntryPtr instance.
U8String name
May be an empty string. Only valid if isGroup is false.
Definition optionalcontent.h:1088
bool isGroup
Definition optionalcontent.h:1084
COrderEntryPtr clone()
Creates a deep copy.
IOptionalContentGroupReferencePtr groupRef
Only valid if isGroup is true.
Definition optionalcontent.h:1086
COrderEntryVect children
Only valid if isGroup is false.
Definition optionalcontent.h:1089
A configuration for optional content.
Definition optionalcontent.h:907
virtual IOptionalContentConfigurationPtr clone() const =0
Clone the configuration.
virtual void setIntent(const U8String &intent)=0
Set the intent for this configuration Pass an empty string to remove the intent.
virtual void setLockedGroups(const COptionalContentGroupReferenceVect &lockedGroups)=0
Set the optional content groups that should be locked in the user interface.
virtual bool groupInInvisibleGroups(const IOptionalContentGroupReferencePtr &groupRef) const =0
Is the given group present in the invisible groups?
virtual void setOrder(const COrderEntryVect &order)=0
Set the order that groups should be shown in a user interface.
virtual void setAutoStates(const COptionalContentGroupUsageApplicationVect &applications)=0
Set the usage applications that apply to this configuration.
virtual void setName(const U8String &name)=0
Set the name of the configuration. May be an empty string.
virtual ~IOptionalContentConfiguration()
Definition optionalcontent.h:909
virtual void setListMode(eListMode listMode)=0
Set which optional content groups should be shown in the consuming application's user interface.
static JAWSMAKO_API IOptionalContentConfigurationPtr create(const IJawsMakoPtr &jawsMako)
Create a new configuration.
virtual void setDefaultVisibleGroups(const COptionalContentGroupReferenceVect &groups)=0
Set the vector of optional content group references that should be visible by default.
eListMode
Defines the modes for displaying groups in a user interface.
Definition optionalcontent.h:1110
@ eLMAllPages
All groups should be shown in the user interface, regardless of visibility.
Definition optionalcontent.h:1111
@ eLMVisiblePages
Only the groups that are visible on the current page should be shown.
Definition optionalcontent.h:1112
virtual U8String getName() const =0
Get the name of the configuration. An empty string is returned if no name is present.
virtual CU8StringVect getIntents() const =0
Get the intents for this configuration. Usually this will be a single entry for most real world cases...
virtual COrderEntryVect getOrder() const =0
Get the order that groups should be shown in a user interface. An independent copy will be returned.
virtual void setDefaultInvisibleGroups(const COptionalContentGroupReferenceVect &groups)=0
Set the vector of optional content group references that should be invisible by default.
virtual void setBaseState(eOptionalContentVisibility visibility)=0
Get the base visibility state of the optional content groups in the document.
CEDLVector< COrderEntryPtr > COrderEntryVect
Definition optionalcontent.h:1056
virtual COptionalContentGroupReferenceVect getLockedGroups() const =0
Get the optional content groups that should be locked in the user interface.
virtual COptionalContentGroupReferenceVect getDefaultInvisibleGroups() const =0
Get the vector of optional content groups references that should be invisible by default.
virtual COptionalContentGroupUsageApplicationVect getAutoStates() const =0
Get the usage applications that apply to this configuration.
virtual void setCreator(const U8String &creator)=0
Set the "creator" of the configuration. May be an empty string.
virtual COptionalContentGroupReferenceVect getDefaultVisibleGroups() const =0
Get the vector of optional content groups references that should be visible by default.
virtual eListMode getListMode() const =0
Get which optional content groups should be shown in the consuming application's user interface.
virtual void setRadioButtonGroups(const CEDLVector< COptionalContentGroupReferenceVect > &rbGroups)=0
Set the "Radio Button" optional content groups for this configuration.
virtual CEDLVector< COptionalContentGroupReferenceVect > getRadioButtonGroups() const =0
Get the "Radio Button" optional content groups for this configuration.
virtual eOptionalContentVisibility getBaseState() const =0
Get the base visibility state of the optional content groups in the document.
virtual bool intentInIntents(const U8String &intent) const =0
Determine if the given intent is present in the list of intents. If the intents specify All then all ...
virtual bool groupInVisibleGroups(const IOptionalContentGroupReferencePtr &groupRef) const =0
Is the given group present in the visible groups?
virtual U8String getCreator() const =0
Get the "creator" of the configuration. An empty string is returned if no name is present.
virtual void setIntents(const CU8StringVect &intents)=0
Set an array of intents for this configuration. If set to an empty array, all groups will be consider...
Interface for objects used to tag content as optional. Instances of this class are set in IDOMGroup i...
Definition optionalcontent.h:345
virtual bool getIsVisible(eOptionalContentEvent event=eOCEView, const IOptionalContentPtr &optionalContent=IOptionalContentPtr()) const =0
Determine the visibility of this content.
virtual IOptionalContentVisibilityExpressionPtr getVisibilityExpression()=0
Get the visibility expression.
static JAWSMAKO_API IOptionalContentDetailsPtr create(const IJawsMakoPtr jawsMako, const IOptionalContentGroupReferencePtr &groupRef=IOptionalContentGroupReferencePtr(), const IOptionalContentPtr &optionalContent=IOptionalContentPtr())
Create using the given (optional) group.
virtual void addGroup(const IOptionalContentGroupReferencePtr &groupRef)=0
Make the optional content dependent on the given group (if it is not already so). Optional content ca...
virtual eVisibilityPolicy getVisibilityPolicy() const =0
Get the visibility policy.
virtual void setVisibilityPolicy(eVisibilityPolicy policy)=0
Set the visibility policy. If present, the visibility expression will take precedence.
static JAWSMAKO_API IOptionalContentDetailsPtr create(const IJawsMakoPtr jawsMako, const COptionalContentGroupReferenceVect &groups, eVisibilityPolicy policy, const IOptionalContentVisibilityExpressionPtr &visibilityExpression=IOptionalContentVisibilityExpressionPtr(), const IOptionalContentPtr &optionalContent=IOptionalContentPtr())
Create using the given groups, policy, and (optional) visibility expression.
virtual void removeGroup(const IOptionalContentGroupReferencePtr &groupRef)=0
Remove the dependence of the content on the given group.
virtual ~IOptionalContentDetails()
Definition optionalcontent.h:347
virtual IOptionalContentDetailsPtr clone() const =0
Clone.
virtual COptionalContentGroupReferenceVect getGroupReferences() const =0
Get all the groups that this content depends on.
virtual void setVisibilityExpression(const IOptionalContentVisibilityExpressionPtr &expression)=0
Set the visibility expression, which affords more powerful control of the visibility of this content ...
eVisibilityPolicy
The visibility policy controlling how the dependent optional content groups affect the visibility of ...
Definition optionalcontent.h:354
@ eVPAnyOn
This content is visible if any dependent group is visible.
Definition optionalcontent.h:356
@ eVPAnyOff
This content is visible if any dependent group is invisible.
Definition optionalcontent.h:357
@ eVPAllOn
This content is visible if all the dependent groups are visible.
Definition optionalcontent.h:355
@ eVPAllOff
This content is visible if all the dependent groups are invisible.
Definition optionalcontent.h:358
Interface for an optional content group.
Definition optionalcontent.h:498
virtual U8String getGTSProcStepsType() const =0
Get the GTS_ProcStepsType property from the GTS_Metadata dictionary under this content group.
virtual IOptionalContentGroupPtr clone()=0
Clone the group. Note that cloning the group will not result in a new reference being created.
virtual void setGTSProcStepsGroup(const U8String &procStepsGroup)=0
Set the value of the GTS_ProcStepsGroup property in the GTS_Metadata dictionary of this content group...
virtual IOptionalContentGroupUsagePtr getUsage() const =0
Get the Usage information for this group. May be NULL.
virtual void setIntents(const CU8StringVect &intents)=0
Set an array of intents for this group.
virtual void setGTSProcStepsType(const U8String &procStepsType)=0
Set the value of the GTS_ProcStepsType property in the GTS_Metadata dictionary of this content group.
virtual void setUsage(const IOptionalContentGroupUsagePtr &usage)=0
Set the Usage information for this group. Pass NULL to remove the usage information.
virtual CU8StringVect getIntents() const =0
Get the intents for this group. Usually this will be a single entry for most real world cases....
virtual void setIntent(const U8String &intent)=0
Set the intent of the group, or an empty string to reset to the default.
virtual IOptionalContentGroupReferencePtr getReference() const =0
Get the reference to this group. This is used with several APIs to maintain a link to this group.
virtual U8String getName() const =0
Get the name of this group.
virtual void setName(const U8String &name)=0
Set the name of this group. Must not be an empty string.
virtual ~IOptionalContentGroup()
Definition optionalcontent.h:500
static JAWSMAKO_API IOptionalContentGroupPtr create(const IJawsMakoPtr &jawsMako, const U8String &name)
Create an optional content group. A non-zero length name must be provided.
virtual U8String getGTSProcStepsGroup() const =0
Get the GTS_ProcStepsGroup property from the GTS_Metadata dictionary under this content group.
A reference to an optional content group.
Definition optionalcontent.h:480
virtual ~IOptionalContentGroupReference()
Definition optionalcontent.h:482
virtual bool equals(const IOptionalContentGroupReferencePtr &reference) const =0
Does the given reference point to the same group as this reference?
Interface for controlling how IOptionalContentGroupUsage is applied, and for what groups.
Definition optionalcontent.h:810
virtual bool categoriesInCategories(const COCCategoryVect &categories) const =0
Does the usage categories include all the given categories? Convenience.
virtual bool categoryInCategories(eOptionalContentCategory category) const =0
Does the usage categories include the given category?
virtual void setAffectedOptionalContentGroups(const COptionalContentGroupReferenceVect &groups)=0
Set the optional content groups (by reference) for which the usage information should be applied.
virtual void setCategories(const COCCategoryVect &categories)=0
Set the categories from the optional content groups that should be consulted to determine visibility.
virtual void addGroup(const IOptionalContentGroupReferencePtr &groupRef)=0
Add the given group to the list of affected groups. It should not already be present.
virtual bool groupIsAffected(const IOptionalContentGroupReferencePtr &groupRef) const =0
Is the given group affected by this usage application?
virtual IOptionalContentGroupUsageApplicationPtr clone() const =0
Clone the usage application information.
virtual COptionalContentGroupReferenceVect getAffectedOptionalContentGroups() const =0
Get the optional content groups for which the usage information should be applied.
static JAWSMAKO_API IOptionalContentGroupUsageApplicationPtr create(const IJawsMakoPtr &jawsMako, eOptionalContentEvent event=eOCEView)
Create usage application information.
virtual ~IOptionalContentGroupUsageApplication()
Definition optionalcontent.h:812
virtual COCCategoryVect getCategories() const =0
Get the categories from the optional content groups that should be consulted to determine visibility.
virtual eOptionalContentEvent getEvent() const =0
Get the event for which the optional content usage should be applied.
virtual void setEvent(eOptionalContentEvent event)=0
Set the event for which the optional content usage should be applied. Must not be eOCEUnknown.
Usage information for an optional content group, providing context that an application can use to aut...
Definition optionalcontent.h:626
virtual U8String getPrintVisibilityDescription() const =0
Get the print visibility description, which may be an empty string.
virtual U8String getPageElement() const =0
Gets a description of the page element that is represented by the optional content group....
virtual IOptionalContentGroupUsagePtr clone() const =0
Clone the usage information.
virtual void setLanguage(const U8String &language, bool preferred=false)=0
Set the language of the content controlled by this optional content group, and whether or not it shou...
virtual void setZoomVisibility(float minimumZoom, float maximumZoom)=0
Set if the content should be visible between the given zoom levels. Setting maximumZoom to a negative...
virtual U8String getLanguage() const =0
Get the language for the group, which may be an empty string if no language has been set.
static JAWSMAKO_API IOptionalContentGroupUsagePtr create(const IJawsMakoPtr &jawsMako)
Create usage information.
virtual ~IOptionalContentGroupUsage()
Definition optionalcontent.h:628
virtual CU8StringVect getUsers(U8String &type) const =0
Get the type and users for which this content is primarily intended.
virtual eOptionalContentVisibility getExportVisibility() const =0
Get whether the content in the group should be present when the content is "exported" to a format tha...
virtual eOptionalContentVisibility recommendedVisibilityForCategories(const COCCategoryVect &categories) const =0
Determine the recommended state from this usage information for the given usage categories.
virtual void setViewVisibility(eOptionalContentVisibility visibility)=0
Set if the content in the group should be visible when the content is viewed.
virtual bool getLanguageIsPreferred() const =0
Get whether the language of this optional content group should be considered "preferred".
virtual eOptionalContentVisibility getViewVisibility() const =0
Get whether the content in the group should be visible when the content is viewed.
virtual eOptionalContentVisibility getPrintVisibility() const =0
Get whether the content in the group should be present when the content is printed.
virtual void getZoomVisibility(float &minimumZoom, float &maximumZoom) const =0
Get the zoom levels between which this content is visible. A negative maximumZoom indicates infinity.
virtual void setPageElement(const U8String &type)=0
Sets a description of the page element that is represented by the optional content group.
virtual void setPrintVisibility(eOptionalContentVisibility visibility, const U8String &description=U8String())=0
Set if the content in the group should be present when the content is printed, and optionally an info...
virtual void setUsers(const U8String &type, const CU8StringVect &users)=0
Get the type and users for which this content is primarily intended.
virtual void setExportVisibility(eOptionalContentVisibility visibility)=0
Set if the content in the group should be present when the content is "exported" to a format that doe...
Root level optional content information for an entire document.
Definition optionalcontent.h:77
virtual IOptionalContentConfigurationPtr getDefaultConfiguration() const =0
Get the default optional content configuration.
virtual void addGroup(const IOptionalContentGroupPtr &group, const IDocumentPtr &sourceDocument)=0
Add an optional content group from another document.
virtual void forceGroupState(const IOptionalContentGroupPtr &group, bool visible)=0
Force the given group to be always on or off in the default configuration. Convenience method.
virtual void addConfiguration(const IOptionalContentConfigurationPtr &configuration)=0
Add to the list of configurations for this optional content. If the configuration is already present,...
virtual bool groupIsVisible(const IOptionalContentGroupReferencePtr &groupRef, eOptionalContentEvent event=eOCEView, const IOptionalContentConfigurationPtr &configuration=IOptionalContentConfigurationPtr())=0
Determine if the given optional content group is visible in the given circumstances,...
static JAWSMAKO_API IOptionalContentPtr create(const IJawsMakoPtr &jawsMako, const IOptionalContentConfigurationPtr &defaultConfiguration=IOptionalContentConfigurationPtr())
Create a new optional content object. If no default configuration is provided, one will be created.
virtual void addGroup(const IOptionalContentGroupPtr &group)=0
Add an optional content group. An error will be thrown if a group with the same reference is already ...
virtual COptionalContentConfigurationVect getConfigurations() const =0
Get all the configurations.
virtual bool groupIsPresent(const IOptionalContentGroupReferencePtr &groupRef) const =0
Is a group with the given reference present?
virtual IOptionalContentGroupPtr getGroup(const IOptionalContentGroupReferencePtr &groupRef) const =0
Get the optional content group with the given reference. An exception will be thrown if the group is ...
virtual bool groupShouldBeIgnored(const IOptionalContentGroupReferencePtr &groupRef, eOptionalContentEvent event=eOCEView, const IOptionalContentConfigurationPtr &configuration=IOptionalContentConfigurationPtr())=0
Determine if the given optional content group (by reference) should be ignored for visibility purpose...
virtual void setDefaultConfiguration(const IOptionalContentConfigurationPtr &configuration)=0
Set the default optional content configuration.
virtual void removeGroup(const IOptionalContentGroupPtr &group)=0
Remove an optional content group. This will also purge the group from any mention in the default or a...
virtual IOptionalContentGroupPtr makeNewGroup(const U8String &name, bool visible)=0
Convenience to create a new optional content group with the given visibility status,...
virtual IDOMNodePtr makeNodeOptional(const IDOMNodePtr &node, const IOptionalContentGroupPtr &group)=0
Make the given DOM node optional as part of an existing optional content group.
virtual bool groupShouldBeIgnored(const IOptionalContentGroupPtr &group, eOptionalContentEvent event=eOCEView, const IOptionalContentConfigurationPtr &configuration=IOptionalContentConfigurationPtr())=0
Determine if the given optional content group should be ignored for visibility purposes in the given ...
virtual bool groupIsVisible(const IOptionalContentGroupPtr &group, eOptionalContentEvent event=eOCEView, const IOptionalContentConfigurationPtr &configuration=IOptionalContentConfigurationPtr())=0
Determine if the given optional content group is visible in the given circumstances.
virtual ~IOptionalContent()
Definition optionalcontent.h:79
virtual IOptionalContentPtr clone()=0
Clone the optional content. This is a deep clone.
virtual void removeConfiguration(const IOptionalContentConfigurationPtr &configuration)=0
Remove the given configuration. This configuration must not be the current default or an exception wi...
virtual COptionalContentGroupVect getGroups() const =0
Get all the document's optional content groups in a vector.
IDOMNodePtr makeNodeOptionalWithNewGroup(const IDOMNodePtr &node, const U8String &newGroupName, bool visible)
Make the given DOM node optional with a new optional content group. Convenience.
Definition optionalcontent.h:148
An interface representing a PDF 1.6+ visibility expression. Please refer to table 4....
Definition optionalcontent.h:1177
virtual eOptionalContentVisibility evaluate(const IOptionalContentPtr &optionalContent, eOptionalContentEvent event) const =0
static JAWSMAKO_API IOptionalContentVisibilityExpressionPtr createNot(const IOptionalContentVisibilityExpressionPtr &subExpression)
Create a "Not" expression. That is, the result of this expression is the inverse of the visibility of...
static JAWSMAKO_API IOptionalContentVisibilityExpressionPtr createOr(const COptionalContentVisibilityExpressionVect &subExpressions)
Create an "Or" expression. That is, the result of this expression is the logical "or" of the result o...
virtual ~IOptionalContentVisibilityExpression()
Definition optionalcontent.h:1179
static JAWSMAKO_API IOptionalContentVisibilityExpressionPtr createAnd(const COptionalContentVisibilityExpressionVect &subExpressions)
Create an "And" expression. That is, the result of this expression is the logical "and" of the result...
static JAWSMAKO_API IOptionalContentVisibilityExpressionPtr createGroupState(const IOptionalContentGroupReferencePtr &groupRef)
Create a "Group State" expression. That is, the result of this expression is true if the given group ...
virtual eVisibilityExpressionOperation getOperation() const =0
Get the type of operation.
virtual IOptionalContentVisibilityExpressionPtr clone()=0
Clone this expression.
virtual IOptionalContentGroupReferencePtr getGroup() const =0
Get the group for eVEOGroupState operations. If the operation is something else, an exception will be...
virtual COptionalContentVisibilityExpressionVect getSubExpressions() const =0
Get the subexpressions if the operation is eVEONot, eVEOAnd or eVEOOr. If the operation is something ...
eVisibilityExpressionOperation
The operation of this expression.
Definition optionalcontent.h:1191
@ eVEOGroupState
The result of this expression is the state of the single group.
Definition optionalcontent.h:1192
@ eVEONot
The result of this expression is the inverse of the sub-expression.
Definition optionalcontent.h:1193
@ eVEOOr
The result of this expression is the logical or of the result of the sub-expressions.
Definition optionalcontent.h:1195
@ eVEOAnd
The result of this expression is the logical and of the result of the sub-expressions.
Definition optionalcontent.h:1194
EDLSysString U8String
A UTF-8 String.
Definition types.h:144
An abstract interface for an object that can be hashed.
Definition apexcustompostprocess.h:17
CEDLVector< IOptionalContentVisibilityExpressionPtr > COptionalContentVisibilityExpressionVect
Definition optionalcontent.h:41
eOptionalContentVisibility
Optional content visibility states.
Definition optionalcontent.h:48
@ eOCVVisible
Visible.
Definition optionalcontent.h:49
@ eOCVUnchanged
Unchanged.
Definition optionalcontent.h:51
@ eOCVInvisible
Invisible.
Definition optionalcontent.h:50
CEDLSysStringVect CU8StringVect
Definition types.h:167
eOptionalContentEvent
Optional content Event types.
Definition types.h:193
@ eOCEView
View.
Definition types.h:195
CEDLVector< IOptionalContentGroupPtr > COptionalContentGroupVect
Definition optionalcontent.h:38
eOptionalContentCategory
Optional content event types.
Definition optionalcontent.h:59
@ eOCCPrint
Print.
Definition optionalcontent.h:62
@ eOCCLanguage
Language.
Definition optionalcontent.h:66
@ eOCCView
View.
Definition optionalcontent.h:61
@ eOCCUnknown
Unknown.
Definition optionalcontent.h:60
@ eOCCZoom
Zoom.
Definition optionalcontent.h:64
@ eOCCUser
User.
Definition optionalcontent.h:65
@ eOCCExport
Export.
Definition optionalcontent.h:63
CEDLVector< IOptionalContentConfigurationPtr > COptionalContentConfigurationVect
Definition optionalcontent.h:40
CEDLVector< IOptionalContentGroupUsageApplicationPtr > COptionalContentGroupUsageApplicationVect
Definition optionalcontent.h:39
CEDLVector< eOptionalContentCategory > COCCategoryVect
Definition optionalcontent.h:69
CEDLVector< IOptionalContentGroupReferencePtr > COptionalContentGroupReferenceVect
Definition types.h:172
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211
#define JAWSMAKO_API
Definition types.h:29