![]() | InDesign SDK 20.5 |
#include <PaletteRefUtils.h>
Public Types | |
| enum | DockLocation { kLeft_DockLocation = 1, kTop_DockLocation, kRight_DockLocation, kBottom_DockLocation, kFloating_DockLocation, kAppContainer_DockLocation } |
| enum | DockMode { kExpanded_DockMode = 1, kConcealed_DockMode, kRevealed_DockMode } |
| enum | TabPaneMode { kExpanded_TabPaneMode = 1, kIcon_TabPaneMode } |
| enum | TabPaneLayoutMode { kAutoFlow_TabPaneLayoutMode = 1, kManual_TabPaneLayoutMode } |
| enum | ToolbarSizeVariant { kVerticalWide_ToolbarSizeVariant = 1, kVerticalNarrow_ToolbarSizeVariant, kHorizontal_ToolbarSizeVariant } |
| enum | PanelLabel { kTitle_PanelLabel = 0, kTooltip_PanelLabel } |
| enum | PaletteVisibilityChange { kShowPalette = 0, kHidePalette } |
| enum | ShowHideLevel { kShowHideFloatingTabPalettes, kShowHideAllPalettes } |
| enum | WhichTabPanes { kNoTabPanes, kLHSTabPanes, kRHSTabPanes, kAllTabPanes } |
Static Public Member Functions | |
| static bool16 | IsRootPaletteNode (const PaletteRef &whichPalette) |
| static bool16 | IsApplicationContainer (const PaletteRef &whichPalette) |
| static bool16 | IsDock (const PaletteRef &whichPalette) |
| static bool16 | IsTabbedPaletteDock (const PaletteRef &whichPalette) |
| static bool16 | IsDocumentDock (const PaletteRef &whichPalette) |
| static bool16 | IsFloatingTabbedPaletteDock (const PaletteRef &whichPalette) |
| static bool16 | IsFloatingDocumentDock (const PaletteRef &whichPalette) |
| static bool16 | IsTabPane (const PaletteRef &whichPalette) |
| static bool16 | IsControlBarPane (const PaletteRef &whichPalette) |
| static bool16 | IsTabGroup (const PaletteRef &whichPalette) |
| static bool16 | IsToolbar (const PaletteRef &whichPalette) |
| static bool16 | IsControlBar (const PaletteRef &whichPalette) |
| static bool16 | IsTabPanelContainer (const PaletteRef &whichPalette) |
| static bool16 | IsDocumentPresentation (const PaletteRef &whichPalette) |
| static bool16 | IsPaletteFloating (const PaletteRef &whichPalette) |
| static PaletteRef | GetPaletteRefFromOWLPalette (OWLControlRef owlControl) |
| static IDocumentPresentation * | GetDocumentPresentationFromPaletteRef (const PaletteRef &presentationRef) |
| static PaletteRef | GetPaletteRefFromDocumentPresentation (const IDocumentPresentation *pres) |
| static PaletteRef | GetRootPaletteNode () |
| static PaletteRef | GetApplicationContainer () |
| static void | SetApplicationContainer (OWLControlRef owlControl) |
| static PaletteRef | GetApplicationContainerDocumentDock () |
| static uint16 | GetChildCountOfPalette (const PaletteRef &parentPalette) |
| static PaletteRef | GetNthChildOfPalette (const PaletteRef &parentPalette, uint16 inIndex) |
| static PaletteRef | GetParentOfPalette (const PaletteRef &whichPalette) |
| static void | ReparentPalette (const PaletteRef &whichPalette, const PaletteRef &newParent, const PaletteRef &beforeSibling) |
| static void | FloatPalette (const PaletteRef &whichPalette) |
| static uint16 | GetTopLevelPaletteCount () |
| static PaletteRef | GetNthTopLevelPalette (uint16 inIndex) |
| static uint16 | GetDockCount () |
| static PaletteRef | GetNthDock (uint16 inIndex) |
| static PaletteRef | FindDockByLocation (DockLocation whichLocation) |
| static uint16 | GetFloatingTabbedPaletteDockCount () |
| static PaletteRef | GetNthFloatingTabbedPaletteDock (uint16 inIndex) |
| static uint16 | GetFloatingDocumentDockCount () |
| static PaletteRef | GetNthFloatingDocumentDock (uint16 inIndex) |
| static PaletteRef | GetFloatingDocumentDockParentOfDocument (PaletteRef whichDocument) |
| static DockLocation | GetDockLocation (const PaletteRef &whichDock) |
| static DockMode | GetDockMode (const PaletteRef &whichDock) |
| static void | SetDockMode (const PaletteRef &whichDock, DockMode newMode) |
| static SysPoint | GetFloatingDockPreferredPosition (const PaletteRef &whichDock) |
| static void | SetFloatingDockPreferredPosition (const PaletteRef &whichDock, SysPoint &where) |
| static void | SetFloatingDocumentWindowBounds (const PaletteRef &documentRef, SysRect newBounds) |
| static void | SetFloatingDocumentBounds (const PaletteRef &documentRef, SysPoint newDimensions) |
| static TabPaneMode | GetTabPaneMode (const PaletteRef &whichTabPane) |
| static void | SetTabPaneMode (const PaletteRef &whichTabPane, TabPaneMode newMode) |
| static TabPaneLayoutMode | GetTabPaneLayoutMode (const PaletteRef &whichTabPane) |
| static void | SetTabPaneLayoutMode (const PaletteRef &whichTabPane, TabPaneLayoutMode newLayoutMode) |
| static float | GetTabPanePreferredIconicWidth (const PaletteRef &whichTabPane) |
| static void | SetTabPanePreferredIconicWidth (const PaletteRef &whichTabPane, float newWidth) |
| static ToolbarSizeVariant | GetToolbarSizeVariant (const PaletteRef &whichToolbar) |
| static void | SetToolbarSizeVariant (const PaletteRef &whichToolbar, ToolbarSizeVariant newVariant) |
| static void | SetToolbarSizeVariant (const PaletteRef &toolbarRef, IUserInterfacePreferences::ToolboxState newState) |
| static void | FixupToolbarContentOrigin (const PaletteRef &toolbarRef) |
| static PMString | GetPaletteLabel (const PaletteRef &whichPalette, PanelLabel whichLabel=kTitle_PanelLabel) |
| static void | SetPaletteLabel (const PaletteRef &whichPalette, const PMString &labelstr, PanelLabel whichLabel=kTitle_PanelLabel) |
| static SysPoint | GetPalettePosition (const PaletteRef &whichPalette) |
| static void | SetPalettePosition (const PaletteRef &whichPalette, SysCoord left, SysCoord top) |
| static SysRect | GetPaletteBounds (const PaletteRef &whichPalette) |
| static void | SetPaletteSize (const PaletteRef &whichPalette, SysPoint newDimensions) |
| static SysRect | GetOpticalPaletteBounds (const PaletteRef &whichPalette) |
| static bool16 | GetVisibleState (const PaletteRef &whichPalette) |
| static bool16 | IsPaletteVisible (const PaletteRef &whichPalette) |
| static bool16 | IsPaletteMinimized (const PaletteRef &whichPalette) |
| static void | ChangePaletteMinimization (const PaletteRef &whichPalette, bool16 minimize) |
| static void | ShowHideEntirePaletteSystem (PaletteVisibilityChange show) |
| static bool16 | IsEntirePaletteSystemHidden () |
| static void | ForcePaletteSystemToPerformLayout () |
| static void | ShowHidePalette (const PaletteRef &whichPalette, PaletteVisibilityChange show) |
| static void | BringPaletteToFront (const PaletteRef &whichPalette) |
| static void | CenterPaletteOnScreen (const PaletteRef &whichPalette) |
| static PaletteRef | NewTabPaneInDock (const PaletteRef &dockParent, TabPaneMode mode, const PaletteRef &beforeOptionalSibling) |
| static PaletteRef | NewControlBarPaneInDock (const PaletteRef &dockParent, const PaletteRef &beforeOptionalSibling) |
| static PaletteRef | NewFloatingTabGroupContainerPalette () |
| static PaletteRef | NewTabGroupPalette (const PaletteRef &tabGroupClusterOrTabPaneParent) |
| static PaletteRef | NewToolbarPalette () |
| static PaletteRef | NewControlbarPalette () |
| static bool16 | CanClose (const PaletteRef &paletteRef) |
| static bool16 | GetIsClosed (const PaletteRef &paletteRef) |
| static void | ChangeIsClosed (const PaletteRef &paletteRef, bool16 close=kTrue) |
| static void | AdjustClientAreaToPalettes () |
| static void | InvalidateAllPalettes () |
| static void | ShowHidePalettes (ShowHideLevel paletteShowHideLevel=kShowHideAllPalettes) |
| static bool16 | AreTabPanesOpen (WhichTabPanes whichOnes=kAllTabPanes) |
| static void | OpenCloseTabPanes (WhichTabPanes whichOnes=kAllTabPanes, bool16 open=kTrue) |
| static IXMLGenerator * | QueryXMLGenerator (PaletteRefType paletteType) |
| static IPaletteFactory * | QueryPaletteFactory (PaletteRefType paletteType) |
| static void | NotifyPaletteIsClosing (PaletteRef owlPalette) |
| static void | NotifyPaletteContainerIsClosing (PaletteRef owlPalette) |
| static void | PositionPaletteOnScreen (const PaletteRef &whichPalette, PMReal distanceFromLeftOnScreenInPercentage) |
PaletteRefUtils is here to allow you to walk and manipulate the palette hierarchy. Most client code will not need to use PaletteRefUtils at all, because the IPanelMgr interface generally provides everything you need. If you do need to manipulate the palette containers directly, this collection of APIs should allow you to do that.
For a description of the palette hierarchy (whcih changed substantially with OWL 2.0 see PaletteRef.h.
IMPORTANT: OWL2 performs palette layout asynchronously, and only for visible palettes. When layout is pending or in progress many of the routines below used to get palette sizes, positions, etc. Way return values that will be different after the layout completes.
The edge to which a dock anchors itself.
The various modes in which a dock can exist.
In this version of InDesign (CS3) only expanded mode is supported.
Palette visibility actions
Enum of labels associated with a tabbed panel.
The layout modes in which a tab pane can exist. In Autoflow mode the height of the tabpane always fills the available vertical space, in manual mode the tabPane's height is defermined by the height of the tab groups it contains.
The various modes in which a tab pane can exist. In Expanded mode, the palette content shows and the user interacts with the contents of the palette, in Icon mode, the palettes are collapsed to thier icon and optional text, and the user interacts with the palette content in a drawer.
The toolbars size variants, two vertically oriented sizes and one horizontally oriented size.
| static |
Called when AppFrame changes size, Monitor resolution changes, or after Workspace changes. replaces AdjustPalettesToClientArea
| static |
Retrieves the state of the tab panes as of the last call to OpenCloseTabPanes.
| whichOnes | IN which tab panes to check |
| static |
Bring a specific palette, and it's containers, to the front.
| static |
Return true if the palette can be closed.
| static |
Move a specific palette to be centered on the main screen.
| static |
Change the closed state of the palette.
| static |
Sets the minimize state of the palette. only valid to call on tab panel containers.
| static |
Get a particular dock, by location (only works for top, left, bottom and right docked palette docks)
| static |
INTERNAL USE ONLY: Utility routine to offset the ID panel wrapper within its toolbar parent so that it draws properly.
| static |
Palette reparenting (special case for making a docked toolbar or controlbar float)
| whichPalette | IN the palette to be reparented. |
| static |
Force the entire palette system to perform layout (which is typically done asynchronously) Use sparingly - generally only if you're doing something like writing test code where layout must complete before proceeding.
| static |
Get the Application Container
| static |
Get the Application Container's Document Dock returns an invalid PaletteRef when AppFrame is disabled.
| static |
Get the number of children of the given palette
| static |
How Many Docks are there.
| static |
Where is the dock located
| static |
What is the state of the dock
| static |
Given a PaletteRef for an OWLDocument, retrieve the corresponding IDocumentPresentation interface. Used to bridge between the OWL palette world and InDesign object model notion of a document view.
| static |
Get the preferred origin of a floating dock
| static |
How many are there.
| static |
Find the one containing a particular document
| static |
How many are there.
| static |
Return the closed state of the palette.
| static |
Get the nth child of the given palette
| static |
Get a particular dock Note that you can now ask for the RHS dock, instead of iterating over the docks and checking their DockLocation
| static |
Get a particular one
| static |
Get a particular one
| static |
A convenient shortcut - equivalent to GetNthChildOfPalette(GetRootPaletteNode(),...)
| static |
Get the optical bounds of the given palette in global coordinates. The optical bounds should return the bounding box of what the user actually perceives as being the palette, without any drop shadow, extra drop zone, etc.
| static |
Get the bounds of the given palette in global coordinates
| static |
Get/Set a label associated with a tabbed palette. Valid only for tabbed palettes. NOTE: OWL2 performs palette layout asynchronously, and only for visible palettes, calling GetPaletteLabel on a palette that has never been visible may return empty label strings.
| static |
Get the location (top/left global coordinate) of the given palette Note: whichPalette
| static |
Given a IDocumentPresentation interface, retrieve the corresponding PaletteRef for an OWLDocument. Used to bridge between the OWL palette world and InDesign object model notion of a document view.
| static |
Given a bare OWL control - wrap it up in a PaletteRef
| static |
Get the reference to the parent of the given palette
| static |
Get the root palete node
| static |
What is the layout mode of the tabpane (manual or autoflow)
| static |
What is the state of the tabpane
| static |
Get the preferred width of a tabpane when in icon mode.
| static |
Which size variant is the toolbar currently displaying
| static |
A convenient shortcut - equivalent to GetChildCountOfPalette(GetRootPaletteNode())
| static |
Return true if this view's visible flag is set. (Latent visibility)
| static |
Utility routine that causes the entire palette system to invalidate and redraw.
| static |
Is this an application container (only one in CS4, could be more later on).
| static |
Is this a control bar.
| static |
Is this a ControlBar pane. NOTE: ControlBarPanes are only supported in InCopy
| static |
Is this a dock.
| static |
Is this a dock that can contain documents. (a sub category of docks)
| static |
Is this a document (document presentation).
| static |
Discover if the entire palette system has been hidden.
| static |
Is this a floating dock that can contain documents. (a sub category of docks)
| static |
Is this a floating dock that can contain tabbed palettes and toolbars. (a sub category of docks)
| static |
Is this at the top level (child of the root node). OBSOLETE: Removed for CS4, since it's meaning was unclear. See IsPaletteFloating, IsFloatingTabbedPaletteDock, IsFloatingDocumentDock instead.Is this palette floating (not docked).
| static |
Returns true if the palette is minimized. only valid to call on tab panel containers.
| static |
Return true if this view is visible. A view is visible if its visible flag is set and all of its ancestors are visible. (Effective visibility)
| static |
Is this the Root node of the Palette hierarchy.
| static |
Is this a tab group cluster. OBSOLETE Is this a dock that can contain tabbed palettes and toolbars. (a sub category of docks)
| static |
Is this a tab group.
| static |
Is this a tab pane.
| static |
Is this a tabbed palette (panel container).
| static |
Is this a tool bar.
| static |
Create a new (floating) ControlBar. To dock it afterwards call ReparentPalette
| static |
InCopy Only: Create a new ControlBarPane in the specified dock, before a particular sibling (pass PaletteRef() to add to end of dock)
| static |
Create a new FloatingTabGroupContainer (a pane in a floatig dock)
| static |
Create a new TabGroup in the speficied parent
| static |
Create a new TabPane in the specified dock, before a particular sibling (pass PaletteRef() to add to end of dock)
| static |
Create a new (floating) Toolbar. To dock it afterwards call ReparentPalette
| static |
INTERNAL USE ONLY: Called to send notification to panels that on if it's containers is being closed. Client code should not need to call these methods .
| static |
INTERNAL USE ONLY: Called to send notification to panels that they're being closed. Client code should not need to call these methods.
| static |
Open or close tab panes (reveal or conceal panel content).
| whichOnes | IN which tab panes to open |
| open | IN true to open the tab panes, false to close them |
| static |
Move a specific palette on the main screen at distance from left edge of screen.
| whichPalette | IN palette to be moved |
| distanceFromLeftOnScreenInPercentage | IN distance from left edge of screen in percentage where the palette has to be placed (centered) |
| static |
Palette reparenting An invalid parent/child combination will trigger an assert in the debug build.
| whichPalette | IN the palette to be reparented. |
| newParent | IN the new parent. |
| beforeSibling | IN insert before an existing sibling (pass PaletteRef() to add to the end of the parents list). |
| static |
INTERNAL USE ONLY: Set the Application Container
| static |
Change the state of the dock
| static |
Set the preferred origin of a floating dock
| static |
Set the bounds of the document. Window will be slightly larger to accomodate window trim
| static |
Set the bounds of the window containing this document
| static |
Set the location (top/left global coordinate) of the given palette Note: whichPalette
| static |
Request a new size for the given palette. Due to layout constraints, the requested size may not be possible.
| whichPalette | the tab panel container object you want to resize |
| newDimensions | the desired new size for the TabPanelContainer |
| static |
Change the layout mode of the tabpane
| static |
Change the state of the tabpane
| static |
Change the preferred width of the tabpane when in icon mode
| static |
Change the size variant that the toolbar will display
| static |
Change the size variant that the toolbar will display
| static |
Show or hide the entire palette system. Use sparingly - generally only if you're doing something like rearranging all the palettes for some reason
| static |
Show or hide a specific PaletteRef. Each PaletteRef in the hierarchy has a visible flag. Calling hide on a PaletteRef sets the visible flag for that PaletteRef to false. Parent PaletteRefs will not be shown on screen if they contain no visible child PaletteRefs. Calling Show on a child PaletteRef will show all its parent PaletteRefs so it will actually appear on screen
| static |
Show or hide the palettes, used when the user hits the tab key or shift+tab key.
| paletteShowHideLevel | IN if kShowHideFloatingTabPalettes, then only floating tabbed palettes will be hidden. Floating non-tabbed palettes(i.e. toolbox) will not be hidden, nor will toolbars be hidden. |