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 <UNI/UNI_Node.h>
18 #include <UT/UT_Array.h>
19 #include <UT/UT_Color.h>
20 #include <UT/UT_StringHolder.h>
21 #include <UT/UT_Error.h>
22 #include <variant>
23 
24 class OPUI_GraphBadge;
25 class OP_Context;
26 class OP_Node;
27 
33 };
34 
38 };
39 
40 
42 {
43 public:
44  using Node = std::variant<OP_Node*, UNI_ConstNode>;
45 
46  OP_Node * opNode() const
47  {
48  auto p = std::get_if<OP_Node*>(&myItem);
49  return p ? *p : nullptr;
50  }
51 
53  {
54  auto p = std::get_if<UNI_ConstNode>(&myItem);
55  return p ? *p : UNI_ConstNode();
56  }
57 
61  bool myCurrent;
62  bool myPicked;
63 };
64 
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 
123 
133 
137 
140 
144 
145 private:
146  UT_StringHolder myPreferenceName;
147  UT_StringHolder myPreferenceCategory;
148  UT_StringHolder myDescription;
149  UT_StringHolder myIcon;
150  OPUI_GraphBadgeVisibility myDefaultVisibility;
151  OPUI_GraphBadgeVisibility myVisibility;
152  OPUI_GraphBadgeTest myBadgeTest;
153  bool myThreadSafe;
154 };
155 
156 #endif
157 
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
UNI_ConstNode uniNode() const
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
OutGridT const XformOp bool bool
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 theContinuousCookPref
static const UT_StringHolder theLopPopulationMaskPref
OPUI_GraphBadgeTest getBadgeTest() const
void setVisibility(OPUI_GraphBadgeVisibility vis)
static const UT_StringHolder theMainBadgeCategory
static const UT_StringHolder theChildErrorPref
OPUI_GraphBadgeVisibility
const UT_StringHolder & getIcon() const
static const UT_StringHolder theNodeEditableGraphPref
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
static const UT_StringHolder theLiveRenderPref