InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CDialogObserver Class Reference

#include <CDialogObserver.h>

Inheritance diagram for CDialogObserver:
AbstractDialogObserverCObserverIObserverIPMUnknownBscDlgDialogObserverBscL10NDialogObserverCSelectableDialogObserverCusDtLnkUIBrowsDialogObserverPDFVTUIDialogObserverTblBscDialogObserverTranFxUIDialogObserverTxtExpDialogObserverWatermarkUIDialogObserverWFPDialogObserver

Public Member Functions

 CDialogObserver (IPMUnknown *boss)
 
virtual void Update (const ClassID &theChange, ISubject *theSubject, const PMIID &protocol, void *changedBy)
 
virtual void AutoAttach ()
 
virtual void AutoDetach ()
 
- 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)
 

Protected Member Functions

virtual void CloseDialog (bool16 windowAlreadyClosed=kFalse)
 
virtual void FireOffEndDialogCmd (bool16 hitOK)
 
void SetDialogValidationStatusFailed (bool16 bStatus=kTrue)
 
void SetCloseOnCancel (bool16 shouldCloseOnCancel=kTrue)
 
- Protected Member Functions inherited from AbstractDialogObserver
void AttachToWidget (const WidgetID &widgetId, const PMIID &iidOfDataToObserve, IPanelControlData *panel)
 
void DetachFromWidget (const WidgetID &widgetId, const PMIID &iidOfDataToUnobserve, IPanelControlData *panel)
 

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
 

Detailed Description

CDialogObserver should be used by the dialog which has OK/Cancel button.

See Also
AbstractDialogObserver.h

Member Function Documentation

virtual void CDialogObserver::AutoAttach ()
virtual

By default we attach and detach to the ok and cancel buttons. These are the widgets with ids kOKButtonWidgetID and kCancelButton_WidgetID. Override to attach to other buttons or widgets.

Reimplemented from CObserver.

Reimplemented in TranFxUIDialogObserver, BscSlDlgTabDialogObserver, PDFVTUIDialogObserver, WatermarkUIDialogObserver, BscSlDlgDialogObserver, BscL10NDialogObserver, TxtExpDialogObserver, BscDlgDialogObserver, CusDtLnkUIBrowsDialogObserver, TblBscDialogObserver, WFPDialogObserver, and CSelectableDialogObserver.

virtual void CDialogObserver::AutoDetach ()
virtual
virtual void CDialogObserver::CloseDialog (bool16 windowAlreadyClosed = kFalse)
protectedvirtual

Closes the dialog window. This will release all objects associated with the dialog.

Parameters
windowAlreadyClosedkTrue if system window already been closed.
virtual void CDialogObserver::FireOffEndDialogCmd (bool16 hitOK)
protectedvirtual

Dialog Preview button support methods

Parameters
hitOKkTrue if dialog closed by click on OK button.
void CDialogObserver::SetDialogValidationStatusFailed (bool16 bStatus = kTrue)
protected

Set the dialog validation status, if bStatus true, dialog validation is failed, if bStatus false, dialog validation is fine

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