HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OPUI_GraphBadge.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: OPUI_GraphBadge.h (User Interface Library, C++)
7  *
8  * COMMENTS:
9  * A class to describe a node badge.
10  *
11  */
12 
13 #ifndef __OPUI_GraphBadge__
14 #define __OPUI_GraphBadge__
15 
16 #include "OPUI_API.h"
17 #include <UT/UT_Array.h>
18 #include <UT/UT_Color.h>
19 #include <UT/UT_StringHolder.h>
20 #include <UT/UT_Error.h>
21 #include <variant>
22 
23 class OPUI_GraphBadge;
24 class OP_Context;
25 class OP_Node;
26 namespace apex { class APEX_Node; }
27 
33 };
34 
38 };
39 
41 {
42 public:
43  using Node = std::variant<OP_Node*, const apex::APEX_Node*>;
44 
45  OP_Node * opNode() const
46  {
47  auto p = std::get_if<OP_Node*>(&myItem);
48  return p ? *p : nullptr;
49  }
50 
51  const apex::APEX_Node * apexNode() const
52  {
53  auto p = std::get_if<const apex::APEX_Node*>(
54  &myItem);
55  return p ? *p : nullptr;
56  }
57 
61  bool myCurrent;
62  bool myPicked;
63 };
64 
65 typedef bool (*OPUI_GraphBadgeTest)(const OPUI_GraphBadgeInfo &info,
66  OPUI_GraphBadgeVisibility visibility,
67  OP_Context &context,
68  UT_StringHolder &icon,
69  UT_Color &clr);
71 
73 {
74 public:
75  OPUI_GraphBadge(const UT_StringHolder &pref,
76  const UT_StringHolder &category,
77  const UT_StringHolder &description,
78  const UT_StringHolder &icon,
81  OPUI_GraphBadgeThreading threading);
82  ~OPUI_GraphBadge();
83 
85  { return myPreferenceName; }
87  { return myPreferenceCategory; }
89  { return myDescription; }
90  const UT_StringHolder &getIcon() const
91  { return myIcon; }
93  { return myDefaultVisibility; }
95  { return myBadgeTest; }
96  bool getThreadSafe() const
97  { return myThreadSafe; }
98 
100  { return myVisibility; }
102  { myVisibility = vis; }
103 
104  static void addBadges(OPUI_GraphBadgeArray &add_badges);
105 
122 
130 
134 
137 
141 
142 private:
143  UT_StringHolder myPreferenceName;
144  UT_StringHolder myPreferenceCategory;
145  UT_StringHolder myDescription;
146  UT_StringHolder myIcon;
147  OPUI_GraphBadgeVisibility myDefaultVisibility;
148  OPUI_GraphBadgeVisibility myVisibility;
149  OPUI_GraphBadgeTest myBadgeTest;
150  bool myThreadSafe;
151 };
152 
153 #endif
154 
static const UT_StringHolder theCommentPref
OPUI_GraphBadgeVisibility getVisibility() const
static const UT_StringHolder theNodeDiveablePref
bool getThreadSafe() const
static const UT_StringHolder the64bitPref
OP_Node * opNode() const
cvex test(vector P=0;int unbound=3;export float s=0;export vector Cf=0;)
Definition: test.vfl:11
static const UT_StringHolder theParametersBadgeCategory
static const UT_StringHolder theLopDebugPref
#define OPUI_API
Definition: OPUI_API.h:10
Definition: Node.h:52
static const UT_StringHolder theKinematicsPref
static const UT_StringHolder theLoadFromDiskPref
static const UT_StringHolder theHDALockedPref
UT_ErrorSeverity myErrorSeverity
static const UT_StringHolder theLopUnloadedPayloadsPref
UT_ErrorSeverity
Definition: UT_Error.h:25
static const UT_StringHolder theConstraintsPref
const UT_StringHolder & getPreferenceName() const
static const UT_StringHolder theNodeHasDataPref
OPUI_GraphBadgeVisibility getDefaultVisibility() const
const UT_StringHolder & getDescription() const
UT_Array< OPUI_GraphBadge > OPUI_GraphBadgeArray
static const UT_StringHolder theNotCompilablePref
static const UT_StringHolder theErrorPref
static const UT_StringHolder theHasTakeDataPref
static const UT_StringHolder theLopPopulationMaskPref
OPUI_GraphBadgeTest getBadgeTest() const
void setVisibility(OPUI_GraphBadgeVisibility vis)
const apex::APEX_Node * apexNode() const
static const UT_StringHolder theMainBadgeCategory
static const UT_StringHolder theChildErrorPref
OPUI_GraphBadgeVisibility
const UT_StringHolder & getIcon() const
static const UT_StringHolder theNodeUnloadPref
static const UT_StringHolder theNeedsCookPref
static const UT_StringHolder theMessagePref
static const UT_StringHolder theDynamicTOPPref
static const UT_StringHolder theTimeDepPref
static const UT_StringHolder theMQClientsAuthPref
static const UT_StringHolder theTagsPref
const UT_StringHolder & getPreferenceCategory() const
OPUI_GraphBadgeThreading
static const UT_StringHolder theContextSpecificBadgeCategory
static const UT_StringHolder theHDAUnlockedPref
static const UT_StringHolder theMQServerAuthPref
static const UT_StringHolder theHDADelaySyncPref
static const UT_StringHolder theVexCachePref
static const UT_StringHolder theWarningPref
bool(* OPUI_GraphBadgeTest)(const OPUI_GraphBadgeInfo &info, OPUI_GraphBadgeVisibility visibility, OP_Context &context, UT_StringHolder &icon, UT_Color &clr)
static const UT_StringHolder theNodeLockedPref