InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ToolRecord.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 
24 #ifndef __ToolRecord__
25 #define __ToolRecord__
26 
27 class ITool;
28 
32 {
33  public: // note: holds a ref on the interface.
34  typedef base_type data_type;
35  ToolRecord(ITool* face, int32 groupNum, int32 toolNum, ClassID parentTool, int32 subToolNum, RsrcID iconID, const PluginID& pluginID);
36  ToolRecord(const ToolRecord& rec);
37  ToolRecord();
38  ~ToolRecord();
39 
40  void ReadWrite(IPMStream *s);
41 
45  ITool* QueryTool();
46 
50  int32 GetGroupNum() const;
51 
55  int32 GetToolNum() const;
56 
61  ClassID GetParentTool() const;
62 
66  int32 GetSubToolNum() const;
67 
71  RsrcID GetIconID();
72 
77 
78 
82  void SetGroupNum(int32 newGroup);
83 
84  friend bool16 operator ==(const ToolRecord& a, const ToolRecord& b);
85 
86  private:
87  UID fToolUID;
88  int32 fGroupNum;
89  int32 fToolNum;
90  ClassID fParentTool;
91  int32 fSubToolNum;
92  RsrcID fIconID;
93  PluginID fIconPluginID;
94 
95 };
96 
97 
98  bool16 ToolRecordCompare(const ToolRecord &toolRec1, const ToolRecord &toolRec2);
99  bool16 SubToolRecordCompare(const ToolRecord &toolRec1, const ToolRecord &toolRec2);
100 
101 #endif