InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CPanelCreator Class Reference

#include <cpanelcreator.h>

Inheritance diagram for CPanelCreator:
IPanelCreatorIPMUnknownXDocBkUIPanelCreatorYangPanelCreatorYinPanelCreator

Public Member Functions

 CPanelCreator (IPMUnknown *boss)
 
virtual ~CPanelCreator ()
 
virtual IControlViewCreatePanel (const ServiceID dialogServiceID, bool16 isDialog=kFalse)
 
virtual IControlViewCreatePanelForDialog (const ServiceID dialogServiceID)
 
virtual void GetServiceIDs (K2Vector< ServiceID > &serviceIDs)
 
virtual RsrcID GetPanelRsrcID () const
 
virtual bool16 AutoShowPanel () const
 

Protected Member Functions

virtual void GetPanelViewRsrcID (const ServiceID dialogServiceID, RsrcID &rsrcID, PluginID &pluginID)
 

Detailed Description

Partial implementation of IPanelCreator. Subclass should override GetPanelRsrcID at least.

Constructor & Destructor Documentation

CPanelCreator::CPanelCreator (IPMUnknownboss)

Constructor.

Parameters
bossrefers to object on which this interface is aggregated
virtual CPanelCreator::~CPanelCreator ()
virtual

Destructor

Member Function Documentation

virtual bool16 CPanelCreator::AutoShowPanel () const
virtual

If AutoShowPanel returns true, the panel created by this class is automatically made visible whenever a selectable dialog that this class has registered for (via GetServiceIDs()) is opened.

If AutoShowPanel returns false, the panel is not made visible nor is listed in the popup and it will have to be shown by calling ISelectableDialogSwitcher::ShowDialogPanel(). This function returns true by default.

Returns
kTrue if panel should be automatically made visible when selectable dialog in list that this can be located in is shown, kFalse if an explicit ISelectableDialogSwitcher::ShowDialogPanel message required to show panel created by this type.

Implements IPanelCreator.

virtual IControlView* CPanelCreator::CreatePanel (const ServiceID dialogServiceID,
bool16 isDialog = kFalse 
)
virtual

Creates the panel.

Parameters
dialogServiceIDthe service id of the dialog that the panel is being created for.

Implements IPanelCreator.

virtual IControlView* CPanelCreator::CreatePanelForDialog (const ServiceID dialogServiceID)
virtual

Creates the Dialog panel (for Selectable Dialogs, etc).

Parameters
dialogServiceIDthe service id of the dialog that the panel is being created for.

Implements IPanelCreator.

virtual RsrcID CPanelCreator::GetPanelRsrcID () const
virtual

Returns the resource id of the panel that is used in finding the service ids resource and the panel view resource.

Returns
resource ID containing service IDs resource and panel-view resource

Implements IPanelCreator.

Reimplemented in YangPanelCreator, YinPanelCreator, and XDocBkUIPanelCreator.

virtual void CPanelCreator::GetPanelViewRsrcID (const ServiceID dialogServiceID,
RsrcID & rsrcID,
PluginIDpluginID 
)
protectedvirtual

Determine view resource ID given a service ID.

Given a dialogServiceID, GetPanelViewRsrcID returns the corresponding resource id of the panel view that should be used to create the panel. If you want different views depending upon which dialog your panel gets installed in, create a IDListPair resource with the id the class of the panel creator. The list pairs list the dialog service ids and the resource id to use when creating the panel. If this resource doesn't exist or the dialog service id can't be found in the resource, this function returns 0.

Parameters
dialogServiceID
rsrcIDOUT parameter, holding resource ID for given dialogServiceID
pluginIDOUT parameter, holding plug-in ID where resource is located
virtual void CPanelCreator::GetServiceIDs (K2Vector< ServiceID > & serviceIDs)
virtual

Returns list of serviceIDs of selectable dialogs that this dialog panel can be installed in.

Parameters
serviceIDsOUT parameter, holding list of IDs of selectable dialogs

Implements IPanelCreator.