InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IToolManager.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: lance bushore
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 // Purpose of interface:
24 // Maintains information about currently selected tools of each type.
25 //
26 //========================================================================================
27 
28 #ifndef __IToolManager__
29 #define __IToolManager__
30 
31 #include "IPMUnknown.h"
32 #include "ToolRecord.h"
33 
34 class ITool;
35 class IEvent;
39 class IToolManager: public IPMUnknown
40 {
41  public:
46  virtual void SetActiveTool(ITool* newActiveTool,ClassID toolType) = 0;
47 
52  virtual ITool* QueryActiveTool(ClassID toolType) = 0;
53 
59  virtual ITool* QueryPreviousActiveTool(ClassID toolType) = 0;
60 
65  virtual ITool* QueryMostRecentSelectionTool() = 0;
66 
71  virtual ITool* QueryMostRecentCreationTool() = 0;
72 
76  virtual int32 GetNumToolTypes() = 0;
77 
82  virtual ClassID GetNthToolType(int32 index) = 0;
83 
86  virtual void Startup(const PMLocaleId& localId) = 0;
87 
90  virtual void Shutdown(const PMLocaleId& localeId) = 0;
91 
102  virtual void AddTool(ITool* tool, int32 groupNum, int32 toolNum, ClassID parentTool, int32 subToolNum, RsrcID iconID, const PluginID& pluginID) = 0;
103 
104 
109  virtual ToolRecord GetNthTool(int32 index) = 0;
110 
115  virtual ToolRecord GetNthSubTool(int32 index) = 0;
116 
120  virtual int32 GetNumTools() = 0;
121 
125  virtual int32 GetNumSubTools() = 0;
126 
127 
133  virtual bool16 FindParentTool(ClassID parentClass, ToolRecord* result) = 0;
134 
140  virtual bool16 FindTool(ClassID toolClass, ToolRecord* result) = 0;
141 
145  virtual void SetMostRecentSelectionTool(ITool* selectionTool) = 0;
146 
150  virtual void SetSpringLoadedTool(ITool * tool) = 0;
151 
154  virtual void RestoreSpringLoadedTool() = 0;
155 
160  virtual bool16 OnKeyUp(IEvent* e) = 0;
161 
166  virtual bool16 OnKeyDown(IEvent* e) = 0;
167 
171  virtual bool16 IsToolSpringLoaded() = 0;
172 
173 #ifdef DEBUG
174 
176  virtual void DumpToolManager() = 0;
177 #endif
178 };
179 
180 
181 #endif
182