Mako 8.1.0 API
Loading...
Searching...
No Matches
JawsMako::IOptionalContent Class Referenceabstract

Root level optional content information for an entire document. More...

#include <optionalcontent.h>

Inheritance diagram for JawsMako::IOptionalContent:

Public Member Functions

virtual IOptionalContentPtr clone ()=0
 Clone the optional content. This is a deep clone.
 
virtual IOptionalContentGroupPtr makeNewGroup (const U8String &name, bool visible)=0
 Convenience to create a new optional content group with the given visibility status, and add. The group will also be added to the ui by adding to the default configuration's order.
 
virtual IDOMNodePtr makeNodeOptional (const IDOMNodePtr &node, const IOptionalContentGroupPtr &group)=0
 Make the given DOM node optional as part of an existing optional content group.
 
IDOMNodePtr makeNodeOptionalWithNewGroup (const IDOMNodePtr &node, const U8String &newGroupName, bool visible)
 Make the given DOM node optional with a new optional content group. Convenience.
 
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 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, using the group's reference.
 
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 circumstances. Groups that have an intent that does not match the configuration's intent are not to be used to determine visibility, necessitating this distinction.
 
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 purposes in the given circumstances, using the group's reference. Groups that have an intent that does not match the configuration's intent are not to be used to determine visibility, necessitating this distinction.
 
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 not found.
 
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 COptionalContentGroupVect getGroups () const =0
 Get all the document's optional content groups in a vector.
 
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 present.
 
virtual void addGroup (const IOptionalContentGroupPtr &group, const IDocumentPtr &sourceDocument)=0
 Add an optional content group from another document.
 
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 alternate configurations.
 
virtual void setDefaultConfiguration (const IOptionalContentConfigurationPtr &configuration)=0
 Set the default optional content configuration.
 
virtual IOptionalContentConfigurationPtr getDefaultConfiguration () const =0
 Get the default optional content configuration.
 
virtual void addConfiguration (const IOptionalContentConfigurationPtr &configuration)=0
 Add to the list of configurations for this optional content. If the configuration is already present, no action will be taken.
 
virtual void removeConfiguration (const IOptionalContentConfigurationPtr &configuration)=0
 Remove the given configuration. This configuration must not be the current default or an exception will be thrown.
 
virtual COptionalContentConfigurationVect getConfigurations () const =0
 Get all the configurations.
 
- 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 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.
 

Additional Inherited Members

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

Detailed Description

Root level optional content information for an entire document.

Member Function Documentation

◆ addConfiguration()

virtual void JawsMako::IOptionalContent::addConfiguration ( const IOptionalContentConfigurationPtr & configuration)
pure virtual

Add to the list of configurations for this optional content. If the configuration is already present, no action will be taken.

Parameters
configurationThe configuration to add.

◆ addGroup() [1/2]

virtual void JawsMako::IOptionalContent::addGroup ( const IOptionalContentGroupPtr & group)
pure virtual

Add an optional content group. An error will be thrown if a group with the same reference is already present.

Parameters
groupThe group to add.

◆ addGroup() [2/2]

virtual void JawsMako::IOptionalContent::addGroup ( const IOptionalContentGroupPtr & group,
const IDocumentPtr & sourceDocument )
pure virtual

Add an optional content group from another document.

Note
This will attempt to maintain the context of the optional content group from the source document, adding to the default configuration in order to maintain its user-visible behavior as closely as possible.
Parameters
groupThe group to add.
sourceDocumentThe document from which the group is being added.

◆ clone()

virtual IOptionalContentPtr JawsMako::IOptionalContent::clone ( )
pure virtual

Clone the optional content. This is a deep clone.

Returns
IOptionalContentPtr The cloned optional content object.

◆ create()

static JAWSMAKO_API IOptionalContentPtr JawsMako::IOptionalContent::create ( const IJawsMakoPtr & jawsMako,
const IOptionalContentConfigurationPtr & defaultConfiguration = IOptionalContentConfigurationPtr() )
static

Create a new optional content object. If no default configuration is provided, one will be created.

Parameters
jawsMakoThe IJawsMako object.
defaultConfigurationThe default configuration to use. May be omitted, in which case a default configuration will be created.
Returns
IOptionalContentPtr The new optional content object.

◆ forceGroupState()

virtual void JawsMako::IOptionalContent::forceGroupState ( const IOptionalContentGroupPtr & group,
bool visible )
pure virtual

Force the given group to be always on or off in the default configuration. Convenience method.

This will:
  • ensure the group is in (or removed from) the default visible and invisible list
  • ensure the group has the same intent as the configuration
  • remove any usage information from the group
Parameters
groupThe group to force the state of.
visibleWhether the group should be visible or not.

◆ getConfigurations()

virtual COptionalContentConfigurationVect JawsMako::IOptionalContent::getConfigurations ( ) const
pure virtual

Get all the configurations.

Returns
COptionalContentConfigurationVect The vector of configurations.

◆ getDefaultConfiguration()

virtual IOptionalContentConfigurationPtr JawsMako::IOptionalContent::getDefaultConfiguration ( ) const
pure virtual

Get the default optional content configuration.

Returns
IOptionalContentConfigurationPtr The default configuration.

◆ getGroup()

virtual IOptionalContentGroupPtr JawsMako::IOptionalContent::getGroup ( const IOptionalContentGroupReferencePtr & groupRef) const
pure virtual

Get the optional content group with the given reference. An exception will be thrown if the group is not found.

Parameters
groupRefThe reference to the group to get.
Returns
IOptionalContentGroupPtr The group, or NULL if not found.

◆ getGroups()

virtual COptionalContentGroupVect JawsMako::IOptionalContent::getGroups ( ) const
pure virtual

Get all the document's optional content groups in a vector.

Returns
COptionalContentGroupVect The vector of groups.

◆ groupIsPresent()

virtual bool JawsMako::IOptionalContent::groupIsPresent ( const IOptionalContentGroupReferencePtr & groupRef) const
pure virtual

Is a group with the given reference present?

Parameters
groupRefThe reference to the group to check.
Returns
bool True if the group is present, false otherwise.

◆ groupIsVisible() [1/2]

virtual bool JawsMako::IOptionalContent::groupIsVisible ( const IOptionalContentGroupPtr & group,
eOptionalContentEvent event = eOCEView,
const IOptionalContentConfigurationPtr & configuration = IOptionalContentConfigurationPtr() )
pure virtual

Determine if the given optional content group is visible in the given circumstances.

Parameters
groupThe group to check.
eventThe event representing the intended use. Pass eOCEUnknown if the automatic state IOptionalContentGroupUsageApplication should not be checked.
configurationThe configuration to use. Pass NULL to use the default configuration.
Returns
bool True if the group is visible, false otherwise.

◆ groupIsVisible() [2/2]

virtual bool JawsMako::IOptionalContent::groupIsVisible ( const IOptionalContentGroupReferencePtr & groupRef,
eOptionalContentEvent event = eOCEView,
const IOptionalContentConfigurationPtr & configuration = IOptionalContentConfigurationPtr() )
pure virtual

Determine if the given optional content group is visible in the given circumstances, using the group's reference.

Parameters
groupRefReference to the group to check.
eventThe event representing the intended use. Pass eOCEUnknown if the automatic state IOptionalContentGroupUsageApplication should not be checked.
configurationThe configuration to use. Pass NULL to use the default configuration.
Returns
bool True if the group is visible, false otherwise.

◆ groupShouldBeIgnored() [1/2]

virtual bool JawsMako::IOptionalContent::groupShouldBeIgnored ( const IOptionalContentGroupPtr & group,
eOptionalContentEvent event = eOCEView,
const IOptionalContentConfigurationPtr & configuration = IOptionalContentConfigurationPtr() )
pure virtual

Determine if the given optional content group should be ignored for visibility purposes in the given circumstances. Groups that have an intent that does not match the configuration's intent are not to be used to determine visibility, necessitating this distinction.

Parameters
groupThe group to check.
eventThe event representing the intended use. Pass eOCEUnknown if the automatic state IOptionalContentGroupUsageApplication should not be checked.
configurationThe configuration to use. Pass NULL to use the default configuration.
Returns
bool True if the group should be ignored, false otherwise.

◆ groupShouldBeIgnored() [2/2]

virtual bool JawsMako::IOptionalContent::groupShouldBeIgnored ( const IOptionalContentGroupReferencePtr & groupRef,
eOptionalContentEvent event = eOCEView,
const IOptionalContentConfigurationPtr & configuration = IOptionalContentConfigurationPtr() )
pure virtual

Determine if the given optional content group (by reference) should be ignored for visibility purposes in the given circumstances, using the group's reference. Groups that have an intent that does not match the configuration's intent are not to be used to determine visibility, necessitating this distinction.

Parameters
groupRefReference to the group to check.
eventThe event representing the intended use. Pass eOCEUnknown if the automatic state IOptionalContentGroupUsageApplication should not be checked.
configurationThe configuration to use. Pass NULL to use the default configuration.
Returns
bool True if the group should be ignored, false otherwise.

◆ makeNewGroup()

virtual IOptionalContentGroupPtr JawsMako::IOptionalContent::makeNewGroup ( const U8String & name,
bool visible )
pure virtual

Convenience to create a new optional content group with the given visibility status, and add. The group will also be added to the ui by adding to the default configuration's order.

Parameters
nameThe name of the new group.
visibleWhether the group should be visible by default.
Returns
IOptionalContentGroupPtr The new group.

◆ makeNodeOptional()

virtual IDOMNodePtr JawsMako::IOptionalContent::makeNodeOptional ( const IDOMNodePtr & node,
const IOptionalContentGroupPtr & group )
pure virtual

Make the given DOM node optional as part of an existing optional content group.

If the node is an IDOMGroup, the group will have it's optional content information set accordingly and the returned result will be that node. However, if the node is some other graphical node, it will be moved inside an IDOMGroup with the optional content information set. If the node is in a tree, the node will be replaced with the group. The group will be returned.

Convenience.

Parameters
nodeThe node to make optional.
groupThe group to make the node optional in.
Returns
IDOMNodePtr The new node, which will be an IDOMGroup if the node was not.

◆ makeNodeOptionalWithNewGroup()

IDOMNodePtr JawsMako::IOptionalContent::makeNodeOptionalWithNewGroup ( const IDOMNodePtr & node,
const U8String & newGroupName,
bool visible )
inline

Make the given DOM node optional with a new optional content group. Convenience.

Parameters
nodeThe node to make optional.
newGroupNameThe name of the new group.
visibleWhether the group should be visible by default.
Returns
IDOMNodePtr The new node, which will be an IDOMGroup

◆ removeConfiguration()

virtual void JawsMako::IOptionalContent::removeConfiguration ( const IOptionalContentConfigurationPtr & configuration)
pure virtual

Remove the given configuration. This configuration must not be the current default or an exception will be thrown.

Parameters
configurationThe configuration to add.

◆ removeGroup()

virtual void JawsMako::IOptionalContent::removeGroup ( const IOptionalContentGroupPtr & group)
pure virtual

Remove an optional content group. This will also purge the group from any mention in the default or alternate configurations.

Parameters
groupThe group to remove.

◆ setDefaultConfiguration()

virtual void JawsMako::IOptionalContent::setDefaultConfiguration ( const IOptionalContentConfigurationPtr & configuration)
pure virtual

Set the default optional content configuration.

Note
There are restrictions on the intent attribute of an optional content configuration for it to be the default, which must be "View". Also, the base state must be visible. This routine will modify the configuration to suit.

If the optional content configuration is not present in the configuration list, it will be added.

Parameters
configurationThe configuration to set as the default.

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