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

#include <ISwatchLibraryPanelHelper.h>

Inheritance diagram for ISwatchLibraryPanelHelper:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISWATCHLIBRARYPANELHELPER }
 

Public Member Functions

virtual ErrorCode PreLoadLibraryList (void)=0
 
virtual IControlViewNewPanel (PMString *pPanelName=nil)=0
 
virtual ErrorCode BuildPanel (IControlView *iLibPanelView)=0
 
virtual bool16 ValidatePanel (IControlView *iLibPanelView)=0
 
virtual IControlViewLoadOtherLibrary (WidgetID &widgetID, PMString *pPanelName=nil)=0
 
virtual bool16 RescanLibraryList (IPanelControlData *iPanelData, K2Vector< WidgetID > *pInvalPanelList=nil)=0
 
virtual PMString GetLibraryNameFromCreatorID (IPanelControlData *iPanelData, int32 creatorID)=0
 
virtual PMString GetLibraryNameFromCreatorID (int32)=0
 
virtual void SelectLibraryPanelSwatch (IControlView *iLibPanel, const PMString &swatchName)=0
 
virtual ErrorCode IsLibraryPanelSwatchSelectionValid (IControlView *iLibPanel, const UIDList &selectList, UIDList &validList, UIDList &conflictList)=0
 
virtual void GetLibraryPanelSwatchSelections (IControlView *iLibPanel, UIDList &selectList)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

A helper interface for managing the loading, unloading, selecting, adding, and replacing swatches from the Adobe swatch libraries within the InDesign swatch option dialog.

Member Function Documentation

virtual ErrorCode ISwatchLibraryPanelHelper::BuildPanel (IControlViewiLibPanelView)
pure virtual

Build the library panel by populating the panel with the swatch list. This is usually called when the panel is to be shown.

Parameters
iLibPanelViewspecifies the library panel view.
Returns
kSuccess if no errors, otherwise returns an error code.
virtual PMString ISwatchLibraryPanelHelper::GetLibraryNameFromCreatorID (IPanelControlDataiPanelData,
int32 creatorID 
)
pure virtual

Returns the swatch library's panel name from the library's creator ID.

Parameters
iPanelDatacontains the currently loaded library panels.
creatorIDspecifies the creator ID.
virtual PMString ISwatchLibraryPanelHelper::GetLibraryNameFromCreatorID (int32 )
pure virtual

Returns the swatch library's panel name from the library's creator ID.

Parameters
creatorIDspecifies the creator ID.
virtual void ISwatchLibraryPanelHelper::GetLibraryPanelSwatchSelections (IControlViewiLibPanel,
UIDListselectList 
)
pure virtual

Returns a list of library swatches selected.

Parameters
iLibPanelspecifies a library panel.
selectListis the list of new library swatch selection returned.
virtual IControlView* ISwatchLibraryPanelHelper::LoadOtherLibrary (WidgetIDwidgetID,
PMStringpPanelName = nil 
)
pure virtual

Load and build a library panel the user has explicitly selected via "Other..."

Parameters
widgetIDwill contain the new widget ID for this panel.
pPanelNamethe panel's name is returned if pPanelName is not nil.
Returns
the new panel's IControlView* if library is loaded and panel is created.
virtual IControlView* ISwatchLibraryPanelHelper::NewPanel (PMStringpPanelName = nil)
pure virtual

Create a new panel base on the preloaded swatch library list. Caller should keep the creation process going until all panels are created. Must call preloadLibraryList () first. Note also the panel is not populated with swatch list until it is actually shown.

Parameters
pPanelNamethe panel's name is returned if pPanelName is not nil.
Returns
the panel's IControlView* if panel is created.
virtual ErrorCode ISwatchLibraryPanelHelper::PreLoadLibraryList (void )
pure virtual

Preload the swatch library list from the preset folder.

Returns
kSuccess if no errors, otherwise returns an error code.
virtual bool16 ISwatchLibraryPanelHelper::RescanLibraryList (IPanelControlDataiPanelData,
K2Vector< WidgetID > * pInvalPanelList = nil 
)
pure virtual

Rescan the designated swatch library panel for new library files and return kTrue if at least one new library is found. Only rescan if library files already preloaded.

If K2Vector<WidgetID>* is not nil, then it also returns a list of library panel widget ID that must be revalidated to ensure the library panel is up-to-date.

Caller should call NewPanel to create a new panel based on the rescanned list. Continue until NewPanel returns an IControlView* = nil.

If a non-empty K2Vector<WidgetID>* is returned, the caller should call Validate for each of the panel in the list. The validatation must be make by the caller since the caller has knowledge regarding how the library panel is being used.

Parameters
iPanelDatacontains the currently loaded library panels.
pInvalPanelListIf pInvalPanelList is not nil, then it also returns a list of library panel widget ID that must be revalidated to ensure the library panel is up-to-date.
Returns
true if at least one new library is found.
virtual void ISwatchLibraryPanelHelper::SelectLibraryPanelSwatch (IControlViewiLibPanel,
const PMStringswatchName 
)
pure virtual

Select the swatch with swatchName in the specified swatch library's panel.

Parameters
iLibPanelspecifies a library panel.
swatchNameis the swatch name to select.
virtual bool16 ISwatchLibraryPanelHelper::ValidatePanel (IControlViewiLibPanelView)
pure virtual

Validate the library panel. This make sure that the library file associated with the panel still exists. (User might have moved or deleted the file.)

Parameters
iLibPanelViewspecifies the library panel view.
Returns
kTrue if still valid, otherwise returns kFalse.