![]() | InDesign SDK 20.5 |

Public Member Functions | |
| PnlTrvTreeObserver (IPMUnknown *boss) | |
| ~PnlTrvTreeObserver () | |
| virtual void | AutoAttach () |
| virtual void | AutoDetach () |
| virtual void | Update (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy) |
| virtual void | LazyUpdate (ISubject *theSubject, const PMIID &protocol, const LazyNotificationData *) |
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 |
Protected Member Functions | |
| void | handleSelectionChanged () |
| void | doPreview (const PMString &path) |
| void | initTree () |
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 |
Implements IObserver; initialises the tree when an IObserver::AutoAttach message sent and listens for when the node selection changes. When the selection changes and there's a non-empty selection list, it takes the first item and previews the asset if it can do so (for instance, if it's a GIF, JPEG etc). It does this by setting a path on a data interface of the custom-view panel widget and invalidating the widget, forcing it to redraw to create a rendering of the new asset.
The class is derived from CObserver, and overrides the AutoAttach(), AutoDetach(), and Update() methods. This class implements the IObserver interface using the CObserver helper class, and is listening along the IID_ITREEVIEWCONTROLLER protocol for changes in the tree data model.
| Binds the C implementation class onto its ImplementationID making the C code callable by the application * PnlTrvTreeObserver::PnlTrvTreeObserver | ( | IPMUnknown * | boss | ) |
Constructor for WLBListBoxObserver class.
| interface | ptr from boss object on which this interface is aggregated. |
| PnlTrvTreeObserver::~PnlTrvTreeObserver | ( | ) |
Destructor
| virtual |
AutoAttach is only called for registered observers of widgets. This method is called by the application core when the widget is shown.
Reimplemented from CObserver.
| virtual |
AutoDetach is only called for registered observers of widgets. Called when widget hidden.
Reimplemented from CObserver.
| protected |
Sets the path on the preview widget and invalidates it
| path | [IN] specifies the path to the asset in the local file system |
| protected |
Handles a change in the selection when the end user
either clicks on a node or clicks off it
| protected |
Populates the tree model.
| virtual |
Updates this plug-in's panel when the plug-in's model changes. For example when this plug-in's preferences (IPnlTrvOptions) change. Widgets that react to changes in the plug-in's model are updated by lazy notifications handled by this method.
| theSubject | [IN] provides a reference to the object which has changed. |
| protocol | [IN] the protocol along which the change occurred. |
| data | [IN] |
Reimplemented from CObserver.
| virtual |
Update is called for all registered observers, and is the method through which changes are broadcast.
| theChange | [IN] this is specified by the agent of change; it can be the class ID of the agent, or it may be some specialised message ID. |
| theSubject | [IN] provides a reference to the object which has changed; in this case, the button widget boss object that is being observed. |
| protocol | [IN] the protocol along which the change occurred. |
| changedBy | [IN] this can be used to provide additional information about the change or a reference to the boss object that caused the change. |
Implements IObserver.