![]() | InDesign SDK 20.5 |
#include <AttributeBossList.h>
Public Types | |
| enum | ReadWriteStatus { kSuccess, kListChangedOnRead } |
| typedef object_type | data_type |
Public Member Functions | |
| AttributeBossList (const AttributeBossList ©) | |
| AttributeBossList & | operator= (const AttributeBossList &other) |
| ReadWriteStatus | ReadWrite (IPMStream *stream) |
| AttributeBossList (AttributeBossList &©) noexcept | |
| AttributeBossList & | operator= (AttributeBossList &©) noexcept |
| int32 | CountBosses () const |
| ClassID | GetClassN (int32 n) const |
| const IPMUnknown * | QueryBossN (int32 n, PMIID id) const |
| const IPMUnknown * | QueryByClassID (ClassID c, PMIID id) const |
| void | ApplyAttribute (const IPMUnknown *newone, const ClassID attrClass=kInvalidClass) |
| void | ApplyAttributes (const AttributeBossList *list) |
| void | ClearOverride (ClassID id) |
| void | ClearOverrides (const AttributeBossList *list) |
| void | ClearNonStyleOverrides () |
| void | ClearAllOverrides () |
| AttributeBossList * | Duplicate () const |
| AttributeBossList * | CopyTheseAttributes (const AttributeBossList *filter) const |
| bool16 | ContainsAttribute (ClassID klas) const |
| bool16 | ContainsExact (IDataBase *db, const IPMUnknown *check, ClassID klas=kInvalidClass) const |
| bool16 | IsEqual (IDataBase *db, const AttributeBossList *other) const |
| bool16 | Intersects (const AttributeBossList *other) const |
| bool16 | IntersectionContainsDifferences (IDataBase *db, const AttributeBossList *other) const |
Static Public Member Functions | |
| static uint32 | ConvertAttributeList (IPMStream *inStream, IPMStream *outStream, ImplementationID context) |
| static uint32 | CopyAttributeList (IPMStream *inStream, IPMStream *outStream) |
Static Public Attributes | |
| static boost::shared_ptr < AttributeBossList > | kNil_shared_ptr |
Protected Member Functions | |
| ReadWriteStatus | DoWrite (IPMStream *stream) |
| ReadWriteStatus | DoRead (IPMStream *stream) |
| void | CopyInto (AttributeBossList *) const |
| bool16 | AllowCopy (ClassID attrClass, IPMUnknown *boss) const |
Friends | |
| void | swap (AttributeBossList &a, AttributeBossList &b) noexcept |
AttributeBossList is a data structure that groups a set of attributes with distinct classes. AttributeBossList is used both in the model and in the user interface to collect lists of attributes. The class supports the following basic operations:
| void AttributeBossList::ApplyAttribute | ( | const IPMUnknown * | newone, |
| const ClassID | attrClass = kInvalidClass | ||
| ) |
Apply a single attribute.
| newone | IN is a pointer to the attribute boss or an interface on the attribute boss to apply. |
| attrClass | IN the class of the attribute to apply. When attrClass is equal kInvalidClass, the function queries the object model for the class. |
| void AttributeBossList::ApplyAttributes | ( | const AttributeBossList * | list | ) |
Apply a list of attributes.
| list | IN attribute boss list to apply. |
| void AttributeBossList::ClearAllOverrides | ( | ) |
Remove all attributes in the list.
| void AttributeBossList::ClearNonStyleOverrides | ( | ) |
Remove attributes that are not allowed to exist in styles (ie: pair kern amounts).
| void AttributeBossList::ClearOverride | ( | ClassID | id | ) |
Remove the attribute that has class id from the list.
| id | IN class of attribute to remove. |
| void AttributeBossList::ClearOverrides | ( | const AttributeBossList * | list | ) |
Remove the attributes that have the classes of the attributes in list.
| list | IN attribute boss list to clear from list. when list is nil this function clears all attributes. |
| bool16 AttributeBossList::ContainsAttribute | ( | ClassID | klas | ) | const |
| klas | IN class of attribute. |
| bool16 AttributeBossList::ContainsExact | ( | IDataBase * | db, |
| const IPMUnknown * | check, | ||
| ClassID | klas = kInvalidClass | ||
| ) | const |
| check | IN to attribute searched for. |
| klas | IN of attribute. When klas is equal kInvalidClass, the function queries the model to get the class. |
| static |
Used in legacy conversion of attribute boss lists. Converts attribute boss list ifstreams have different revision numbers.
| inStream | IN source stream to convert from. |
| outStream | IN target stream to convert to. |
| static |
Used in legacy conversion of attribute boss lists. Copies attribute boss list from inStream to outStream.
| inStream | IN source stream to copy from. |
| outStream | IN target stream to copying to. |
| AttributeBossList* AttributeBossList::CopyTheseAttributes | ( | const AttributeBossList * | filter | ) | const |
Create a copy of the attributes in the list of which classes appear in filter.
| filter | IN attributes to copy from the list. |
| int32 AttributeBossList::CountBosses | ( | ) | const |
| protected |
For Internal use only.
| AttributeBossList* AttributeBossList::Duplicate | ( | ) | const |
| ClassID AttributeBossList::GetClassN | ( | int32 | n | ) | const |
| n | IN attribute number in the list. |
| bool16 AttributeBossList::IntersectionContainsDifferences | ( | IDataBase * | db, |
| const AttributeBossList * | other | ||
| ) | const |
| db | IN The database the attribute lists are "in". |
| other | IN attribute boss list to intersect with. |
| bool16 AttributeBossList::Intersects | ( | const AttributeBossList * | other | ) | const |
| other | IN attribute boss list to intersect with. |
| bool16 AttributeBossList::IsEqual | ( | IDataBase * | db, |
| const AttributeBossList * | other | ||
| ) | const |
| other | IN list to compare against. |
| const IPMUnknown* AttributeBossList::QueryBossN | ( | int32 | n, |
| PMIID | id | ||
| ) | const |
| n | IN attribute number in the list. |
| id | IN id of the interface queried for. When id is equal IID_IUNKNOWN, a pointer to the attribute boss is returned. |
| const IPMUnknown* AttributeBossList::QueryByClassID | ( | ClassID | c, |
| PMIID | id | ||
| ) | const |
| c | IN attribute class. |
| id | IN id of the interface queried for. When id is equal IID_IUNKNOWN, a pointer to the attribute boss is returned. |
| static |
Use this static to pass a K2:shared_pointer of a nil attribute boss list.