Mako 7.4.0 API
Loading...
Searching...
No Matches
JawsMako::IOptionalContentGroupUsage Class Referenceabstract

Usage information for an optional content group, providing context that an application can use to automatically show or hide content in the optional content group. This is optional. More...

#include <optionalcontent.h>

Inheritance diagram for JawsMako::IOptionalContentGroupUsage:

Public Member Functions

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 should be considered "preferred" if there is no exact match for the language used by the viewer's.
 
virtual U8String getLanguage () const =0
 Get the language for the group, which may be an empty string if no language has been set.
 
virtual bool getLanguageIsPreferred () const =0
 Get whether or not the language of this optional content group should be considered "preferred".
 
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 does not support optional content.
 
virtual eOptionalContentVisibility getExportVisibility () const =0
 Get whether the content in the group should be present when the content is "exported" to a format that does not support optional content.
 
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 value indicates infinity.
 
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 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 informative string describing the kind of content.
 
virtual eOptionalContentVisibility getPrintVisibility () const =0
 Get whether the content in the group should be present when the content is printed.
 
virtual U8String getPrintVisibilityDescription () const =0
 Get the print visibility description, which may be an empty string.
 
virtual void setViewVisibility (eOptionalContentVisibility visibility)=0
 Set if the content in the group should be visible when the content is viewed.
 
virtual eOptionalContentVisibility getViewVisibility () const =0
 Get whether the content in the group should be visible when the content is viewed.
 
virtual void setUsers (const U8String &type, const CU8StringVect &users)=0
 Get the type and users for which this content is primarily intended.
 
virtual CU8StringVect getUsers (U8String &type) const =0
 Get the type and users for which this content is primarily intended.
 
virtual void setPageElement (const U8String &type)=0
 Sets a description of the page element that is represented by the optional content group.
 
virtual U8String getPageElement () const =0
 Gets a description of the page element that is represented by the optional content group. May be an empty string.
 
virtual eOptionalContentVisibility recommendedVisibilityForCategories (const COCCategoryVect &categories) const =0
 Deteremine the recommended state from this usage information for the given usage categories. Uses the algorithm on page 383 of the PDF 1.7 specification, with the following modifications:
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static JAWSMAKO_API IOptionalContentGroupUsagePtr create (const IJawsMakoPtr &jawsMako)
 Create usage information.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

Usage information for an optional content group, providing context that an application can use to automatically show or hide content in the optional content group. This is optional.

These are only consulted when making visibility decisions if the document's IOptionalContent specifies that the usage for this group should be used, and even then only some attributes may be consulted depending on how the usages are configured. See #IOptionalContentGroupUsageApplication below.

Member Function Documentation

◆ getUsers()

virtual CU8StringVect JawsMako::IOptionalContentGroupUsage::getUsers ( U8String & type) const
pure virtual

Get the type and users for which this content is primarily intended.

Parameters
typeReference to receive the type of user.
Returns
The user names, or an empty array if none are present.

◆ recommendedVisibilityForCategories()

virtual eOptionalContentVisibility JawsMako::IOptionalContentGroupUsage::recommendedVisibilityForCategories ( const COCCategoryVect & categories) const
pure virtual

Deteremine the recommended state from this usage information for the given usage categories. Uses the algorithm on page 383 of the PDF 1.7 specification, with the following modifications:

  • Zoom is not considered and always assumed ON
  • User is not considered and always assumed ON
  • Language is considered ON if the language is preferred. May return Unchanged.

◆ setLanguage()

virtual void JawsMako::IOptionalContentGroupUsage::setLanguage ( const U8String & language,
bool preferred = false )
pure virtual

Set the language of the content controlled by this optional content group, and whether or not it should be considered "preferred" if there is no exact match for the language used by the viewer's.

Parameters
languageA "Natural Language Specification" string representing the language and possible a locale, such as "en-US". Pass an empty string to specify no particular language.
preferredWhether this should be considered preferred if no exact match for the user's viewing language is found.

◆ setPageElement()

virtual void JawsMako::IOptionalContentGroupUsage::setPageElement ( const U8String & type)
pure virtual

Sets a description of the page element that is represented by the optional content group.

Parameters
typeShould be either "HF" (Header or footer), "FG" (foreground content), "BG" (Background content), "L" (Logo) or an empty string indicating no particular page element is represented.

◆ setUsers()

virtual void JawsMako::IOptionalContentGroupUsage::setUsers ( const U8String & type,
const CU8StringVect & users )
pure virtual

Get the type and users for which this content is primarily intended.

Parameters
typeThe type of user, which should be either "Ind" (Individual), "Ttl" (Title), or "Org" (Organisation). Must not be empty unless the users vector is also empty (which will cause the user information to be ignored for visibility determination)
usersThe user names.

The documentation for this class was generated from the following file: