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

#include <IWidgetCreator.h>

Inheritance diagram for IWidgetCreator:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IWIDGETCREATOR }
 

Public Member Functions

virtual IControlViewCreateChildOf (IControlView *pParent)=0
 
virtual IControlViewQueryWidget (IControlView *pParent=0)=0
 
virtual ClassID GetWidgetClassID () const =0
 
virtual WidgetID GetWidgetID () const =0
 
IControlViewQueryChildOf (IControlView *pParent)
 
virtual void RecalcWidget ()=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

IWidgetCreator is an interface that was introduced in 1996 for integrating TextFrameWidgets into LayoutWidgets. For more details see build notes from 6/6/1996 and 6/12/1996:

Integration of TextFrameWidgets into LayoutWidgets

1) The LayoutWidget is now derived from PanelView and PanelEH to be able to contain children. The TextFrameWidget (TextEditor) is hooked to the LayoutControlView as a child.

2) To solve the synchronization problems with different transforms (i.e. when the user scrolls) the TextFrameWidget uses now Panoramas.

3) IWidgetCreator There is a new interface IWidgetCreator which has to be added to PageItem bosses (like FramePageItem) to support the creation of widgets for paritular pageitems. For example the FrameWidgetCreator creates TextFrameWidgets (= TextEditors as widgets).

4) TextSelectTracker creates TextFrameWidgets The TextSelectTracker has been modified to be able to create a TextFrameWidget. In the EndTracking() it asks the pageitem (TextFrame) for an IWidgetCreator. The WidgetCreator will only create a new TextFrameWidget if it does not found another at the child level of the parent widget (here: LayoutControlView). This ensures that the TextFrameWidgets are shared at each LayoutCV.

5) Creation of TextFrameWidgets as an option Now the creation of the new TextEditor as a widget is available as an option. If you want to create a widget you have to out comment or remove the IID_ITEXTEDITOR from the LayoutWidget in Layout.r (LayoutWidget). There is also a debugging mode that you can activate/deactivate with MacControlKey + OptionKey + CmdKey + Click. In the debugging mode the Draw() method of the widget is enabled so you can see the widget.

Member Function Documentation

virtual IControlView* IWidgetCreator::CreateChildOf (IControlViewpParent)
pure virtual

Creates a widget and adds it to the parent.

Parameters
pParentIN. IControlView parent.
Returns
new IControlView child of pParent. Returned IControlView is addref'ed.
virtual ClassID IWidgetCreator::GetWidgetClassID () const
pure virtual

Returns the class id of the widget.

Returns
the class id of the widget.
virtual WidgetID IWidgetCreator::GetWidgetID () const
pure virtual

Returns the widget id of the widget.

Returns
the widget id of the widget.
IControlView * IWidgetCreator::QueryChildOf (IControlViewpParent)
inline

Returns QueryWidget() or creates a new via CreateChildOf().

Returns
QueryWidget() or creates a new via CreateChildOf(). Returned IControlView is addref'ed.
virtual IControlView* IWidgetCreator::QueryWidget (IControlViewpParent = 0)
pure virtual

Scans pParent for widgets that could be created by us.

Parameters
pParentIN. IControlView parent. If pParent is nil, QueryWidget takes the LayoutControlView.
Returns
found IControlView widget of pParent. Returned IControlView is addref'ed.
virtual void IWidgetCreator::RecalcWidget ()
pure virtual

Sends a message to the Widget's PageContextObserver for recalculating the bbox.