InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ActionSupportedEvents.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Tim Wright
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 // Comments: Implemention of ISupportedEvents for the basic form field types.
24 // ISupportedEvents says whether an event type is supported.
25 //
26 //========================================================================================
27 
28 #ifndef __ActionSupportedEvents_h__
29 #define __ActionSupportedEvents_h__
30 
31 #include "CPMUnknown.h"
32 #include "ISupportedEvents.h"
33 #include "FormFieldTypes.h"
34 
35 //========================================================================================
36 // TEMPLATE ActionSupportedEvents
37 //========================================================================================
38 
39 template <int32>
40 class ActionSupportedEvents : CPMUnknown<ISupportedEvents>
41 {
42 public:
43 
45  virtual bool16 SupportsMouseEvents() const { return kTrue; } //mouse up/down/over
46  virtual bool16 SupportsFocusEvents() const { return kTrue; } //focus/blur
47  virtual bool16 SupportsPageEvents() const { return kTrue; } //page open/close, we are kludging in support for these
48  //by allowing page open/close events to be attached to form
49  //fields.
50 
51 
52  virtual bool16 SupportsDocumentEvents() const { return kFalse; } //only JavaScript actions support this event for now...
53 
54  virtual bool16 SupportsFormatEvents() const { return kFalse; } //format
55  virtual bool16 SupportsKeystrokeEvents() const { return kFalse; } //keystroke
56  virtual bool16 SupportsValidateEvents() const { return kFalse; } //validate
57  virtual bool16 SupportsCalculateEvents() const{ return kFalse; } //calculate
58  virtual bool16 SupportsSignedEvents() const { return kFalse; } //signed
59  virtual bool16 SupportsSelectionChangedEvents() const { return kFalse; } //selection changed
60 };
61 
62 //-------------------------------------------------------------------------------
63 
64 template <int32>
65 class NoSupportedEvents : CPMUnknown<ISupportedEvents>
66 {
67 public:
68 
70  virtual bool16 SupportsMouseEvents() const { return kFalse; } //mouse up/down/over
71  virtual bool16 SupportsFocusEvents() const { return kFalse; } //focus/blur
72  virtual bool16 SupportsPageEvents() const { return kFalse; } //page open/close, we are kludging in support for these
73  //by allowing page open/close events to be attached to form
74  //fields.
75  virtual bool16 SupportsDocumentEvents() const { return kFalse; } //only JavaScript actions support this event for now...
76 
77  virtual bool16 SupportsFormatEvents() const { return kFalse; } //format/keystroke
78  virtual bool16 SupportsKeystrokeEvents() const { return kFalse; } //keystroke
79  virtual bool16 SupportsValidateEvents() const { return kFalse; } //validate
80  virtual bool16 SupportsCalculateEvents() const{ return kFalse; } //calculate
81  virtual bool16 SupportsSignedEvents() const { return kFalse; } //signed
82  virtual bool16 SupportsSelectionChangedEvents() const { return kFalse; } //selection changed
83 };
84 
85 #endif // __ActionSupportedEvents_h__