![]() | InDesign SDK 20.5 |
#include <IControlView.h>

Public Types | |
| enum | { kDefaultIID = IID_ICONTROLVIEW } |
Public Member Functions | |
Initialization | |
| virtual void | Init (const WidgetID &widgetId=kDefaultWidgetId, const PMRect &fFrame=kZeroRect, RsrcID rsrcID=0)=0 |
| virtual void | DoPostCreate ()=0 |
Attributes | |
| virtual RsrcID | GetRsrcID () const =0 |
| virtual void | SetRsrcID (const RsrcID &id)=0 |
| virtual PluginID | GetRsrcPluginID () const =0 |
| virtual void | SetRsrcPluginID (const PluginID &id)=0 |
| virtual WidgetID | GetWidgetID () const =0 |
| virtual void | SetWidgetID (const WidgetID &id)=0 |
| virtual void | SetClipToSelfEnabled (bool16 clipChildren) const =0 |
Geometry | |
| virtual void | SetFrame (const PMRect &newFrame, bool16 invalidate=kTrue)=0 |
| virtual const PMRect & | GetFrame () const =0 |
| virtual const PMRect | GetLocalFrame () const =0 |
| virtual void | Resize (const PMPoint &newDimensions, bool16 invalidate=kTrue)=0 |
| virtual void | MoveTo (const PMPoint &where, bool16 invalidate=kTrue)=0 |
| virtual void | SetFrameBinding (const FrameBinding &binding)=0 |
| virtual FrameBinding | GetFrameBinding () const =0 |
| virtual void | AdaptToParentsSize (const PMPoint &dimensions)=0 |
| virtual void | AdaptToChildsGeometry (const PMPoint &delta, const FrameBinding &childsBinding, bool16 invalidate=kFalse)=0 |
| virtual PMPoint | ConstrainDimensions (const PMPoint &dimensions) const =0 |
| virtual SysRgn | GetDrawRegion ()=0 |
| virtual bool16 | DrawRegionEncompassesChildRegions () const =0 |
| virtual SysRect | GetBBox () const =0 |
| virtual PMMatrix * | GetContentToWindowTransform () const =0 |
| virtual void | ContentToWindowTransform (PMPoint *point) const =0 |
| virtual void | ContentToWindowTransform (PMRect *rect) const =0 |
| virtual void | ContentToWindowTransform (PMPolygon4 *poly) const =0 |
| virtual void | WindowToContentTransform (PMPoint *point) const =0 |
| virtual void | WindowToContentTransform (PMRect *rect) const =0 |
| virtual void | WindowToContentTransform (PMPolygon4 *poly) const =0 |
| virtual PMMatrix | GetContentToWindowMatrix () const =0 |
| virtual PMMatrix | GetWindowToContentMatrix () const =0 |
| virtual PMRect | GetContentBounds_ () const =0 |
| virtual void | InvalidateTransform ()=0 |
| virtual void | DeleteDrawRegion ()=0 |
| virtual int32 | HitTest (const SysPoint &where)=0 |
| virtual PMRect | GlobalToView (const PMRect &convertRect) const =0 |
| virtual PMPoint | GlobalToView (const PMPoint &convertPoint) const =0 |
| virtual PMRect | GlobalToWindow (const PMRect &convertRect) const =0 |
| virtual PMPoint | GlobalToWindow (const PMPoint &convertPoint) const =0 |
| virtual PMRect | ViewToGlobal (const PMRect &convertRect) const =0 |
| virtual PMPoint | ViewToGlobal (const PMPoint &convertPoint) const =0 |
| virtual PMRect | WindowToGlobal (const PMRect &convertRect) const =0 |
| virtual PMPoint | WindowToGlobal (const PMPoint &convertPoint) const =0 |
Rendering | |
| virtual void | Draw (IViewPort *viewPort, SysRgn updateRgn=nil)=0 |
| virtual void | Invalidate (PMRect *invalidRect=nil)=0 |
| virtual void | Validate (PMRect *invalidRect=nil)=0 |
| virtual void | ForceRedraw (SysRgn invalidRgn=nil, bool16 forceRedraw=kTrue)=0 |
| virtual void | Hilite (bool16 doHilite=kTrue)=0 |
| virtual void | Unhilite ()=0 |
| virtual bool16 | IsHilited () const =0 |
| virtual bool16 | IsRolledOver () const =0 |
Window attributes | |
| virtual void | WindowActivated ()=0 |
| virtual void | WindowDeactivated ()=0 |
| virtual void | WindowShown ()=0 |
| virtual void | WindowHidden ()=0 |
| virtual void | WindowChanged ()=0 |
| virtual void | WindowClosed ()=0 |
Notification | |
| virtual void | ParentPurged ()=0 |
Auto attaching-detaching | |
| virtual void | DoAutoAttach ()=0 |
| virtual void | DoAutoDetach ()=0 |
| virtual void | SetRsrcID (const RsrcID &id, const bool isDarkIcon)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Show-Enable attributes | |
| void | ShowView (bool16 doShow=kTrue) |
| void | HideView () |
| virtual bool16 | GetVisibleState () const =0 |
| virtual bool16 | IsVisible (bool16 requireVisibleWindow=kFalse) const =0 |
| virtual void | ParentsVisibleStateChanged (bool16 visible)=0 |
| virtual void | Enable (bool16 doEnable=kTrue, bool16 invalidate=kTrue)=0 |
| virtual void | Disable (bool16 invalidate=kTrue)=0 |
| virtual bool16 | GetEnableState () const =0 |
| virtual bool16 | IsEnabled () const =0 |
| virtual void | ParentsEnableStateChanged (bool16 visible, bool16 invalidate=kTrue)=0 |
Interface responsible for determining the visual appearance of widgets. Handles drawing in various states. Also involved in hit testing and Auto attaching/detaching observers.
| pure virtual |
The widget should adapt it geometry based on one of its children geometry changing. Only called when child changes and if propagate is set.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
The widget should adapt its geometry based on the parent's geometry. Called on changes in parent's size.
Implemented in AbstractControlView, and DVHostedWidgetView.
Before resizing a widget, the client can ask if the size makes sense by calling this method. Return size constraints.
Implemented in AbstractControlView, CelPnlPanelView, DCLSizPalettePanelView, CusCondTxtPanelView, and SnipRunControlView.
| pure virtual |
Deletes cached DrawRegion, causing it to be recalculated next time they're asked for.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Call to automatically attach observers. Shouldn't generally be called. Called on making view visible.
Implemented in AbstractControlView.
| pure virtual |
Call to automatically detach observers. Shouldn't generally be called. Called on making view invisible.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Called after the widget hierarchy is created. Can be overriden to do initialization that may need the hierarchy to perform.
Implemented in AGMDrawnPanelView, DVGIFPlayerView, AbstractControlView, CelPnlPanelView, DVBasePanelView, DVHostedWidgetView, and DVPanelView.
| pure virtual |
Should be overridden to render the contents of the view.
Implemented in AbstractControlView, DVHostedWidgetView, CusDtLnkUICustomView, PnlTrvCustomView, TableCellView, AGMDrawnPanelView, DVAbstractControlView, DVDropDownElementView, and HiDPIWidgetControlView.
| pure virtual |
Returns kTrue if all potential children of this view should be contained within this views DrawRegion Returns kFalse if this is not the case.
By default, the draw region for a widget is an intersection of it's bounding box and it's parent's draw region, since typically, the parent widget clips the child widgets drawing. In some cases, a widget may not want to restrict it's children's drawing to it's bounds. For these cases, DrawRegionEncompassesChildRegions() should return kFalse.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Redraws the invalid region directly. If 'forceRedraw' is true the redraw will happen immediately otherwise it just invals the region.
| invalidRgn | region of the window to draw. This region will NOT be disposed by ForceRedraw. If nil, then entire view (default) |
| forceRedraw | kTrue if you'd like to draw now (default), kFalse to just inval. |
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Return the bounding box, in window coordinates, of the view. Its preferable to use GetFrame.
Note: Listbox controls(kStdListBoxWidgetNewBoss) on the Windows platform behave differently. They will always return a bounding box in their own coordinates instead of the window coordinates. They will always return a bounding box with an origin of 0,0. Also, all children of listbox controls will return a bounding box relative to the listbox instead of the window.
Implemented in AbstractControlView.
| pure virtual |
Returns a transform for mapping geometry in content coordinate space to window cooridinate space.
Note: Listbox controls(kStdListBoxWidgetNewBoss) on the Windows platform behave differently. They do not include the transform from listbox to window All children of listbox controls will get a content to listbox transform.
Implemented in AbstractControlView.
| pure virtual |
Return a region that represents the area that the view draws in. The graphics context clips drawing to this region. The returned region is in window coordinates.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Return true if this view's enabled flag is set.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Get the frame of the widget within the parent's co-ordinate system.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Get the frame binding. Each side of a widget's frame can be bound to the same side of its parent frame.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Get the frame of the widget within the widget's inner co-ordinate system.
Implemented in DVHostedWidgetView.
| pure virtual |
Get the resource ID for the widget.
Implemented in AbstractControlView.
| pure virtual |
Get the resources plugin id for the widget.
Implemented in AbstractControlView.
| pure virtual |
Return true if this view's visible flag is set.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Get the widget ID. The widget ID is used to uniquely identify a particular child widget within a panel.
Implemented in AbstractControlView.
Converts the specified rectangle/point from global (screen) coordinates to local coordinates.
Implemented in DVHostedWidgetView.
| pure virtual |
Set hiliting on or off.
| doHilite | can be set to kFalse to turn hilite off. |
Implemented in AbstractControlView, DVHostedWidgetView, and DVBasePanelView.
| pure virtual |
Returns true if the point 'where' is within the bounds of the view. Note this method really returns a boolean. Not sure why the return type is an int32.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Initialize the control view.
| widgetId | specifies WidgetID to associate with this widget |
| fFrame | bounding box for the control |
| rsrcID | identifies resource to associate with this widget |
Implemented in DVHostedWidgetView, CusDtLnkUICustomView, PnlTrvCustomView, and AbstractControlView.
| pure virtual |
Invalidate a portion of the control view.
| invalidRect | should be in content coordinates(i.e. GetFrame()). nil invalidates the whole control view. |
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Invalidates transforms, causing them to be recalculated next time they're asked for.
Implemented in AbstractControlView, and DVBasePanelView.
| pure virtual |
Return true if this view is enabled. A view is enabled if its enable flag is set and all of its ancestors are enabled.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Inspect the current hilite state.
| return | the current hilite state |
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Returns true if mouse is in a rollover state, requires rolloverboss
| return | the current hilite state |
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Return true if this view is visible. A view is visible if its visible flag is set and all of its ancestors are visible.
| requireVisibleWindow | specifies what to do if this widget and all it's parent widgets are visible, but it's not in a visible window. |
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Move the widget to a specific position within the parent's coordinate system.
| where | new top-left location for widget frame in parent's co-ordinate system |
| invalidate | if set to kTrue, indicates that the widget should be marked for redraw |
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Called when this widget's parent will be purged in the near future.
Implemented in AbstractControlView, and DVBasePanelView.
| pure virtual |
Called whenever the widget's parent's enable state changes.
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Resize the widget.
Implemented in AbstractControlView, CelPnlPanelView, DVHostedWidgetView, and SnipRunControlView.
| pure virtual |
This flag will instruct view to clip it's children drawing within it's view
Implemented in DVHostedWidgetView.
| pure virtual |
Set a frame for the widget within the parent's co-ordinate system.
| newFrame | specifies frame for the widget |
| invalidate | if set to kTrue, indicates that the widget should be marked for redraw |
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Set the frame binding. Each side of a widget's frame can be bound to the same side of its parent frame. Whenever the parent widget is moved/resized, child widgets which have binding other than kBindNone will adapt to their parent's new size/position.
Binding choices are kBindNone, kBindLeft, kBindTop, kBindRight, kBindBottom, kBindAll. Bindings can be logically composed using the '|' operator.
| binding | specifies the new binding |
Implemented in AbstractControlView, and DVHostedWidgetView.
| pure virtual |
Set the resource ID for the widget.
| id | resource ID to associate with this widget |
Implemented in AbstractControlView.
| pure virtual |
This function should be used only for Icon Widgets. Sets the resource ID for the widget and the theme to use for the icon.
| id | resource ID to associate with this widget. |
| isDarkIcon | whether the icon should be dark or bright. |
Implemented in AbstractControlView.
| pure virtual |
Set the resources plugin id for the widget.
Implemented in AbstractControlView.
| pure virtual |
Set the widget ID.
Implemented in AbstractControlView.
| pure virtual |
Set hiliting off.
Implemented in AbstractControlView, DVHostedWidgetView, and DVBasePanelView.
| pure virtual |
Validate a portion of the control view.
| invalidRect | should be in window coordinates(i.e. GetBBox()). nil validates the whole control view. |
Implemented in AbstractControlView, and DVHostedWidgetView.
Converts the specified rectangle from local coordinates to global (screen) coordinates.
Implemented in DVHostedWidgetView.
| pure virtual |
Called when a window containing this widget is made active or inactive. Do things like dim selections, hide scroll bars, etc.
Implemented in AbstractControlView, and DVBasePanelView.
| pure virtual |
Called when window containing this widget changes. i.e. This widget is moved from one window to another.
Implemented in AbstractControlView, and DVBasePanelView.
| pure virtual |
Called when window containing this widget closes.
Implemented in AbstractControlView, and DVBasePanelView.
| pure virtual |
Called when a window containing this widget is made active or inactive. Do things like dim selections, hide scroll bars, etc.
Implemented in AbstractControlView, and DVBasePanelView.
| pure virtual |
Called when a window containing this widget is hidden.
Implemented in AbstractControlView, and DVBasePanelView.
| pure virtual |
Called when a window containing this widget is shown.
Implemented in AbstractControlView, and DVBasePanelView.