![]() | InDesign SDK 20.5 |

Public Types | |
| enum | { kDefaultIID = IID_IWIDGETUTILS } |
Public Member Functions | |
| virtual SysPoint | ConvertPointToLocalWindow (const PMPoint &mouseLocationInParentWindowCoords, IControlView *destinationView)=0 |
| virtual IPMUnknown * | QueryRelatedWidget (const IPMUnknown *widget, const WidgetID &widgetId, const PMIID &iid)=0 |
| virtual const InterfaceFontInfo | GetAppropriateFontForWidget (const IControlView *widget)=0 |
| virtual const IUIColorSpec * | QueryColorSpecForWidget (const IPMUnknown *widget)=0 |
| virtual void | GrayOutFrameContents (IGraphicsPort *gc, PMRect frame, PMReal transparency)=0 |
| virtual void | DrawPaletteFill (const IControlView *widget, dvaui::drawbot::Drawbot *pDrawbot, const PMRect *rectToFill=nil)=0 |
| virtual void | DrawPaletteFill (const IControlView *widget, IGraphicsPort *port, const PMRect *rectToFill=nil)=0 |
| virtual void | GridPanel_PositionWidgets (IPanelControlData *panel, int32 first, int32 last)=0 |
| virtual void | DeleteWidgetAndChildren (IControlView *widgetToDelete)=0 |
| virtual void | StripUserDecimal (PMString *string)=0 |
| virtual void | FormatUserDecimal (PMString *string)=0 |
| virtual void | StripAccelerators (PMString &rawString)=0 |
| virtual void | GetFormattedString (const PMReal &value, const bool16 &bHorizontal, PMString &outString)=0 |
| virtual void | GetFormattedScalingString (const PMReal &value, PMString &outString, const bool16 bFormatWithParens)=0 |
| virtual PMReal | GetViewYPosition (IGraphicsContext *gc, const InterfaceFontInfo &fontInfo, const PMReal &height)=0 |
| virtual void | SimulateClick (IEventHandler *targetEH)=0 |
| virtual void | CombineRegions (IControlView *widget, SysWireframe &theRgn) const =0 |
| virtual void | DrawFocusRect (IControlView *view, const PMRect &r, bool16 flushDrawing)=0 |
| virtual bool16 | DrawHiliteRect (IControlView *view, const PMRect &r, bool16 flushDrawing=kTrue, PMReal hiliteThickness=kDefaultHiliteThickness)=0 |
| virtual bool16 | DrawHilitePath (IControlView *view, const PMPointList &pts, bool16 flushDrawing=kTrue, PMReal hiliteThickness=kDefaultHiliteThickness)=0 |
| virtual bool16 | DrawHilitePath (IControlView *view, const PMPointListCollection &subPaths, bool16 flushDrawing=kTrue, PMReal hiliteThickness=kDefaultHiliteThickness)=0 |
| virtual bool16 | DrawHilitePath (IControlView *view, SysWireframe hilitePath, bool16 flushDrawing=kTrue, PMReal hiliteThickness=kDefaultHiliteThickness)=0 |
| virtual bool16 | FillHiliteRect (IControlView *view, const PMRect &r, bool16 flushDrawing=kTrue)=0 |
| virtual bool16 | FillHilitePath (IControlView *view, const PMPointListCollection &subPaths, bool16 flushDrawing=kTrue)=0 |
| virtual void | SetTextHighlightColor (IGraphicsPort *gPort, const IControlView *view)=0 |
| virtual bool16 | IsWidgetInPalette (const IControlView *iWidget)=0 |
| virtual bool16 | CopyBitsToView (IControlView *view, const Int32Rect &dstBounds, IDVPlatformOffscreen *srcOffscreen, const Int32Rect &srcBounds, const PMMatrix &clip2destMatrix=PMMatrix(), const SysRgn clipRgn=nil)=0 |
| virtual PMReal | GetViewScaleFactorReal (const IControlView *view)=0 |
| virtual void | DrawRoundedRect (dvaui::drawbot::Drawbot *drawBotP, const RoundedRectAppearance &roundedRectAppearance)=0 |
| virtual void | DrawLeftRoundedRect (dvaui::drawbot::Drawbot *drawBotP, const RoundedRectAppearance &roundedRectAppearance)=0 |
| virtual void | DrawRightRoundedRect (dvaui::drawbot::Drawbot *drawBotP, const RoundedRectAppearance &roundedRectAppearance)=0 |
| virtual bool16 | IsClusterControllableChildWidget (IControlView *widget, bool16 &isSelected, bool16 checkParentToBeCluster=kFalse)=0 |
| virtual IPMUnknown * | QueryDescendentWidgetOfType (IPMUnknown *widget, PMIID interfaceID)=0 |
| virtual IDialog * | CreateContextUI (const RsrcSpec &rSpec, const PMRect &globalAnchorRect, const ClassID &popupWindowClass=kPopupWindowBoss, bool16 preferredtoBeDrawnOnLeft=kFalse, bool16 invokedFromPalette=kFalse, bool16 okToCacheDialog=kFalse, bool16 openImmediately=kTrue)=0 |
| virtual IDialog * | CreateContextUI_Generic (const RsrcSpec &rSpec, const PMRect &globalAnchorRect, const ClassID &popupWindowClass=kPopupWindowBoss, bool16 preferredtoBeDrawnOnLeft=kFalse, bool16 invokedFromPalette=kFalse, bool16 okToCacheDialog=kFalse, bool16 openImmediately=kTrue)=0 |
| virtual void | RepositionAndShowContextUIPopup (IWindow *popupWindow, bool16 showWindow=kTrue, const PMRect &globalAnchorRect=kZeroRect, bool16 inFront=kTrue)=0 |
| virtual RsrcID | GetEffectiveIconRsrcID (float uiSCale, RsrcID baseRsrcID)=0 |
| virtual IDResource | SetIconDimensions (PluginID pluginID, RsrcType rsrcType, RsrcID rscID, RsrcID iconRsrcID, float iconScale, float *loadedIconScale)=0 |
| virtual void | DrawTopRoundedRect (dvaui::drawbot::Drawbot *drawBotP, const RoundedRectAppearance &roundedRectAppearance)=0 |
| virtual DrawStatus | CanDrawSampleText (IPMFont *font, PMString &stringToDraw, float fontSize)=0 |
| virtual DrawStatus | CanTQDrawSampleText (std::string fontName, PMString &stringToDraw, float fontSize)=0 |
| virtual std::string | GetImageName (PluginID pluginID, RsrcType rsrcType, RsrcID iconRsrcID)=0 |
| virtual IDResource | LoadIconResource (PluginID pluginID, RsrcID iconRsrcID, RsrcType &outRsrcType, std::string &outImageName, float iconScale, float &loadedIconScale, bool16 isDark=kFalse)=0 |
| virtual float | GetBoundingBoxScaleFactor ()=0 |
| virtual PMReal | GetEffectiveScaleFactor (const IControlView *view)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
| pure virtual |
Check if the font can draw the sample string passed.
| font | - the IPMfont which is to be used to draw the sample string. |
| stringToDraw | - the string to draw. |
| fontSize | - fontSize to be used to draw the string. returns anyone of the four enums present in DrawStatus. |
| pure virtual |
Check if the font can draw the sample string passed.
| font | - the psFontName string which is to be used to draw the sample string. |
| stringToDraw | - the string to draw. |
| fontSize | - fontSize to be used to draw the string. returns anyone of the four enums present in DrawStatus. |
| pure virtual |
Accumulate a widget rect into a region. Useful for creating drag and drop regions of a group of widgets.
| widget | the widget for which union its bbox into a region |
| theRgn | IN/OUT pass in a region which will be enlarged by the given widget |
| pure virtual |
Convert a point in parent window coordinates to the window coordinates of the destination view.
| mouseLocationInParentWindowCoords | the mouse location in parent window coordinates |
| destinationView | view whose window coordinate system you want to use. |
| pure virtual |
Utility to copy bits from an offscreen to view using direct drawing.
| view | the control view to copy the bits to |
| dstBounds | the area of the view to copy into |
| srcOffscreen | the source offscreen |
| srcBounds | the area of the offscreen to copy |
| clip2destMatrix | clip to destination space matrix |
| clipRgn | clipping to apply |
| pure virtual |
opens up the context UI
| rSpec | The resource spec for the dialog. |
| globalAnchorRect | The rect around which the panel is to be opened in global coordinate space. |
| popupWindowClass | The pop up window class to use. |
| preferredtoBeDrawnOnLeft | Flag to state the preference to be drawn on left. |
| invokedFromPalette | Flag to specify whether the context UI is being invoked from the panel. |
| okToCacheDialog | Flag to specify whether or not to cache the context dialog ui. |
| ensurePositionWrtDocLayout | Flag to specify whether popup window should be within document layout bounds or within screen bounds. |
| openImmediately | Flag to specify whether popup window should be immediately opened. Defaults to True. if False, user must call IDialog::Open on the returned pointer herself. |
| pure virtual |
opens up the context UI with a generic mechanism
| rSpec | The resource spec for the dialog. |
| globalAnchorRect | The rect around which the panel is to be opened in global coordinate space. |
| popupWindowClass | The pop up window class to use. |
| preferredtoBeDrawnOnLeft | Flag to state the preference to be drawn on left. |
| invokedFromPalette | Flag to specify whether the context UI is being invoked from the panel. |
| okToCacheDialog | Flag to specify whether or not to cache the context dialog ui. |
| openImmediately | Flag to specify whether popup window should be immediately opened. Defaults to True. if False, user must call IDialog::Open on the returned pointer herself. |
| pure virtual |
Utility to draw selection/focus rect using direct drawing.
| view | the control view to draw the focus rect for |
| r | rect defined in view's content coordinate space |
| flushDrawing | whether to force flush the drawing |
| pure virtual |
Utility to draw hilite/outline path using direct drawing inset within the view bounds (used for DragDrop Target hiliting and more).
| view | the control view to draw the hilite path for |
| pts | path (having a single subpath) defined in view's content coordinate space |
| flushDrawing | whether to force flush the drawing |
| hiliteThickness | thickness of the outline in user space (points). On the mac non-integer values can produce different results (0.5 produces a smaller line than 1.0) |
| pure virtual |
Utility to draw hilite/outline path using direct drawing inset within the view bounds (used for DragDrop Target hiliting and more).
| view | the control view to draw the hilite path for |
| subPaths | subpaths for the path defined in view's content coordinate space |
| flushDrawing | whether to force flush the drawing |
| hiliteThickness | thickness of the outline in user space (points). On the mac non-integer values can produce different results (0.5 produces a smaller line than 1.0) |
| pure virtual |
Utility to draw selection/focus using direct drawing.
| view | the control view to draw the focus for |
| hilitePath | defined in view's content coordinate space |
| flushDrawing | whether to force flush the drawing |
| pure virtual |
Draw rectangles filled with given color and having left rounded corners
| drawbotP | bot where to draw the rectangle |
| roundedRectAppearance | instance of class RoundedRectAppearance stating appearance of the required rectangle |
| pure virtual |
Fills the draw region of control view (or rect) with the correct palette background (Grey) using the offscreen Drawbot object. Here the Drawbot object being passed as argument has been setup for offscreen, so the rectToFill area (in drawbot) has to be translated in client coordinates.
| widget | : ControlView for drawing, the widget whose bounds you want to fill(if rectToFill is nil) |
| pDrawbot | : Offscreen Drawbot object, background rect will be drawn on its surface |
| rectToFill | : the rect you want to fill, if not the bounds of the widget |
| pure virtual |
Draws the background of control view using the Graphics Port passed as argument
| widget | : ControlView for drawing, widget whose bounds you want to fill(if rectToFill is nil) |
| port | : GraphicsPort which will be used for Making AGM drawing calls, graphics port to draw into |
| rectToFill | : the rect you want to fill, if not the bounds of the widget |
| pure virtual |
Draw rectangles filled with given color and having right rounded corners
| drawbotP | bot where to draw the rectangle |
| roundedRectAppearance | instance of class RoundedRectAppearance stating appearance of the required rectangle |
| pure virtual |
Draw rectangles filled with given color and having rounded corners
| drawbotP | bot where to draw the rectangle |
| roundedRectAppearance | instance of class RoundedRectAppearance stating appearance of the required rectangle |
| pure virtual |
Draw rectangles filled with given color and having top rounded corners
| drawbotP | bot where to draw the rectangle |
| roundedRectAppearance | instance of class RoundedRectAppearance stating appearance of the required rectangle |
| pure virtual |
Utility to draw fill path using direct drawing inset within the view bounds (used for text caret drawing).
| view | the control view to draw the hilite path for |
| subPaths | subpaths for the path defined in view's content coordinate space |
| flushDrawing | whether to force flush the drawing |
| pure virtual |
Utility to fill rect using direct drawing inset within the view bounds (used for block text carets).
| view | the control view to draw the hilite rect for |
| r | rect defined in view's content coordinate space |
| flushDrawing | whether to force flush the drawing |
| pure virtual |
if the PMString appears to start with a number, this will remove the '.' character and replace it with the OS setting for decimal
which is commonly . or , or space.
| string | the string you want to have the '.' character replaced with the user decimal |
| pure virtual |
Given a widget, this method will find the correct fontInfo to use for it. It will query for IUIFontSpec, or go up to the window boss to get the default font for the window.
| widget | the widget you want the appropriate font for |
| pure virtual |
Utility function that reads the preferences and returns the Bounding Box/Adornment/Handles scale factor set by the user. returns the bounding box scale factor.
| pure virtual |
Utility function that returns the current effective scale factor. This function returns the product of OS scale factor and the app scale factor. In case NULL is provided then it returns only the app scale factor in case of MAC.
| view | - the input view for calculating the backing scale factor. returns the effective scale factor. |
| pure virtual |
Convert the value to a PMString representing the scale. e.g. Convert the number 0.85 to "85.0%" or "(85%)"
| value | the number to be converted. |
| outString | the output |
| bFormatWithParens,format | the output with parens if kTrue, without if kFalse |
| pure virtual |
convert the value to PMString based on the current measurement system.
| value | the number to be converted. |
| bHorizontal | the flag indicates if we need to use horizontal or vertical measurement system. |
| string | the output |
| pure virtual |
Returns the image name of the icon as a string by concatenating pluginID, rsrcType and iconRsrcID
| pluginID | The plugin of the resource being considered. |
| rsrcType | The type of the resource , whether it is kPNGArtRsrcType etc. |
| iconRsrcID | The icon resource id for the icon. returns image name for the icon |
| pure virtual |
Get the UI scale factor appropriate for drawing a view (designed to be called at Draw time)
| view | the view. |
| pure virtual |
Use AGM transparency to "gray-out" an area of the UI
| gc | the graphics port |
| frame | the frame you want to gray out |
| transparency | the transparency amount |
| pure virtual |
Checks if the passed widget is controllable by cluster widget
| widget | input child widget view |
| checkParentToBeCluster | - pass kTrue to force this routine to check this child belongs to cluster. |
| pure virtual |
| view | of the control/widget |
| pure virtual |
Given a widget, this method will find the correct IUIColorSpec to use for it. It will query up the hierarchy for a IUIColorSpec. It may return nil, if the widget and it's ancestors do not have a IUIColorSpec interface.
| widget | the widget you want the appropriate colors for |
| pure virtual |
query the descendant widgets for interface id
| widget | input widget view |
| interfaceID | the IID of the descendant widget that you want returned |
| pure virtual |
Given a widget, this method will find a related widget. i.e. child, parent, cousin, etc
| widget | the widget to start with |
| widgetId | the WidgetID of the related widget that you want |
| iid | the IID of the related widget that you want returned - i.e. if you specify IID_ICONTROLVIEW you'll get back and IControlView* |
| pure virtual |
Repositions the context UI popup
| popupWindow | Popup window reference. |
| showWindow | Flag to specify whether to show window after repositioning it. |
| globalAnchorRect | Rect around which popup should be repositioned, in global coordinate space. |
| inFront | Flag to specify whether to bring pop up window in front after repositioning it. |
| pure virtual |
Set the graphics port to the current system highlight color
| gPort | the port to set the highlight color on. |
| view | the view selection will draw in. |
| pure virtual |
Helper function to simulate a mouse click event. Uses the event handler's control view if present to fake location of mouse event.
| targetEH | event handler to use for posting the event |
| pure virtual |
Strips the Ampersands and any other extra characters corresponding to Accelerators, which do not need to be shown.
| rawString | the string in which you want to have the characters corresponding to the accelerators be stripped. |
| pure virtual |
if the PMString appears to start with a number and have a user decimal(as defined by the OS setting) in it it(commonly , or . or space) this will take out that character and replace it with plain old '.'
| string | the string you want to have the user decimal replaced with '.' |