InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMenuCustomizationData.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 __IMenuCustomizationData__
25 #define __IMenuCustomizationData__
26 
27 #include "AppUIID.h"
28 #include "IPMUnknown.h"
29 #include "ActionID.h"
30 #include "K2Vector.h"
31 #include "BravoForwardDecl.h"
32 
33 class IXMLOutStream;
34 
37 {
38  public:
39  enum { kDefaultIID = IID_IMENUCUSTOMIZATIONDATA };
40 
41  typedef enum {
42  kNoMenuColor = -1,
43  kBlueMenuColor = 0,
44  kGrayMenuColor = 1,
45  kGreenMenuColor = 2,
46  kOrangeMenuColor = 3,
47  kRedMenuColor = 4,
48  kVioletMenuColor = 5,
49  kYellowMenuColor = 6,
50 
51  kNumberOfMenuColors = 7 // It's intentional that the number of colors is 7 and not 8. "kNoMenuColor" isn't considered a real color.
52  } tMenuColor;
53 
54  typedef enum {
55  kNormal = 0,
56  kSelected,
57  kDisabled,
58 
59  kNumberOfStates
60  } tMenuState;
61 
64  {
65  typedef object_type data_type;
66  PMString fSubMenuPath;
67  };
68 
71  {
72  typedef base_type data_type;
73  MenuColorStruct(ActionID id, tMenuColor index) : fActionID(id), fColorIndex(index){}
74 
75  ActionID fActionID;
76  tMenuColor fColorIndex;
77  };
78 
81  {
82  typedef object_type data_type;
83  SubMenuColorStruct(IMenuCustomizationData::CustomizedSubMenuPath menuPath, tMenuColor index) : fColorizedSubMenuPath(menuPath), fColorIndex(index){}
84 
86  tMenuColor fColorIndex;
87  };
88 
90  virtual const PMString& GetDefaultMenuSetName() const = 0;
91 
93  virtual bool16 SetCurrentMenuSetInfo(const PMString& menuSetName,bool16 isModified,bool16 isPreset,bool16 readShortcutSetFromDisk)= 0;
94 
96  virtual const PMString& GetCurrentMenuSetName() const= 0;
97 
99  virtual bool16 IsCurrentMenuSetModified() const= 0;
100 
102  virtual bool16 IsCurrentMenuSetPreset() const= 0;
103 
105  virtual void HideSubMenu(const PMString& menuPath) = 0;
106 
108  virtual void ShowSubMenu(const PMString& menuPath) = 0;
109 
111  virtual bool16 IsSubMenuHidden(const PMString& menuPath) const= 0;
112 
114  virtual const K2Vector<CustomizedSubMenuPath>& GetHiddenSubMenus() const = 0;
115 
117  virtual void SetHiddenSubMenus(const K2Vector<CustomizedSubMenuPath>& hiddenSubMenuList) = 0;
118 
120  virtual void ClearAllHiddenSubMenus() = 0;
121 
122  /* Hides a menu by action id. This may hide multiple menu items that share an ActionID */
123  virtual void HideMenuAction(const ActionID action) = 0;
124 
126  virtual void ShowMenuAction(const ActionID action) = 0;
128  virtual bool16 IsMenuActionHidden(ActionID action) const = 0;
129 
131  virtual const K2Vector<ActionID>& GetHiddenMenuActions() const = 0;
132 
134  virtual void SetHiddenMenuActions(const K2Vector<ActionID>& hiddenActionList) = 0;
135 
137  virtual void ClearAllHiddenActions() = 0;
138 
140  virtual void SetSubMenuColor(const PMString& menuPath, tMenuColor colorIndex) = 0;
141 
143  virtual tMenuColor GetSubMenuColor(const PMString& menuPath) const = 0;
144 
146  virtual const K2Vector<SubMenuColorStruct>& GetColoredSubMenus() const = 0;
147 
149  virtual void SetColoredSubMenus(const K2Vector<SubMenuColorStruct>& coloredSubMenuList) = 0;
150 
152  virtual void ClearAllColoredSubMenus() = 0;
153 
154 
155  virtual void SetMenuActionColor(const ActionID action, tMenuColor colorIndex) = 0;
157  virtual tMenuColor GetMenuActionColor(ActionID action) const = 0;
158 
160  virtual const K2Vector<MenuColorStruct>& GetColoredMenuActions() const = 0;
161 
163  virtual void SetColoredMenuActions(const K2Vector<MenuColorStruct>& coloredActionList) = 0;
164 
166  virtual void ClearAllColoredMenuActions() = 0;
167 
169  virtual bool16 GetMenusAreHiddenOrColorized() const = 0;
170 
172  virtual void ClearAllMenusAndColorization() = 0;
173 
175  virtual bool16 WriteXMLMenuFile(IXMLOutStream* s) const = 0;
176 
178  virtual bool16 SaveCurrentMenuSetToFile(const PMString& menuSetName) const = 0;
179  typedef enum {
191 
194 };
195 
196 #endif // __IMenuCustomizationData__
197