InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IActionMenuManager.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Tim Wright
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 // Comments: Gathers menu items and order for events...
24 //
25 //========================================================================================
26 
27 #ifndef __IActionMenuManager_h__
28 #define __IActionMenuManager_h__
29 
30 #include "IPMUnknown.h"
31 #include "BehaviorUIID.h"
32 #include "BehaviorID.h"
33 #include "BehaviorTypes.h"
34 
35 
37 
38 //========================================================================================
39 // CLASS IActionMenuManager
40 //========================================================================================
41 
46 {
47 public:
48  enum { kDefaultIID = IID_IACTIONMENUMANAGER };
49 
58  virtual void AddEventMenuItem(ActionEvent inEvent, const PMString& inName, double inOrder) = 0;
59 
65  virtual void AddEventSeparatorItem(ActionEvent inBeforeEvent, double inOrder) = 0;
66 
76  /* TODO: add methods to allow specifing the ordering of the behaviors, as well as the events... */
77 
78  virtual void BuildEventMenuSupportingSelection(IDropDownListController* inDropDownList, const ActionEvent& inSelectEvent) = 0;
79 };
80 
81 //========================================================================================
82 
87 {
88  typedef object_type data_type;
89 
91  : fName(),
92  fOrder(0.0),
93  fServiceIndex(0),
94  fSeparator(false),
95  fEvent(kNoEvt)
96  {}
97 
98  EventMenuInfo(ActionEvent inEvent, const PMString& inName, double inOrder, int32 inServiceIndex, bool inSep)
99  : fEvent(inEvent),
100  fName(inName),
101  fOrder(inOrder),
102  fServiceIndex(inServiceIndex),
103  fSeparator(inSep)
104  {}
105 
106  ActionEvent fEvent;
107  PMString fName;
108  double fOrder;
109  bool fSeparator;
110  int32 fServiceIndex;
111 };
112 
113 #endif // __IActionMenuManager_h__