![]() | InDesign SDK 20.5 |

Public Member Functions | |
| SnipRunGoButtonObserver (IPMUnknown *boss) | |
| virtual | ~SnipRunGoButtonObserver () |
| virtual void | AutoAttach () |
| virtual void | AutoDetach () |
| virtual void | Update (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy) |
Public Member Functions inherited from CObserver | |
| CObserver (IPMUnknown *boss, PMIID interfaceID=IID_IOBSERVER) | |
| IChangeManager * | GetChangeManager () const |
| 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) |
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 |
Runs the snippet when the go button is clicked, also when the name of the snippet to be run is changed this observer uses ISnipRunSuite::CanRun to determine if the snippet can run and enables or disables the button accordingly.
The name of the snippet this implementation works with is given by the IStringData interface aggregated onto this control's boss class as IID_ISNIPRUNSNIPPETNAMESTRINGDATA. To get this observer to recognise a change to this data client code should call this button's ISubject as shown:
ISubject::Change(kTextChangeStateMessage, IID_ISNIPRUNSNIPPETNAMESTRINGDATA);
Implements IObserver based on the partial implementation CObserver.
| SnipRunGoButtonObserver::SnipRunGoButtonObserver | ( | IPMUnknown * | boss | ) |
Constructor.
| boss | interface ptr from boss object on which this interface is aggregated. |
| virtual |
Destructor
| virtual |
Attaches observed subjects. Observes the button's ITriStateControlData to catch clicks and the IID_ISNIPRUNSNIPPETNAMESTRINGDATA to catch when the name of the snippet to be run changes.
Reimplemented from CObserver.
| virtual |
Detaches observed subjects.
Reimplemented from CObserver.