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

#include <IPalettePanelUtils.h>

Inheritance diagram for IPalettePanelUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPALETTEPANELUTILS }
 

Public Member Functions

virtual int32 GetNumPanelsInTabGroup (IControlView *panel)=0
 
virtual ICommandCreateDestroyPanelCmd (UID panelUID)=0
 
virtual ErrorCode ScheduleDestroyPanelCmd (UID panelUID)=0
 
virtual ICommandCreateHidePanelCmd (UID panelUID)=0
 
virtual ErrorCode ScheduleHidePanelCmd (UID panelUID)=0
 
virtual IPanelControlDataQueryPanelByWidgetID (WidgetID widgetID)=0
 
virtual void ShowNextDetailLevel (WidgetID panelWidgetID)=0
 
virtual PMString GetCurrentOptionString (WidgetID panelWidgetID)=0
 
virtual WidgetID GetCurrentListBoxID (const WidgetID panelID, RsrcID *itemWidgetRsrcID=nil)=0
 
virtual WidgetID GetCurrentListBoxID (const IPanelControlData *panelData, RsrcID *itemWidgetRsrcID=nil)=0
 
virtual void ShowHideOptions (WidgetID panelWidgetID)=0
 
virtual GSysRect GetMaxDocAreaRectAvoidingPalettes (bool16 onlyConsiderStashed=kFalse)=0
 
virtual void ResizePalettePanel (IControlView *panelView, const PMPoint &delta)=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

Utility interface for palette and panel related methods.

Member Function Documentation

virtual ICommand* IPalettePanelUtils::CreateDestroyPanelCmd (UID panelUID)
pure virtual

Create a command to destroy a panel

virtual ICommand* IPalettePanelUtils::CreateHidePanelCmd (UID panelUID)
pure virtual

Create a command to hide a panel (currently works by hiding the palette)

virtual WidgetID IPalettePanelUtils::GetCurrentListBoxID (const WidgetID panelID,
RsrcID * itemWidgetRsrcID = nil 
)
pure virtual

Get the current list box ID in the given panel. Used for Small palette rows.

NOTE: The GetCurrentListBoxID variants assume a rather simplistic panel organization, requiring that only one listbox in the

panels entire subview hierarchy be visible at a time. When designing new panels, keep this in mind. Caveat Emptor.



IMPORTANT NOTE: This method will fail to find the proper listbox if the panel is not shown.

If you are calling from the panels code, then get it's panel data and call the second variant of this method.

If you are calling from somewhere else and all you have is a panelID, then call this one, but handle failure gracefully.

(You should probably call panelMgr->IsPanelWithWidgetIDShown(panelID) first.)

Parameters
panelIDIN which panel
itemWidgetRsrcIDOUT returns the rsrcID to use for elements in the current listbox. See IListBoxAttributes::GetItemWidgetID
Returns
the widgetID of the list box
virtual WidgetID IPalettePanelUtils::GetCurrentListBoxID (const IPanelControlDatapanelData,
RsrcID * itemWidgetRsrcID = nil 
)
pure virtual

Get the current list box ID in the given panel. Used for Small palette rows.

NOTE: The GetCurrentListBoxID variants assume a rather simplistic panel organization, requiring that only one listbox in the

panels entire subview hierarchy be visible at a time. When designing new panels, keep this in mind. Caveat Emptor.

Parameters
panelIDIN which panel
itemWidgetRsrcIDOUT returns the rsrcID to use for elements in the current listbox. See IListBoxAttributes::GetItemWidgetID
Returns
the widgetID of the list box
virtual PMString IPalettePanelUtils::GetCurrentOptionString (WidgetID panelWidgetID)
pure virtual

Get string corresponding to the panels current detail level, if it has a panel detail controller. Either "Show Options" or "Hide Options"

virtual GSysRect IPalettePanelUtils::GetMaxDocAreaRectAvoidingPalettes (bool16 onlyConsiderStashed = kFalse)
pure virtual

Adjust the bbox of the max document window, considering the current palette locations.

virtual int32 IPalettePanelUtils::GetNumPanelsInTabGroup (IControlViewpanel)
pure virtual

QueryParentPalette - equivalent functionality can be found in IPanelMgr QueryPaletteWindow - equivalent functionality can be found in IPanelMgr GetNumPanels - equivalent functionality can be found in IPaletteMgr

virtual IPanelControlData* IPalettePanelUtils::QueryPanelByWidgetID (WidgetID widgetID)
pure virtual

Get a panel from a widget id. Used mostly by menus/actions that want to do something to a panel (find/update a specific widget).

Note: If the panel is not visible, this method will return nil. This is because the PanelMgr is optimized to purge panels that are not shown, so we don't want to hand out pointers to them.

virtual void IPalettePanelUtils::ResizePalettePanel (IControlViewpanelView,
const PMPointdelta 
)
pure virtual

resizes the panel view in palette

Parameters
panelViewIN panel to resize
deltaIN delta amount to resize. these are the relative dimensions i.e. delta = (5,-5) represents increase the width by 5 and reduce the height by 5.
virtual ErrorCode IPalettePanelUtils::ScheduleDestroyPanelCmd (UID panelUID)
pure virtual

Create and schedule a command to destroy a panel

virtual ErrorCode IPalettePanelUtils::ScheduleHidePanelCmd (UID panelUID)
pure virtual

Create and schedule a command to hide a panel

virtual void IPalettePanelUtils::ShowHideOptions (WidgetID panelWidgetID)
pure virtual

Show or hide panel options for panels with panel detail controllers.

virtual void IPalettePanelUtils::ShowNextDetailLevel (WidgetID panelWidgetID)
pure virtual

Switch the panel to it's next detail level, if it has a panel detail controller.