InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMenuManager.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 __IMenuManager__
25 #define __IMenuManager__
26 
27 #include "IPMUnknown.h"
28 
29 #include "ActionID.h"
30 #include "OMTypes.h"
31 #include "TextChar.h"
32 
33 class PMReal;
34 class PMString;
35 
39  const textchar kMenuPathSeparator = kTextChar_Colon ;
41  const textchar kMenuSeparatorChar = kTextChar_HyphenMinus ;
43 
45 class IMenuManager : public IPMUnknown
46 {
47  public:
48  enum { kDefaultIID = IID_IMENUMANAGER };
49 
66  virtual void AddMenuItem(ActionID actionID, PMString menuPath, PMReal menuPos, bool16 isDynamic, bool16 isOwnerDraw = kFalse, uint32 iconPluginID = 0, uint32 iconRsrcID = 0) = 0;
67 
71  virtual void RemoveAllMenusForAction(ActionID actionID) = 0;
72 
79  virtual void RemoveMenuItem(PMString menuPath, ActionID actionID) = 0;
80 
85  virtual void RemoveSubmenuAndChildren(PMString menuPath) = 0;
86 
95  virtual void HandlePopupMenu(PMString popupLabel, GSysPoint whereToPop, GSysPoint mousePoint, bool16 removeDisabledItems = kTrue, IPMUnknown* widget = nil, GSysRect* excludeRect = nil) = 0;
96 
100  virtual bool16 IsMenuUp() const = 0;
101 
114  virtual void RemoveIconOfActionID(ActionID actionID, PMString menuPath) = 0;
115 
129  virtual void SetIconForMenuPath(const ActionID actionID, const PMString menuPath, uint32 iconPluginID = 0, uint32 iconRsrcID = 0) = 0;
130 
131 #ifdef DEBUG
132  typedef enum { positionInfo, rootMenuNames, allMenuNames, allMenuInfo, macMenuIDs} MenuInfoType;
133  virtual void DumpMenuInfo(MenuInfoType infoType) const = 0;
134 #endif
135 
139  virtual PMRect GetMenuBounds(PMString inMenuName) = 0;
140 
145  virtual void ShowMenuItem(PMString menuPath, PMRect & position) = 0;
146 };
147 
148 #endif // __IMenuManager__