#include <IGraphicStyleAttrBossList.h>
This class manages a collection of graphic attribute objects. Graphic attribute objects are devrived from kGraphicsAttrBoss and must implement IGraphicAttributeInfo interface. Each attribute is assumed to have a unique attribute object classID. Attributes can be access either by the class ID or an index into the collection. All objects are ref-counted.
- See Also
- GraphicStylesID.h for definitions of persistent data interface IID and basic graphic attribute classes.
- IGraphicAttributeInfo
Used to indicate how attributes are duplicated.
Used to indicate how attributes are duplicated.
| Enumerator |
|---|
| kReferenceAttributes | attributes are duplicated by reference. |
| kDuplicateAttributes | attributes are copied. |
| virtual ErrorCode IGraphicStyleAttributeBossList::AddAttribute | ( | IPMUnknown * | iAttrbute | ) | |
| pure virtual |
Add the specified attribute to the list. Nothing is added if the same attribute already exist in the list.
- Parameters
| iAttrbute | the graphic attribute to add. IPMUnknown* is typically IGraphicAttributeInfo* or the persistent data interface of the attribute. |
- Returns
- kSuccess if successfull otherwise returns an error code.
| virtual ErrorCode IGraphicStyleAttributeBossList::AttributeChanged | ( | ClassID | attrClass | ) | |
| pure virtual |
This is to indicate that an attribute owned by this attribute boss list has changed. Returns an error code if attribute does not exist.
- Parameters
| attrClass | the attribute class. This is a graphic attribute ClassID. |
- Returns
- kSuccess if successfull otherwise returns an error code.
| virtual bool16 IGraphicStyleAttributeBossList::AttributeExists | ( | ClassID | attrClass | ) | const |
| pure virtual |
Return kTrue if specified attribute class exists in the list.
- Parameters
| attrClass | the attribute class. This is a graphic attribute ClassID. |
- Returns
- kTrue if attribute class exists otherwise returns kFalse.
| virtual void IGraphicStyleAttributeBossList::BeginUpdate | ( | void | | ) | |
| pure virtual |
| virtual void IGraphicStyleAttributeBossList::CompareAttribute | ( | IPMUnknown * | iAttrbute2, | | | bool16 * | pAttrIsEquivalent, | | | bool16 * | pAttrInList = nil | | ) | | const |
| pure virtual |
Compare iAttribute2 with the attribute of the same class in the list.
- Parameters
| pAttrIsEquivalent | is set to kTrue if two attributes are equivalent. |
| pAttrInList | is set to kTrue if same attribute exists in the list. |
| virtual ErrorCode IGraphicStyleAttributeBossList::CopyIntoAttribute | ( | IPMUnknown * | iAttrbute | ) | |
| pure virtual |
Copy the content of the specified graphic attribute to the same attribute in list. Returns an error if the attribute does not exist in the list.
- Parameters
| iAttrbute | the graphic attribute to copy. IPMUnknown* is typically IGraphicAttributeInfo* or the persistent data interface of the attribute. |
- Returns
- kSuccess if successfull otherwise returns an error code.
| virtual IPMUnknown* IGraphicStyleAttributeBossList::CreateAttributeCopy | ( | ClassID | attrClass, | | | const PMIID & | interfaceID | | ) | | const |
| pure virtual |
Create a copy of the specified attribute.
- Parameters
| attrClass | the attribute class. This is a graphic attribute ClassID. |
| interfaceID | the specified IID. Typically this is IID_IGRAPHICATTR_INFO or the persistent data interface IID of the attribute. |
- Returns
- Interface pointer (as IPMUnknown*) to the specified IID of the attribute copy or nil. This can be cast to the type of requested IID.
| virtual IPMUnknown* IGraphicStyleAttributeBossList::CreateAttributeNCopy | ( | uint32 | whichAttribute, | | | const PMIID & | interfaceID | | ) | | const |
| pure virtual |
Create a copy of the nth attribute.
- Parameters
| whichAttribute | the nth attribute index starting from 0. |
| interfaceID | the specified IID. Typically this is IID_IGRAPHICATTR_INFO or the persistent data interface IID of the attribute. |
- Returns
- Interface pointer (as IPMUnknown*) to the specified IID of the attribute copy or nil. This an be cast to the type of requested IID.
Duplicate the attributes and returns the duplicate in iAttrListCopy. The attributes are either copied or referenced in the new list depending on whichDupKind.
- Parameters
| iAttrListCopy | the list of attribute copies. |
| whichDupKind | indicate how the attributes should be duplicated. |
| virtual uint32 IGraphicStyleAttributeBossList::GetAttributeCount | ( | void | | ) | const |
| pure virtual |
Returns the number of attributes in the list.
- Returns
- the number of attributes in the list.
| virtual void IGraphicStyleAttributeBossList::MarkPreDirty | ( | ImplementationID | impleID = kInvalidImpl, | | | bool16 | markDirty = kTrue | | ) | | |
| pure virtual |
Mark the persistent data dirty given the implementation ID.
- Parameters
| impleID | this implementation ID. |
| markDirty | kTrue if to mark dirty. Ignored if implementation is not persistent. |
| virtual IPMUnknown* IGraphicStyleAttributeBossList::QueryAttribute | ( | ClassID | attrClass, | | | const PMIID & | interfaceID | | ) | | const |
| pure virtual |
Returns the specified attribute.
- Parameters
| attrClass | the attribute class. This is a graphic attribute ClassID. |
| interfaceID | the specified IID. Typically this is IID_IGRAPHICATTR_INFO or the persistent data interface IID of the attribute. |
- Returns
- Interface pointer (as IPMUnknown*) to the specified IID of the requested attribute or nil. This can be cast to the type of requested IID.
| virtual IPMUnknown* IGraphicStyleAttributeBossList::QueryAttributeN | ( | uint32 | whichAttribute, | | | const PMIID & | interfaceID | | ) | | const |
| pure virtual |
Returns the nth attribute.
- Parameters
| whichAttribute | the nth attribute index starting from 0. |
| interfaceID | the specified IID. Typically this is IID_IGRAPHICATTR_INFO or the persistent data interface IID of the attribute. |
- Returns
- Interface pointer (as IPMUnknown*) to the specified IID of the requested attribute or nil. This can be cast to the type of requested IID.
| virtual ErrorCode IGraphicStyleAttributeBossList::RemoveAttribute | ( | IPMUnknown * | iAttrbute | ) | |
| pure virtual |
Remove the specified graphic attribute from the list. Returns an error if the attribute does not exist in the list.
- Parameters
| iAttrbute | the graphic attribute to remove. IPMUnknown* is typically IGraphicAttributeInfo* or the persistent data interface of the attribute. |
- Returns
- kSuccess if successfull otherwise returns an error code.
| virtual ErrorCode IGraphicStyleAttributeBossList::RemoveAttribute | ( | ClassID | attrClass | ) | |
| pure virtual |
Remove the attribute specified by attribute class from the list. Returns an error if the attribute does not exist in the list.
- Parameters
| attrClass | the attribute class. This is a graphic attribute ClassID. |
- Returns
- kSuccess if successfull otherwise returns an error code.
| virtual void IGraphicStyleAttributeBossList::RemoveEveryAttribute | ( | void | | ) | |
| pure virtual |
Remove every attribut from the list.