InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CWidgetObserver.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Burbidge
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __CWidgetObserver__
25 #define __CWidgetObserver__
26 
27 #include "CObserver.h"
28 #include "ITriStateControlData.h"
29 
30 #ifdef WIDGET_BUILD
31 #endif
32 
35 class CWidgetObserver : public CObserver
36 {
37 public:
41  virtual ~CWidgetObserver();
42 
43 protected:
44 
53  void AttachToWidget(const WidgetID& widgetId,
54  const PMIID& interestedIn = IID_IUNKNOWN, const PMIID& asObserver = IID_IOBSERVER,
55  IPMUnknown* widget = nil);
56 
57 
66  void DetachFromWidget(const WidgetID& widgetId,
67  const PMIID& interestedIn = IID_IUNKNOWN, const PMIID& asObserver = IID_IOBSERVER,
68  IPMUnknown* widget = nil);
69 
77  virtual void SetTextControlData(const WidgetID& widgetId, const PMString& text, IPMUnknown* widget = nil, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue);
78 
84  virtual PMString GetTextControlData(const WidgetID& widgetId, IPMUnknown* widget = nil) const;
85 
93  virtual void SetTriStateControlData(const WidgetID& widgetId,const ITriStateControlData::TriState& triState, IPMUnknown* widget, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue);
94 
100  virtual ITriStateControlData::TriState GetTriStateControlData(const WidgetID& widgetId, IPMUnknown* widget = nil) const;
101 };
102 
103 
104 #endif