InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITool.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: EricM,Frits
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 __ITOOL__
25 #define __ITOOL__
26 
27 #include "PMTypes.h"
28 #include "IPMUnknown.h"
29 #include "ShuksanID.h"
30 
31 class IEventHandler;
32 class PMString;
33 class IPanelControlData;
34 class ICursorProvider;
35 
39 class ITool: public IPMUnknown
40 {
41  public:
42  enum { kDefaultIID = IID_ITOOL };
43 
50  enum ToolType
51  {
53  kNone = 0,
55  kLayoutSelectionTool = 1,
57  kTextSelectionTool = 2,
59  kTableSelectionTool = 4,
61  kLayoutManipulationTool = 8,
63  kTextManipulationTool = 16,
65  kTableManipulationTool = 32,
67  kLayoutCreationTool = 64,
69  kTextCreationTool = 128,
71  kTableCreationTool = 256,
73  kPathManipulationTool = 512,
75  kViewModificationTool = 1024,
77  kJGridTool = 2048,
79  kPageSelectionTool = 4096
80  };
81 
87  virtual void Init(RsrcID iconID, const PluginID& pluginID) = 0;
88 
91  virtual void Select() = 0;
92 
95  virtual void Deselect() = 0;
96 
99  virtual bool IsSelected() = 0;
100 
101 
105  virtual ICursorProvider* GetCursorProvider() const = 0;
106 
110  virtual void SetCursorProvider(ICursorProvider* newProvider) = 0;
111 
115  virtual const PMString& GetName() const = 0;
119  virtual void SetName(const PMString& newName) = 0;
120 
124  virtual const PMString& GetToolHint() const = 0;
128  virtual void SetToolHint(const PMString& newHint) = 0;
129 
132  virtual const IDFile& GetToolIconFile() const = 0;
133 
134  //
138  virtual ActionID GetActionID() const = 0;
139 
143  virtual void SetActionID(ActionID actionID) = 0;
144 
148  virtual const ClassID& GetToolType() const= 0;
149 
153  virtual void SetToolType(const ClassID& newToolType) = 0;
154 
155 
158  virtual void DisplayOptions() = 0;
159 
162  virtual void DisplayAltOptions() = 0;
163 
164 
168  virtual bool16 IsCreationTool() const = 0;
169 
170 
174  virtual bool16 IsSelectionTool() const = 0;
175 
176 
182  virtual bool16 IsTextTool() const = 0;
183 
184 
189  virtual bool16 IsToolOfType(ITool::ToolType type) const = 0;
190 
222  virtual ScriptID GetScriptID() const = 0;
223 
227  virtual bool16 IsToolNone() const = 0;
228 };
229 
230 
231 #endif