InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IEyeAttrFilter Class Referenceabstract

#include <IEyeAttrFilter.h>

Inheritance diagram for IEyeAttrFilter:
IClassIDListDataIPMUnknown

Public Member Functions

virtual void AddClassID (const ClassID &newClassID, int32 at=kEnd)=0
 
virtual void RemoveClassID (int32 index)=0
 
virtual void Clear (void)=0
 
virtual void Copy (const IEyeAttrFilter &copyFrom)=0
 
virtual void AppendClassIDs (const IEyeAttrFilter &copyFrom)=0
 
virtual void Initialize (void)=0
 
virtual bool8 GetEnabled (void) const =0
 
virtual void SetEnabled (bool8 yesno)=0
 
virtual bool8 IsAttributeEnabled (const ClassID &classID) const =0
 
virtual bool8 AllAttributesEnabled (void) const =0
 
virtual bool8 IsWidgetEnabled (const WidgetID &widgetID) const =0
 
virtual void EnableWidgetsAttributes (const WidgetID &widgetID, bool8 enable)=0
 
virtual void SetApplyStyles (bool8 yesno)=0
 
virtual bool8 GetApplyStyles (void) const =0
 
virtual ClassID GetClassID (int32 index) const =0
 
virtual void SetClassID (int32 index, const ClassID &replaceClassID)=0
 
virtual int32 GetIndex (const ClassID &classID) const =0
 
virtual int32 Length (void) const =0
 

Additional Inherited Members

- Public Types inherited from IClassIDListData
enum  { kDefaultIID = IID_ICLASSIDLISTDATA }
 
enum  _Placement { kBeginning = 0, kEnd = -2, kInvalidIndex = -1 }
 

Detailed Description

This class is used as the interface for the various collections of attributes that the Eye Dropper cares about. For the eye dropper, there are separate collections for character settings, paragraph settings, transparency settings, etc. This interface works well for that purpose because most attributes are ClassID based. For the purposes of the eye dropper, if an attribute is in the collection, then the attributes is 'enabled', otherwise it is 'disabled.' This particular interface is a list collection.

Member Function Documentation

virtual void IEyeAttrFilter::AddClassID (const ClassIDnewClassID,
int32 at = kEnd 
)
pure virtual

Add the ClassID of an attribute to the collection.

Parameters
newClassID- IN: ClassID of an attribute.
at- IN: zero based index of where in the list to add the new attribute.

Implements IClassIDListData.

virtual bool8 IEyeAttrFilter::AllAttributesEnabled (void ) const
pure virtual

Returns whether all the attributes for the implementation are present in this collection. That is, should all of the check boxes in the panel of the eye dropper settings dialog, for which this implementation represents, be checked?

Returns
kTrue if all the attributes for the implementation are present in this collection.
virtual void IEyeAttrFilter::AppendClassIDs (const IEyeAttrFiltercopyFrom)
pure virtual

Copy all elements from 'copyFrom' to this. Elements already in 'this' are preserved.

virtual void IEyeAttrFilter::Clear (void )
pure virtual

Remove all elements from the collection.

Implements IClassIDListData.

virtual void IEyeAttrFilter::Copy (const IEyeAttrFiltercopyFrom)
pure virtual

Copy all elements from 'copyFrom' to this and copy the 'GetApplyStyles' setting and 'GetEnabled' setting. Elements already in 'this' are preserved.

virtual void IEyeAttrFilter::EnableWidgetsAttributes (const WidgetIDwidgetID,
bool8 enable 
)
pure virtual

Enable/disable the attributes associated with the given WidgetID by adding/removing their ClassIDs to/from this collection.

Parameters
widgetID- IN: Widget ID of the checkbox in the eye dropper Options dialog.
enable- IN: Whether or not to add or remove the attribute's ClassIDs.
virtual bool8 IEyeAttrFilter::GetApplyStyles (void ) const
pure virtual

Returns whether or not to enable the applying of styles.

virtual ClassID IEyeAttrFilter::GetClassID (int32 index) const
pure virtual

Returns the ClassID of the attribute stored at the zero-based index in the collection.

Parameters
index- IN: zero-based index of the attribute in question.
Returns
ClassID of the attribute stored at the zero-based index in the collection.

Implements IClassIDListData.

virtual bool8 IEyeAttrFilter::GetEnabled (void ) const
pure virtual

Returns whether or not the attributes in this collection are enabled.

Returns
If kFalse, then its list of ClassIDs should be ignored.
virtual int32 IEyeAttrFilter::GetIndex (const ClassIDclassID) const
pure virtual

Find the ClassID associated with a particular attribute and return its zero-based index. If -1 is returned, then attribute is not in the collection.

Parameters
classID- IN: ClassID of a particular attribute.
Returns
zero-based index of the classID or -1 if it is not found.

Implements IClassIDListData.

virtual void IEyeAttrFilter::Initialize (void )
pure virtual

Restore default attributes and SetEnabled(kTrue)

virtual bool8 IEyeAttrFilter::IsAttributeEnabled (const ClassIDclassID) const
pure virtual

Returns whether the attribute for the specified classID is enabled

Parameters
classID- IN: The ClassID of the attribute we are interested in.
Returns
kTrue if GetEnabled() is kTrue and the classID is present.
virtual bool8 IEyeAttrFilter::IsWidgetEnabled (const WidgetIDwidgetID) const
pure virtual

The eye dropper's Options dialog has check boxes with specific widget IDs for one or more attributes. This method looks for the presence of the ClassID of the attributes associated with the provided widget to determine whether or not the widget should be enabled. That is, this method is used to determine the state of the checkboxes in the eye dropper's Options dialog.

Parameters
widgetID- IN: Widget ID of the checkbox in the eye dropper Options dialog.
Returns
kTrue if the widget should be enabled (because the attributes associated with the widget in the Options dialog are present in this filter/collection).
virtual int32 IEyeAttrFilter::Length (void ) const
pure virtual

Returns number of ClassIDs stored in the collection.

Implements IClassIDListData.

virtual void IEyeAttrFilter::RemoveClassID (int32 index)
pure virtual

Remove the ClassID stored at position 'index' from the collection.

Parameters
index- IN: zero based index of the element to remove.

Implements IClassIDListData.

virtual void IEyeAttrFilter::SetApplyStyles (bool8 yesno)
pure virtual

If this group has styles (e.g, character styles, paragraph styles, etc.) apply them if SetApplyStyles(kTrue) is called. Otherwise, only look at the ClassIDs in this collection.

Parameters
yesno- IN: Whether or not to enable the applying of styles.
virtual void IEyeAttrFilter::SetClassID (int32 index,
const ClassIDreplaceClassID 
)
pure virtual

Replaces the ClassID at a particular location in the collection with a new ClassID.

Parameters
index- IN: zero-based index of the attribute in question.
replaceClassID- IN: ClassID to store at the index.

Implements IClassIDListData.

virtual void IEyeAttrFilter::SetEnabled (bool8 yesno)
pure virtual

Set whether or not the attributes in this collection are enabled.

Parameters
yesno- IN: If kFalse, then the list of ClassIDs will be ignored.