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

Public Member Functions | |
| CWidgetObserver (IPMUnknown *boss) | |
Public Member Functions inherited from CObserver | |
| CObserver (IPMUnknown *boss, PMIID interfaceID=IID_IOBSERVER) | |
| IChangeManager * | GetChangeManager () const |
| virtual void | AutoAttach () |
| virtual void | AutoDetach () |
| virtual void | SetAttachIID (PMIID iid) |
| virtual PMIID | GetAttachIID () const |
| virtual void | SetEnabled (bool16 state) |
| virtual bool16 | IsEnabled () const |
| virtual void | LazyUpdate (ISubject *theSubject, const PMIID &protocol, const LazyNotificationData *data) |
Public Member Functions inherited from IObserver | |
| virtual void | Update (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Protected Member Functions | |
| void | AttachToWidget (const WidgetID &widgetId, const PMIID &interestedIn=IID_IUNKNOWN, const PMIID &asObserver=IID_IOBSERVER, IPMUnknown *widget=nil) |
| void | DetachFromWidget (const WidgetID &widgetId, const PMIID &interestedIn=IID_IUNKNOWN, const PMIID &asObserver=IID_IOBSERVER, IPMUnknown *widget=nil) |
| virtual void | SetTextControlData (const WidgetID &widgetId, const PMString &text, IPMUnknown *widget=nil, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue) |
| virtual PMString | GetTextControlData (const WidgetID &widgetId, IPMUnknown *widget=nil) const |
| virtual void | SetTriStateControlData (const WidgetID &widgetId, const ITriStateControlData::TriState &triState, IPMUnknown *widget, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue) |
| virtual ITriStateControlData::TriState | GetTriStateControlData (const WidgetID &widgetId, IPMUnknown *widget=nil) const |
Additional Inherited Members | |
Public Types inherited from IObserver | |
| enum | { kDefaultIID = IID_IOBSERVER } |
Protected Attributes inherited from CObserver | |
| bool16 | fDetachSubjectsOnDelete |
| PMIID | fAttachIID |
| const UIDRef | fThisRef |
| bool16 | fEnabled |
This class provides a few handy routines useful to observers that deal with certian kinds of widgets.
| CWidgetObserver::CWidgetObserver | ( | IPMUnknown * | boss | ) |
constructor
| protected |
Attach Helper Method. Simplifies attaching to another widget in the same window.
| widgetId | The widget to attach to |
| interestedIn | which IID to attach to |
| asObserver | the IID of this observer. Usually this is IID_IOBSERVER, but when there are 2 or more observers on a widget, only one gets to use IID_IOBSERVER |
| widget | a widget in the same widget hierarchy as the widget to attach to. If you pass nil, it is assumed that 'this' points to a widget in the same hierarchy as the widget to attach to. |
| protected |
Detach Helper Method. Simplifies detaching from another widget in the same window.
| widgetId | The widget to detach from |
| interestedIn | which IID to detach from |
| asObserver | the IID of this observer. Usually this is IID_IOBSERVER, but when there are 2 or more observers on a widget, only one gets to use IID_IOBSERVER |
| widget | a widget in the same widget hierarchy as the widget to detach from. If you pass nil, it is assumed that 'this' points to a widget in the same hierarchy as the widget to detach from. |
| protectedvirtual |
Helper method to get the string from the ITextControlData of some widget
| widgetId | the widget whose data you want to get. |
| widget | a widget in the same hierarchy as the widget to get the data for. If you pass nil, 'this' is assumed to be a widget in the same hierarchy. |
| protectedvirtual |
Helper method to get the state from the ITriStateControlData of some widget
| widgetId | the widget whose data you want to get. |
| widget | a widget in the same hierarchy as the widget to get the data for. If you pass nil, 'this' is assumed to be a widget in the same hierarchy. |
| protectedvirtual |
Helper method to set ITextControlData string
| widgetId | the widget whose data you want to set. |
| text | the string to put on the widget |
| widget | a widget in the same hierarchy as the widget to set the data for. If you pass nil, 'this' is assumed to be a widget in the same hierarchy. |
| invalidate | should we invalidate the view when setting the data? |
| notifyOfChange | should we send out a notification when changing the data? |
| protectedvirtual |
Helper method to set ITriStateControlData
| widgetId | the widget whose data you want to set. |
| triState | the new state for the widget |
| widget | a widget in the same hierarchy as the widget to set the data for. If you pass nil, 'this' is assumed to be a widget in the same hierarchy. |
| invalidate | should we invalidate the view when setting the data? |
| notifyOfChange | should we send out a notification when changing the data? |