#include <IMasterSpreadUtils.h>
|
| enum | { kDefaultIID = IID_IMASTERSPREADUTILS } |
| |
|
| virtual bool16 | _IsFrontViewAMaster ()=0 |
| |
| virtual void | BuildMasterSpreadList (IStringListControlData *stringData, UIDList *masterUIDs, bool16 bIncludeNone, UID excludeUID)=0 |
| |
| virtual bool16 | IsAnAncestorOf (IMasterSpreadList *masterList, UID masterA, UID masterB)=0 |
| |
| virtual void | GetAncestorsOf (IMasterSpreadList *masterSpreadList, UID masterUID, UIDList *ancestors)=0 |
| |
| virtual void | TopoSortMasterSpread (IMasterSpreadList *masterSpreadList, UIDList *sortedList)=0 |
| |
| virtual bool16 | IsMasterAppliedToPage (UID masterUID, IPMUnknown *page) const =0 |
| |
| virtual UIDList | GetUnusedMasterUIDs (IDocument *doc)=0 |
| |
| virtual int32 | CountPagesWithMaster (UIDList *masterUIDs, int32 *mastersWithMaster=nil, UIDList *pageUIDs=nil)=0 |
| |
| virtual bool16 | OverrideMasterPageItem (const UIDRef masterItem, const UIDRef pageToOverrideOn, ICommand::Undoability undoability=ICommand::kAutoUndo, UIDRef *overriddenItem=nil)=0 |
| |
| virtual bool16 | IsMasterItemOverriddenOnPage (const UIDRef masterItem, const UIDRef startPageUIDRef)=0 |
| |
| virtual ICommand * | CreateOverrideMasterPageItemsCmd (const UIDList &spreadsOrPages, ICallback *masterItemCollector=nil, int32 drwMgrFlags=IShape::kSkipChildren+IShape::kSkipHiddenAndLockedLayers) const =0 |
| |
| virtual void | AppendMasterPageItems (IDataBase *db, UID theSpread, const UIDList &onThesePages, const PMRectCollection &pageBounds, UIDList &masterItems, UIDList &pages, PMMatrixCollection &offsets, ICallback *masterItemCollector=nil, int32 drwMgrFlags=IShape::kSkipChildren+IShape::kSkipHiddenAndLockedLayers) const =0 |
| |
| virtual PMMatrix | CalculateMasterSpreadToDrawingSpreadMatrix (const IMasterPage *drawingPage, UIDRef masterPage=kInvalidUIDRef) const =0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
Utility interface to manipulate master spreads; please use the IMasterSpreadUtils via kUtilsBoss (see Utils.h).
Utils<MasterSpreadUtils>()->IsFrontViewAMaster( ... ) ;
- See Also
- kUtilsBoss
- kMasterPagesBoss
| virtual bool16 IMasterSpreadUtils::_IsFrontViewAMaster | ( | | ) | |
| pure virtual |
- Returns
- kFalse - obsolete, do not use
Creates a list of master page items, pages, and offsets for the master items that are drawn on the given spread and page bounds.
- Parameters
| db | the database for the document to operate on |
| theSpread | the UID of the spread to collect the items from |
| onThesePages | the UIDs of the pages within this spread |
| pageBounds | the bounds of the pages (in spread coordinates). May be enlarged by bleed, slug, etc. |
| masterItems | OUT the returned list of items drawn on the spread |
| pages | OUT the page UID for the master page item (parallel list with masterItems) |
| offsets | OUT the offset of each master page item (parallel list with masterItems) |
| masterItemCollector | OPTIONAL. Call back object being used for collecting master page items. |
| drwMgrFlags | OPTIONAL. Draw flags to use for collecting master page items. |
- See Also
- ILayoutUtils::EnlargePagesRectBySlug
build a string list of master spread names.
- Parameters
| stringData | IN an empty IStringListControlData OUT a list of master names |
| masterUIDs | IN an empty UIDList created with a valid database OUT a list of UIDs, parallel to stringData (i.e. the n'th UID corresponds to the n'th master name) |
| bIncludeNone | IN kTrue means include the string 'None' |
| excludeUID | IN if valid, skip this UID |
| virtual int32 IMasterSpreadUtils::CountPagesWithMaster | ( | UIDList * | masterUIDs, | | | int32 * | mastersWithMaster = nil, | | | UIDList * | pageUIDs = nil | | ) | | |
| pure virtual |
count the number of pages in the document that have one of the specified masters applied to it. optionally look at the masters also.
- Parameters
| masterUIDs | IN list of masters being queried about |
| mastersWithMaster | OUT if not NIL, returns the count of master spreads with the specified masters applied |
| pageUIDs | OUT if not NIL, returns an array of page UIDs with the specified masters applied |
Creates a OverrideMasterPageItemsCmd and feeds it with items based on the UIDList that is being passed in.
- Parameters
| spreadsOrPages. | UIDList of spreads or pages. |
| masterItemCollector | OPTIONAL. Call back object being used for collecting master page items.. |
| drwMgrFlags | OPTIONAL. Draw flags being used for collecting master page items.. |
- Returns
- an executable command (kOverrideMasterPageItemCmdBoss).
build a list of all masters applied to a given master or its ancestors
- Parameters
| masterSpreadList | IN list of masters for a given document |
| masterUID | IN master spread whose ancestors are being requested |
| ancestors | OUT list of all masters applied to the specified master, or to those masters |
build a UID list of master spreads that are not applied to pages.
- Parameters
| doc | IN The database to search. |
- Returns
- a UIDList of unused master spread UIDs
Return kTrue if masterA is an ancestor of masterB (i.e. if one of the pages of B has masterA applied to it, or if one of master B's masters has masterA applied to it, and so on recursively)
- Parameters
| masterList | IN list of masters (containing masterA and masterB |
| masterA | IN potential ancestor master spread masterB IN master being queried about |
- Returns
- kTrue if masterA is an ancestor of masterB; kFalse otherwise
| virtual bool16 IMasterSpreadUtils::IsMasterAppliedToPage | ( | UID | masterUID, | | | IPMUnknown * | page | | ) | | const |
| pure virtual |
Returns kTrue if the specified master is applied to the specified page, or to one of its ancestors
- Parameters
| masterUID | IN master being queried about |
| page | IN page being queried about |
- Returns
- kTrue if page has masterUID applied to it (recursively)
| virtual bool16 IMasterSpreadUtils::IsMasterItemOverriddenOnPage | ( | const UIDRef | masterItem, | | | const UIDRef | startPageUIDRef | | ) | | |
| pure virtual |
determine if the given master page item is already overridden on the given page (may be a crossover and therefore overridden on a page other than the specified one)
- Parameters
| masterItem | IN master page page item being queried about |
| startPageUIDRef | IN page being queried about |
- Returns
- kTrue if the given master page page item is overridden on the given page
Given a master item and a layout page which has that master item drawing on it, override the master item and return the item corresponding to the passed in item. This may be different than the item which was overridden - in the case of a sub-item of a group, the returned item is the item corresponding to the passed in item, not the group (which was overridden). The undoability argument is for uses where the returned item is immediately modified, so the 'Override master item' doesn't need to show up in the Undo stack.
Return value is kTrue if everything is OK, kFalse if the item wasn't overridden (which can happen if the specified master item wasn't drawing on the specified page, or if the item was already overridden)
- Parameters
| masterItem | IN master item to override |
| pageToOverrideOn | IN page to override the item on |
| undoability | IN how should the override command be undone? default : ICommand::kAutoUndo |
| overriddenItem | OUT new page item corresponding to masterItem |
- Returns
- kTrue if success, kFalse otherwise
sort the specified IMasterSpreadList such that masters with other masters applied to them are later in the list than the masters they derive from (e.g. if 'B-Master' has 'C-Master' applied, and 'A-Master' and 'C-Master' have 'None' applied, the sorted order would be 'A-Master', 'C-Master', 'B-Master'.). Useful for duplicating a master spread list to a new document.
Warning: I think the above comment is wrong. It seems that TopoSortMasterSpread sorts all the masters so that a given master in the list depends only on masters appearing later in the list. That is the root masters are sorted to the end of the list and the most dependent masters are sorted to the beginning.
- Parameters
| masterSpreadList | IN list of master spreads for a given document |
| sortedList | OUT sorted list of masters, base masters first, derived masters later. |