InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BscSlDlgTabDialogObserver Class Reference
Inheritance diagram for BscSlDlgTabDialogObserver:
CSelectableDialogObserverCDialogObserverAbstractDialogObserverCObserverIObserverIPMUnknown

Public Member Functions

 BscSlDlgTabDialogObserver (IPMUnknown *boss)
 
virtual ~BscSlDlgTabDialogObserver ()
 
virtual void Update (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy)
 
virtual void AutoAttach ()
 
virtual void AutoDetach ()
 
- Public Member Functions inherited from CSelectableDialogObserver
 CSelectableDialogObserver (IPMUnknown *boss)
 
- Public Member Functions inherited from CDialogObserver
 CDialogObserver (IPMUnknown *boss)
 
- Public Member Functions inherited from AbstractDialogObserver
 AbstractDialogObserver (IPMUnknown *boss)
 
- Public Member Functions inherited from CObserver
 CObserver (IPMUnknown *boss, PMIID interfaceID=IID_IOBSERVER)
 
IChangeManagerGetChangeManager () 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 Member Functions inherited from CSelectableDialogObserver
virtual int32 GetSelectedPanelIndex ()
 
- Protected Attributes inherited from CObserver
bool16 fDetachSubjectsOnDelete
 
PMIID fAttachIID
 
const UIDRef fThisRef
 
bool16 fEnabled
 

Detailed Description

This implementation subclasses CSelectableDialogObserver, not CObserver, to help provide the dialog switching mechanism. Note that each of the methods in this class first call the method in the parent class, CSelectableDialogObserver. (e.g. BscSlDlgTabDialogObserver::Update calls CSelectableDialogObserver::Update)

In addition, this implementation allows dynamic processing of the dialog's info button.

For the tabs to switch correctly, it is necessary to listen to kSelectedTabChangedMessage and react accordingly. It is illustrated in the Update() method, and it is actually from production code of TabBasicSelectableDialogObserver class, since the header is private, we provide the implementation here for developer who might need it. The previous version of this sample used an icon observer to dynamically process widget's state change, but it is impractical for plug-in that has many widgets to have one observer for each widget, thus we provide this dialog observer.

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * BscSlDlgTabDialogObserver::BscSlDlgTabDialogObserver (IPMUnknownboss)

Constructor.

Parameters
bossinterface ptr from boss object on which interface is aggregated.
virtual BscSlDlgTabDialogObserver::~BscSlDlgTabDialogObserver ()
inlinevirtual

Destructor.

Member Function Documentation

void BscSlDlgTabDialogObserver::AutoAttach (void )
virtual

Called by the application to allow the observer to attach to the subjects to be observed. In this case the tab dialog's info button widget.

Reimplemented from CSelectableDialogObserver.

void BscSlDlgTabDialogObserver::AutoDetach (void )
virtual

Called by the application to allow the observer to detach from the subjects being observed.

Reimplemented from CSelectableDialogObserver.

void BscSlDlgTabDialogObserver::Update (const ClassIDtheChange,
ISubjecttheSubject,
const PMIIDprotocol,
void * changedBy 
)
virtual

Called by the host when the observed object changes. In this case: the tab dialog's info button is clicked.

Since this class inherits CSelectableDialogObserver, it only handles the default list box widget, which is not used in the tab style. for tab style, we need to handle the kSelectedTabChangedMessage

Parameters
theChangespecifies the class ID of the change to the subject. Frequently this is a command ID.
theSubjectpoints to the ISubject interface for the subject that has changed.
protocolspecifies the ID of the changed interface on the subject boss.
changedBypoints to additional data about the change. Often this pointer indicates the class ID of the command that has caused the change.

Reimplemented from CSelectableDialogObserver.