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

#include <IPanelMgr.h>

Inheritance diagram for IPanelMgr:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPANELMGR }
 

Public Member Functions

virtual void Startup ()=0
 
virtual void ShutDown ()=0
 
virtual void UpdatePanelIcon (const WidgetID &widgetId, PluginID pluginId=kInvalidPlugin, RsrcID resourceId=kInvalidRsrcID)=0
 
virtual IControlViewCreatePanel (const PMLocaleId &localeId, RsrcID panelID, const PluginID &pluginID)=0
 
virtual void RegisterPanel (PaletteRefType paletteType, IControlView *panel, bool16 isResizable, const PMString &panelName, ActionID actionID, const PMString &altMenu, PMReal altPos, const ScriptID &scriptID, PluginID paletteIconPluginID, RsrcID paletteIconRsrcID)=0
 
virtual void MovePanel (PaletteRef parentPalette, IControlView *panel)=0
 
virtual void DestroyPanel (const UID &panelUID)=0
 
virtual IControlViewGetPanelFromWidgetID (const WidgetID &widgetId) const =0
 
virtual IControlViewGetPanelFromActionID (const ActionID &actionId) const =0
 
virtual IControlViewGetVisiblePanel (const WidgetID &widgetId) const =0
 
virtual IControlViewGetVisiblePanelFromActionID (const ActionID &actionId) const =0
 
virtual bool16 DoesPanelExist (const WidgetID &widgetId) const =0
 
virtual bool16 DoesPanelExistFromActionID (const ActionID &actionId) const =0
 
virtual void ShowPanelByMenuID (const ActionID &id, bool16 giveKeyFocus=kTrue)=0
 
virtual void ShowPanelByWidgetID (const WidgetID &widgetId, bool16 giveKeyFocus=kTrue)=0
 
virtual void HidePanelByMenuID (const ActionID &id)=0
 
virtual void HidePanelByWidgetID (const WidgetID &widgetId)=0
 
virtual bool16 IsPanelWithMenuIDShown (const ActionID &id) const =0
 
virtual bool16 IsPanelWithWidgetIDShown (const WidgetID &widgetId) const =0
 
virtual void ArePanelsWithMenuIDMostlyVisible (const K2Vector< ActionID > &inActionList, K2Vector< bool16 > &outMostlyVisibleList) const =0
 
virtual bool16 IsPanelWithMenuIDMostlyVisible (const ActionID &id) const =0
 
virtual PMString GetPanelMenuName (const ActionID &id) const =0
 
virtual void SetPanelMenuName (const ActionID &id, const PMString &menustr)=0
 
virtual IControlViewGetPanelFromPaletteContainer (PaletteRef palette) const =0
 
virtual PaletteRef GetPaletteRefContainingPanel (const IPMUnknown *panel) const =0
 
virtual uint32 GetPanelCount () const =0
 
virtual bool16 GetNthPanelInfo (uint32 index, UID &panelUID, ActionID *actionID=nil, WidgetID *widgetID=nil, PMString *panelName=nil, ScriptID *scriptID=nil) const =0
 
virtual void SetPanelResizabilityByWidgetID (const WidgetID &widgetId, bool16 isResizable)=0
 
virtual bool16 IsPanelWithWidgetIDResizable (const WidgetID &widgetId) const =0
 
virtual void FitPaletteToPanel (const IControlView *panel)=0
 
virtual void FixupPanelOrigin (IControlView *panel, PaletteRef parentPalette) const =0
 
virtual void SetPanelPopupMenuName (IControlView *panel, const PMString &popupMenuName)=0
 
virtual PMString GetPanelPopupMenuName (IControlView *panel) const =0
 
virtual IControlViewGetPanelFromPanelName (const PMString &panelName) const =0
 
virtual void UsageTracking_PanelClosed (const PaletteRef &paletteRef) const =0
 
virtual void LogPanelUsage () const =0
 
virtual void ShowPanelByExtensionID (const PMString &extensionId, const PMString &panelId, bool16 giveKeyFocus=kTrue)=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

Interface representing the Panel manager, which holds a collection of panels, and provides access to those panels. A panel (in this context) is the topmost InDesign boss object that users may think of as a palette, such as the stroke panel. Above the panel are various objects that act as containers to group panels together in various ways. These are represented by PaletteRef objects.

See Also
PaletteRef.h and
PaletteRefUtils.h for more information about how to interact with these containing objects.

Member Function Documentation

virtual void IPanelMgr::ArePanelsWithMenuIDMostlyVisible (const K2Vector< ActionID > & inActionList,
K2Vector< bool16 > & outMostlyVisibleList 
) const
pure virtual

Are these panels visible(and not mostly covered by some other window. The version that takes a list is more efficient if you need to ask about several panels at once.

Parameters
inActionListIN actionIDs of the panels
outMostlyVisibleListOUT bools indicating the mostlyvisible state of the panels.
virtual IControlView* IPanelMgr::CreatePanel (const PMLocaleIdlocaleId,
RsrcID panelID,
const PluginIDpluginID 
)
pure virtual

Create a panel without adding it to the Panel manager.

Parameters
localeIdIN
panelIDIN resource id of the panel to be created
pluginIDIN plugin id of plugin that contains the panel resource
Returns
control view of the new panel. This has been AddRef'ed, so caller must release it.
virtual void IPanelMgr::DestroyPanel (const UIDpanelUID)
pure virtual

Remove a panel from its palette and destroy it. Typically invoked through kDestroyPanelCmdBoss

Parameters
panelUIDIN UID for the panel to be destroyed
Precondition
Caller must not be holding a reference to the panel.
virtual bool16 IPanelMgr::DoesPanelExist (const WidgetIDwidgetId) const
pure virtual

Does the panel manager know about a specific panel.

Parameters
widgetIdIN widgetID of the desired panel
Returns
does the panel exist
virtual void IPanelMgr::FitPaletteToPanel (const IControlViewpanel)
pure virtual

Resize the parent palette of the given panel to accomodate the panels new size. Usually called internally by the panelmgr. This API may be removed in the future.

virtual void IPanelMgr::FixupPanelOrigin (IControlViewpanel,
PaletteRef parentPalette 
) const
pure virtual

Fixup the the origin of a panel used in a toolbar or controlbar. (Called by framework. Client code should not need to call this.)

virtual PaletteRef IPanelMgr::GetPaletteRefContainingPanel (const IPMUnknownpanel) const
pure virtual

Query for the PaletteRef holding a panel.

See Also
PaletteRefUtils.h for tips on manipulating the PaletteRef object hierarchy. For regular tabbed palettes, this should return an object of type kTabPanelContainerType. Controlbars should return an object of type kControlBarType, and toolbars should return an object of type kToolbarType.
virtual uint32 IPanelMgr::GetPanelCount () const
pure virtual

Return the entries in the panel list

virtual IControlView* IPanelMgr::GetPanelFromPaletteContainer (PaletteRef palette) const
pure virtual

Query for the panel based on it's palette container. Should only pass in the immediate parent of a panel, such as a kToolbarType, kControlBarType, or kTabPanelContainerType

virtual IControlView* IPanelMgr::GetPanelFromWidgetID (const WidgetIDwidgetId) const
pure virtual

Get a panel by its widgetId or actionId.

You can use IsPanelWithWidgetIDShown or DoesPanelExist for related info.

Parameters
widgetIdIN widgetID of the desired panel
Returns
the desired panel
virtual PMString IPanelMgr::GetPanelMenuName (const ActionIDid) const
pure virtual

Get/Set the menu string associated with a panel.

virtual PMString IPanelMgr::GetPanelPopupMenuName (IControlViewpanel) const
pure virtual

Retrieve the current popup menu name, if any, from the panel

Parameters
panelIN the panel
Returns
the name of the popup menu
virtual IControlView* IPanelMgr::GetVisiblePanel (const WidgetIDwidgetId) const
pure virtual

Get a panel by its widgetId or actionId. If the panel is not currently visible, this will return nil. You can use IsPanelWithWidgetIDShown or DoesPanelExist for related info. It is not safe to hand out pointers to panels that are not shown, PanelMgr may purge them and their contents

Parameters
widgetIdIN widgetID of the desired panel
Returns
the desired panel
virtual void IPanelMgr::HidePanelByMenuID (const ActionIDid)
pure virtual

Hide a panel. May also hide containing PaletteRef objects, depending on their contents.

Parameters
idIN actionID of the panel
virtual void IPanelMgr::HidePanelByWidgetID (const WidgetIDwidgetId)
pure virtual

Hide a panel (by hiding the palette that contains the panel).

Parameters
widgetIdIN widgetId of the panel
virtual bool16 IPanelMgr::IsPanelWithMenuIDMostlyVisible (const ActionIDid) const
pure virtual

Is the panel visible onscreen (OK if panel is collapsed or obscured).

Parameters
idIN actionID of the panel
Returns
true only if panel is less then 50% obscured by other palettes
virtual bool16 IPanelMgr::IsPanelWithMenuIDShown (const ActionIDid) const
pure virtual

Is the panel and its palette shown. Note: Will return kFalse for a minimized palette (panel's control view is hidden in this case). Use IsPanelWithMenuIDVisible instead if you need to know if it's on the screen at all.

Parameters
idIN actionID of the panel
Returns
is the panel actually showing on screen
virtual bool16 IPanelMgr::IsPanelWithWidgetIDResizable (const WidgetIDwidgetId) const
pure virtual

Is the panel resizable. Resizable panels have a resize widget in the bottom right corner to enable the user to drag resize them.

Parameters
widgetIdIN widgetId of the panel
Returns
is the panel resizable
virtual void IPanelMgr::LogPanelUsage () const
pure virtual

for_internal_use_only To log any open/close panel usage.

virtual void IPanelMgr::MovePanel (PaletteRef parentPalette,
IControlViewpanel 
)
pure virtual

Move a panel to a palette (removing it from it's current location). See PaletteRefUtils for more variations on this theme.

Parameters
parentPaletteIN destination palette window. For a regular tabbed palette, this is expected to be a tabgroup.
panelIN the panel to be moved
virtual void IPanelMgr::RegisterPanel (PaletteRefType paletteType,
IControlViewpanel,
bool16 isResizable,
const PMStringpanelName,
ActionID actionID,
const PMStringaltMenu,
PMReal altPos,
const ScriptIDscriptID,
PluginID paletteIconPluginID,
RsrcID paletteIconRsrcID 
)
pure virtual

Add an already created and loaded panel to the Panel manager.

Parameters
paletteTypeIN which kind of palette this panel goes in. Usually one of (kTabPanelContainerType | kToolbarType | kControlBarType)
panelIN the panel to be added to the Panel manager. PanelMgr will AddRef the panel, and not release until app shutdown.
isResizableIN indicates if the panel should have a resize box.
panelNameIN name of the panel (used as menu name in window menu), or empty string if altMenu is used
actionIDIN the action id to associate with the panel
altMenuIN full path of panel menu if it appears somewhere other than the window menu
altPosIN menu position to go along with altMenu
scriptIDIN which script object to use for this panel
paletteIconPluginIDIN plugin id for palette icon
paletteIconRsrcIDIN resource id for palette icon
virtual void IPanelMgr::SetPanelPopupMenuName (IControlViewpanel,
const PMStringpopupMenuName 
)
pure virtual

Add a popup menu to the panel and set its name. Pass the empty string to remove a popup menu from the panel.

Parameters
panelIN the panel
popupMenuNameIN the name of the popup menu
virtual void IPanelMgr::SetPanelResizabilityByWidgetID (const WidgetIDwidgetId,
bool16 isResizable 
)
pure virtual
Set if the panel is resizable. Resizable panels have a resize widget in the bottom right corner to enable the user to drag resize them. Most panels are either resizable or not all the time, but a few

have different modes, some of which are resizable, and some of which are not. This provides a way to switch between being a resizable panel and not.

Parameters
widgetIdIN widgetId of the panel
resizableis the panel resizable
virtual void IPanelMgr::ShowPanelByExtensionID (const PMStringextensionId,
const PMStringpanelId,
bool16 giveKeyFocus = kTrue 
)
pure virtual

for_internal_use_only Show a UXP panel. Calling this should make the panel appear onscreen.

Parameters
extensionIdIN extension Id of the UXP plugin
giveKeyFocusIN give key focus to panel
virtual void IPanelMgr::ShowPanelByMenuID (const ActionIDid,
bool16 giveKeyFocus = kTrue 
)
pure virtual

Show a panel. This may cause one or more containing PaletteRef objects to show as well. Calling this should make the panel appear onscreen.

Parameters
idIN actionID of the panel
giveKeyFocusIN give key focus to panel
virtual void IPanelMgr::ShowPanelByWidgetID (const WidgetIDwidgetId,
bool16 giveKeyFocus = kTrue 
)
pure virtual

Show a panel. This may cause one or more containing PaletteRef objects to show as well. Calling this should make the panel appear onscreen.

Parameters
widgetIdIN widgetId of the panel
giveKeyFocusIN give key focus to panel
virtual void IPanelMgr::UpdatePanelIcon (const WidgetIDwidgetId,
PluginID pluginId = kInvalidPlugin,
RsrcID resourceId = kInvalidRsrcID 
)
pure virtual

Update palette icon of the panel.

Parameters
widgetIDIN widgetID of the desired panel
pluginIdIN palette icon pluginId.
resourceIdIN palette icon resourceId.
virtual void IPanelMgr::UsageTracking_PanelClosed (const PaletteRefpaletteRef) const
pure virtual

for_internal_use_only To log any open/close panel usage.