InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DVHostedWidgetView Class Reference

#include <DVHostedWidgetView.h>

Inheritance diagram for DVHostedWidgetView:
AbstractControlViewIControlViewIPMUnknownDVAbstractControlViewDVBasePanelViewDVControlViewDVDropDownElementViewAGMDrawnPanelViewDVPanelViewCusDtLnkUICustomViewDVGIFPlayerViewHiDPIWidgetControlViewPnlTrvCustomViewTableCellViewDVErasablePanelViewDVPanelViewCustomColorCIDErasablePanelViewDVPalettePanelViewDCLSizPalettePanelViewSnipRunControlViewPalettePanelViewCelPnlPanelViewCusCondTxtPanelView

Classes

class  AcquireGeometry
 

Public Member Functions

 DVHostedWidgetView (IPMUnknown *boss)
 
virtual void DoPostCreate ()
 
virtual void ReadWrite (IPMStream *s, ImplementationID prop)
 
virtual void SetFrame (const PMRect &newFrame, bool16 invalidate=kTrue)
 
virtual const PMRectGetFrame () const
 
virtual const PMRect GetLocalFrame () const
 
virtual PMRect GetInnerContentFrame () const
 
virtual void Resize (const PMPoint &newDimensions, bool16 invalidate=kTrue)
 
virtual void MoveTo (const PMPoint &where, bool16 invalidate=kTrue)
 
virtual void SetFrameBinding (const FrameBinding &binding)
 
virtual FrameBinding GetFrameBinding () const
 
virtual void AdaptToParentsSize (const PMPoint &dimensions)
 
virtual void AdaptToChildsGeometry (const PMPoint &delta, const FrameBinding &childsBinding, bool16 invalidate=kFalse)
 
virtual SysRgn GetDrawRegion ()
 
virtual bool16 DrawRegionEncompassesChildRegions () const
 
virtual void DeleteDrawRegion ()
 
virtual int32 HitTest (const SysPoint &where)
 
virtual void Draw (IViewPort *viewPort, SysRgn updateRgn)
 
virtual void DV_Draw (dvaui::drawbot::Drawbot *drawbotP) const
 
virtual void ForceRedraw (SysRgn invalidRgn, bool16 forceRedraw)
 
virtual void Invalidate (PMRect *bbox=nil)
 
virtual void Validate (PMRect *bbox=nil)
 
virtual void Hilite (bool16 doHilite=kTrue)
 
virtual void Unhilite ()
 
virtual bool16 IsHilited () const
 
virtual bool16 IsRolledOver () const
 
virtual void Show (bool16 doShow)
 
virtual void Hide ()
 
virtual bool16 GetVisibleState () const
 
virtual bool16 IsVisible (bool16 requireVisibleWindow=kFalse) const
 
virtual void Enable (bool16 doEnable, bool16 invalidate)
 
virtual void Disable (bool16 invalidate)
 
virtual bool16 GetEnableState () const
 
virtual bool16 IsEnabled () const
 
virtual void ParentsEnableStateChanged (bool16 enable, bool16 invalidate)
 
virtual void Init (const WidgetID &widgetId=kDefaultWidgetId, const PMRect &bbox=kZeroRect, RsrcID rsrcID=0)
 
virtual void DoAutoDetach ()
 
virtual PMRect GlobalToView (const PMRect &convertRect) const
 
virtual PMPoint GlobalToView (const PMPoint &convertPoint) const
 
virtual PMRect GlobalToWindow (const PMRect &convertRect) const
 
virtual PMPoint GlobalToWindow (const PMPoint &convertPoint) const
 
virtual PMRect ViewToGlobal (const PMRect &convertRect) const
 
virtual PMPoint ViewToGlobal (const PMPoint &convertPoint) const
 
virtual PMRect WindowToGlobal (const PMRect &convertRect) const
 
virtual PMPoint WindowToGlobal (const PMPoint &convertPoint) const
 
virtual void SetClipToSelfEnabled (bool16 clipChildren) const
 
bool16 IsWidgetConstructionFinished () const
 
void WidgetConstructionFinished (const bool16 bFlag)
 
void MarkDisabledByNonSuppressedUIIfRequired (const bool16 bFlag)
 
void MarkHiddenByNonSuppressedUIIfRequired (const bool16 bFlag)
 
bool16 IsDisabledBySuppressedUI () const
 
void DisableBySuppressedUI (const bool16 bFlag)
 
bool16 IsHiddenBySuppressedUI () const
 
void HideBySuppressedUI (const bool16 bFlag)
 
- Public Member Functions inherited from AbstractControlView
 AbstractControlView (IPMUnknown *boss)
 
virtual RsrcID GetRsrcID () const
 
virtual void SetRsrcID (const RsrcID &id)
 
virtual PluginID GetRsrcPluginID () const
 
virtual void SetRsrcPluginID (const PluginID &id)
 
virtual WidgetID GetWidgetID () const
 
virtual void SetWidgetID (const WidgetID &id)
 
virtual PMPoint ConstrainDimensions (const PMPoint &dimensions) const
 
virtual SysRect GetBBox () const
 
virtual PMMatrixGetContentToWindowTransform () const
 
virtual void ContentToWindowTransform (PMPoint *point) const
 
virtual void ContentToWindowTransform (PMRect *rect) const
 
virtual void ContentToWindowTransform (PMPolygon4 *poly) const
 
virtual void WindowToContentTransform (PMPoint *point) const
 
virtual void WindowToContentTransform (PMRect *rect) const
 
virtual void WindowToContentTransform (PMPolygon4 *poly) const
 
virtual PMMatrix GetContentToWindowMatrix () const
 
virtual PMMatrix GetWindowToContentMatrix () const
 
virtual PMRect GetContentBounds_ () const
 
virtual void InvalidateTransform ()
 
virtual void ParentsVisibleStateChanged (bool16 visible)
 
virtual void WindowActivated ()
 
virtual void WindowDeactivated ()
 
virtual void WindowShown ()
 
virtual void WindowHidden ()
 
virtual void WindowChanged ()
 
virtual void WindowClosed ()
 
virtual void ParentPurged ()
 
virtual void DoAutoAttach ()
 
- Public Member Functions inherited from IControlView
void ShowView (bool16 doShow=kTrue)
 
void HideView ()
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Protected Member Functions

virtual void SetVisibleState (bool16 isVisible=kTrue)
 
virtual void SetEnableState (bool16 isVisible=kTrue)
 
virtual bool16 AncestorsAreVisible (bool16 requireVisibleWindow) const
 
virtual PMMatrixGetUpdatedContentToWindowTransform ()
 
virtual void CreateDrawRegion (SysRgn &drawRgn)
 
virtual bool16 IsAutoAttached () const
 
virtual void SetIsAutoAttached (bool16 flag=kTrue)
 
void Set_UI_Node (dvaui::ui::UI_Node *node)
 
dvaui::ui::UI_Node * Get_UI_Node () const
 
void Release_UI_Node ()
 
virtual void BoundsChangedCallback ()
 
virtual void ParentEnableStateChangedCallback ()
 
virtual void ResizeChildren (const PMPoint &delta, bool16 invalidate)
 
virtual void AdaptLayoutToFrameBindings (const PMPoint &delta, bool16 invalidate=kTrue)
 
virtual void DoAfterKeyfocusChangedCallback ()
 
- Protected Member Functions inherited from AbstractControlView
virtual bool16 AncestorsAreEnabled () const
 
IPMUnknownQueryParentFor (const PMIID &interfaceID) const
 
void NotifyParent (const WidgetAttributeID &id)
 
virtual PMMatrixCreateTransform ()
 
void DestroyContentTransform ()
 
virtual void DestroyWrappedSystemControls ()
 
virtual void HandleAutoAttach ()
 
virtual void HandleAutoDetach ()
 
virtual void SetRsrcID (const RsrcID &id, const bool isDarkIcon)
 

Protected Attributes

unsigned int fGeometryBusy: 1
 
- Protected Attributes inherited from AbstractControlView
WidgetID fWidgetId
 
PMRsrcID fRsrcId
 
FrameBinding fFrameBinding
 
PMRect fFrame
 
PMMatrixfContentTransform
 

Additional Inherited Members

- Public Types inherited from IControlView
enum  { kDefaultIID = IID_ICONTROLVIEW }
 

Detailed Description

IControlView baseclass used for widgets in the Drover world.

Member Function Documentation

virtual void DVHostedWidgetView::AdaptToChildsGeometry (const PMPointdelta,
const FrameBinding & childsBinding,
bool16 invalidate = kFalse 
)
virtual

Resizes based on the current binding setting of child. Subclasses rarely override this method

Implements AbstractControlView.

virtual void DVHostedWidgetView::AdaptToParentsSize (const PMPointdimensions)
virtual

Resizes based on the current binding setting. Subclasses rarely override this method

Implements AbstractControlView.

virtual bool16 DVHostedWidgetView::AncestorsAreVisible (bool16 requireVisibleWindow) const
protectedvirtual

Checks if all parents of this widget are visible. Optionally check the window as well

Implements AbstractControlView.

virtual void DVHostedWidgetView::CreateDrawRegion (SysRgn & drawRgn)
protectedvirtual
Return a region that defines the drawing area of the control.  Default implementation creates a region from the control bbox.

Overriding this allows you to create a different draw region. Some controls do this to draw a drop shadow outside the bounds of the control. Your draw region should not extend beyond your parent's draw region, so your draw region should usually be an intersection of your adjusted bbox and your parent's draw region.

Implements AbstractControlView.

virtual void DVHostedWidgetView::DeleteDrawRegion ()
virtual

Default implementation throws away cached Draw Region. Next call to GetDrawRegion will recalculate it. Subclasses rarely override this method

Implements AbstractControlView.

virtual void DVHostedWidgetView::Disable (bool16 invalidate)
virtual

Sets enable flag. Optionally causes inval.

Implements AbstractControlView.

Reimplemented in DVDropDownElementView.

virtual void DVHostedWidgetView::DoAfterKeyfocusChangedCallback ()
inlineprotectedvirtual

INTERNAL USE ONLY: give subclasses a chance to do something after our low-level KeyfocusChangeCallback is called. In CC so far there is only one client, so it may go away.

virtual void DVHostedWidgetView::DoAutoDetach ()
virtual

Calls the AutoDetach method of the observer on the same boss with IID_IOBSERVER, plus detaches additional observers using the IControlViewObservers interface

Reimplemented from AbstractControlView.

virtual void DVHostedWidgetView::DoPostCreate ()
virtual

Default implementation resets transform and panorama. Subclasses sometimes override this to do some delayed initialization.

Reimplemented from AbstractControlView.

Reimplemented in AGMDrawnPanelView, DVGIFPlayerView, CelPnlPanelView, DVBasePanelView, and DVPanelView.

virtual void DVHostedWidgetView::Draw (IViewPortviewPort,
SysRgn updateRgn 
)
virtual

Draw the control. Not used for drover-based widgets, see DV_Draw below.

Implements AbstractControlView.

Reimplemented in CusDtLnkUICustomView, PnlTrvCustomView, TableCellView, AGMDrawnPanelView, DVAbstractControlView, DVDropDownElementView, and HiDPIWidgetControlView.

virtual bool16 DVHostedWidgetView::DrawRegionEncompassesChildRegions () const
virtual

As a default, Child regions will be contained within their parent's draw region(returns kTrue), but this can be overridden by some views to indicate that child regions are independant of their parent regions.

Implements AbstractControlView.

virtual void DVHostedWidgetView::DV_Draw (dvaui::drawbot::Drawbot * drawbotP) const
inlinevirtual

Do any extra drawing for the control here. (or in the drover widget itself)

Reimplemented in DVBasePanelView, DVAbstractControlView, DVErasablePanelView, DVPalettePanelView, and DVPanelViewCustomColor.

virtual void DVHostedWidgetView::Enable (bool16 doEnable,
bool16 invalidate 
)
virtual

Sets enable flag. Optionally causes inval.

Implements AbstractControlView.

Reimplemented in DVDropDownElementView.

virtual void DVHostedWidgetView::ForceRedraw (SysRgn invalidRgn,
bool16 forceRedraw 
)
virtual

Force the control to redraw, or just the invalid region passed in.

Implements AbstractControlView.

virtual SysRgn DVHostedWidgetView::GetDrawRegion ()
virtual

Returns stored value, or calls CreateDrawRegion if it doesn't have one. Subclasses rarely override this method

Implements AbstractControlView.

virtual bool16 DVHostedWidgetView::GetEnableState () const
virtual

Returns stored value. Subclasses rarely override this method

Implements AbstractControlView.

virtual const PMRect& DVHostedWidgetView::GetFrame () const
virtual

Returns bounding content frame of the widget relative to the parent's coordinate system.

Implements AbstractControlView.

virtual FrameBinding DVHostedWidgetView::GetFrameBinding () const
virtual

Returns stored value. Subclasses rarely override this method

Reimplemented from AbstractControlView.

virtual PMRect DVHostedWidgetView::GetInnerContentFrame () const
virtual

Returns bounding content frame of the widget in the widgets own inner (local) coordinate system with the top/left corner point at the origin (0,0)

virtual const PMRect DVHostedWidgetView::GetLocalFrame () const
virtual

Returns bounding content frame of the widget in the widgets own inner (local) coordinate system with the top/left corner point at the origin (0,0)

Implements IControlView.

virtual PMMatrix* DVHostedWidgetView::GetUpdatedContentToWindowTransform ()
protectedvirtual

Calculates new transform from current bbox and panorama. Subclasses usually don't need to override this method

Implements AbstractControlView.

virtual bool16 DVHostedWidgetView::GetVisibleState () const
virtual

Returns stored value. Subclasses rarely override this method

Implements AbstractControlView.

virtual PMRect DVHostedWidgetView::GlobalToView (const PMRectconvertRect) const
virtual

Converts the specified rectangle/point from global (screen) coordinates to local coordinates.

Implements IControlView.

virtual void DVHostedWidgetView::Hide ()
virtual

Sets visible flag. Causes inval. Does AutoDetach of observer

Implements AbstractControlView.

Reimplemented in DVBasePanelView.

virtual void DVHostedWidgetView::Hilite (bool16 doHilite = kTrue)
virtual

Sets stored value.

Implements AbstractControlView.

Reimplemented in DVBasePanelView.

virtual int32 DVHostedWidgetView::HitTest (const SysPointwhere)
virtual

Default implementation returns kTrue if the passed in point is within the bbox of the control view. Subclasses who want different hittest behavior must override this method.

Implements AbstractControlView.

virtual void DVHostedWidgetView::Init (const WidgetIDwidgetId = kDefaultWidgetId,
const PMRectbbox = kZeroRect,
RsrcID rsrcID = 0 
)
virtual

Sets the size of the drover widget accordingly

Reimplemented from AbstractControlView.

Reimplemented in CusDtLnkUICustomView, and PnlTrvCustomView.

virtual void DVHostedWidgetView::Invalidate (PMRectbbox = nil)
virtual

Inval the draw region of this control, or just the bbox passed in.

Implements AbstractControlView.

virtual bool16 DVHostedWidgetView::IsAutoAttached () const
protectedvirtual

Check if AutoAttach was called more recently than AutoDetach

Implements AbstractControlView.

bool16 DVHostedWidgetView::IsDisabledBySuppressedUI () const

FOR INTERNAL USE ONLY. Get/Set the flag to disable the widget due to Suppressed UI

virtual bool16 DVHostedWidgetView::IsEnabled () const
virtual

Returns stored value. Subclasses rarely override this method

Implements AbstractControlView.

bool16 DVHostedWidgetView::IsHiddenBySuppressedUI () const

FOR INTERNAL USE ONLY. Get/Set the flag to hide the widget due to Suppressed UI

virtual bool16 DVHostedWidgetView::IsHilited () const
virtual

Returns stored value.

Implements AbstractControlView.

virtual bool16 DVHostedWidgetView::IsRolledOver () const
virtual

Returns stored value.

Implements AbstractControlView.

virtual bool16 DVHostedWidgetView::IsVisible (bool16 requireVisibleWindow = kFalse) const
virtual

Returns stored value. Subclasses rarely override this method

Implements AbstractControlView.

bool16 DVHostedWidgetView::IsWidgetConstructionFinished () const
FOR INTERNAL USE ONLY. Get/Set the flag to check if this Widget's creation process is finished,

i.e. DoPostCreate() (or any other such function to create the widget) has been called.

void DVHostedWidgetView::MarkDisabledByNonSuppressedUIIfRequired (const bool16 bFlag)

FOR INTERNAL USE ONLY. Set/Reset the flag to indicate that widget is disabled by non-suppressed UI. This flag is needed to identify and separate out the Enable() and Disable() calls caused by SuppressedUI.

void DVHostedWidgetView::MarkHiddenByNonSuppressedUIIfRequired (const bool16 bFlag)
FOR INTERNAL USE ONLY. Set/Reset the flag to indicate that widget is hidden

by non-suppressed UI. This flag is needed to identify and separate out the Show() and Hide() calls caused by SuppressedUI.

virtual void DVHostedWidgetView::MoveTo (const PMPointwhere,
bool16 invalidate = kTrue 
)
virtual

Moves the widget. Invals appropriately if requested (default). It is preferable for side effects to occur in the BoundsChangedCallback rather than in a subclass reimplementation of MoveTo Default implementation also handles frame bindings.

Implements AbstractControlView.

virtual void DVHostedWidgetView::ParentsEnableStateChanged (bool16 enable,
bool16 invalidate 
)
virtual

Default implementation just invals(if requested to)

Implements AbstractControlView.

void DVHostedWidgetView::Release_UI_Node ()
protected

Called to release an existing UI_Node. When switching from one node to another, Call Release_UI_Node followed by Set_UI_Node(new_node)

virtual void DVHostedWidgetView::Resize (const PMPointnewDimensions,
bool16 invalidate = kTrue 
)
virtual

Resizes the widget. Invals appropriately if requested (default). It is preferable for side effects to occur in the BoundsChangedCallback rather than in a subclass reimplementation of Resize. Default implementation also handles frame bindings.

Implements AbstractControlView.

Reimplemented in CelPnlPanelView, and SnipRunControlView.

virtual void DVHostedWidgetView::ResizeChildren (const PMPointdelta,
bool16 invalidate 
)
protectedvirtual

give subclass a chance to control resize behavior of its children

virtual void DVHostedWidgetView::SetClipToSelfEnabled (bool16 clipChildren) const
virtual

This flag will instruct view to clip it's children drawing within it's view

Implements IControlView.

virtual void DVHostedWidgetView::SetFrame (const PMRectnewFrame,
bool16 invalidate = kTrue 
)
virtual

Moves and resizes the widget. Invals appropriately if requested (default).

Implements AbstractControlView.

virtual void DVHostedWidgetView::SetFrameBinding (const FrameBinding & binding)
virtual

Frame bindings, layout changes are cpplied in AdaptLayoutToFrameBindings, which is called during Resize/MoveTo.

Reimplemented from AbstractControlView.

virtual void DVHostedWidgetView::SetVisibleState (bool16 isVisible = kTrue)
protectedvirtual

Changes value of state flag, no side effects

Implements AbstractControlView.

virtual void DVHostedWidgetView::Show (bool16 doShow)
virtual

Sets visible flag. Causes inval. Does AutoAttach or AutoDetach of observer

Implements AbstractControlView.

Reimplemented in DVBasePanelView.

virtual void DVHostedWidgetView::Unhilite ()
virtual

Sets stored value.

Implements AbstractControlView.

Reimplemented in DVBasePanelView.

virtual void DVHostedWidgetView::Validate (PMRectbbox = nil)
virtual

Validate the draw region of this control, or just the bbox passed in.

Implements AbstractControlView.

virtual PMRect DVHostedWidgetView::ViewToGlobal (const PMRectconvertRect) const
virtual

Converts the specified rectangle from local coordinates to global (screen) coordinates.

Implements IControlView.