InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ControlStripWidgetInfo.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Paul Sorrick
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: Defines classes used in Control Strip.
24 //
25 //========================================================================================
26 
27 #ifndef __CONTROLSTRIPWIDGETINFO__
28 #define __CONTROLSTRIPWIDGETINFO__
29 
30 
32 {
33  public:
34  typedef object_type data_type;
35 
37 
39  (
40  const RsrcID& rsrcID, // RsrcID of resource widget to create via CreateObject (kViewRsrcType)
41  const PluginID& pluginID, // PluginID where this resource lives
42  const PMReal& priority, // Priority for position along Control Strip. 0 is at left, increasing to right.
43  const PMString& name, // Name of this control set, used for a menu item for controlling which sets are visible.
44  const PMString& menuName, // Name of the menu item that controls visibility of this control set. Usually same as name, could be different if two control sets map to same menu entry
45  const PMString& categoryName, // Name of the category this menu item goes into
46  const PMReal& categoryOrder // Category order of this control set, used for grouping the menu items. See ControlStripDefs.h
47  ) :
48  fRsrcID(rsrcID),
49  fPluginID(pluginID),
50  fPriority(priority),
51  fName(name),
52  fMenuName(menuName),
53  fCategoryName(categoryName),
54  fCategoryOrder(categoryOrder) { }
55 
56  bool16 operator==(const ControlStripWidgetInfo& other) const
57  {
58  // For comparison purposes, don't worry about priority, category and actionID. Name is what matters.
59  return ( (fRsrcID == other.fRsrcID) && (fPluginID == other.fPluginID) && (fName == other.fName) /* (fPriority == other.fPriority) && (fCategoryName == other.fCategoryName) && (fCategoryOrder == other.fCategoryOrder) */ );
60  }
61 
62  RsrcID fRsrcID; // RsrcID of resource widget to create via CreateObject (kViewRsrcType)
63  PluginID fPluginID; // PluginID where this resource lives
64  PMReal fPriority; // Priority for position along Control Strip. 0 is at left, increasing to right.
65  PMString fName; // Name of this control set, used for a menu item for controlling which sets are visible.
66  PMString fMenuName; // Name of the menu item that controls visibility of this control set. usually same as name, could be different if two control sets map to same menu entry
67  PMString fCategoryName;// Category name of this control set. See ControlStripDefs.h
68  PMReal fCategoryOrder; // Category order of this control set for sort order. See ControlStripDefs.h
69 };
70 
71 #endif //__CONTROLSTRIPWIDGETINFO__
72