VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgAttributeGroupWidget.h
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  **************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
15 
16 namespace makVrv
17 {
18 
19  class DtAttributeLayout;
20  class DtTextAttribute;
21 
25  : public DtAttributeGroupWidget
26  {
27  public:
28 
31 
33  virtual ~DtOsgAttributeGroupWidget();
34 
36  DtOsgAttributeGroupWidget() = delete;
37 
40  const DtOsgAttributeGroupWidget &other) = delete;
41 
43  DtOsgAttributeGroupWidget &operator=(
44  const DtOsgAttributeGroupWidget &other) = delete;
45 
46  public:
47 
49  virtual void setBackgroundEnabled(bool enabled);
50 
52  virtual void setOutlineColor( float r, float g,
53  float b, float a = 1.0f );
54 
56  virtual void setOutlineWidth(float width);
57 
59  virtual void setOutlineEnabled(bool enabled);
60 
62  virtual void setTypeText(unsigned int index,
63  const DtUnicode& attributeName);
64 
66  virtual void setTypeValueText(unsigned int index,
67  const DtUnicode& attributeName);
68 
70  virtual void setTypeNumeric(unsigned int index,
71  const DtUnicode& attributeName);
72 
74  virtual void setTypeValueBar(unsigned int index,
75  const DtUnicode& attributeName);
76 
78  virtual void setTypeGraph(
79  unsigned int index, const DtUnicode& attributeName, int maxValues);
80 
82  virtual void setTypeImage(
83  unsigned int index, const DtUnicode& attributeName);
84 
86  virtual void setTypeNull(unsigned int index);
87 
89  virtual void setValueImage(
90  unsigned int index, const std::string& imageFilepath);
91 
93  virtual void setValueGraphPoint(
94  unsigned int index, unsigned int n, float x, float y);
95 
97  virtual void setValueBarValue(unsigned int index, float val);
98 
100  virtual void setValueNumeric(unsigned int index, float val);
101 
103  virtual void setValueTextValue(unsigned int index, const DtUnicode& val);
104 
106  virtual void setAttributeVisible(unsigned int index, bool visible);
107 
108  // DtWidget interface
110  virtual void setOverlay( unsigned int overlay );
111 
113  virtual unsigned int overlay() const;
114 
116  virtual void setOrderGroup( unsigned int group );
117 
119  virtual unsigned int orderGroup() const;
120 
122  virtual void setBackgroundOrderGroup( unsigned int groupId );
123 
125  virtual void setPosition( float x, float y, float z, float w = 0 );
126 
128  virtual void setBackgroundImage( const std::string& filename );
129 
131  virtual void setBackgroundColor( float r, float g, float b, float a = 1.0f );
132 
134  virtual void setColor(float r,float g,float b, float a);
135 
138  virtual void setOrigin(float originX, float originY);
139 
141  virtual void setSize(float w, float h);
142 
144  virtual void setPadding(float paddingX, float paddingY);
145 
148  virtual void setModelDefinition(const std::string& str);
149 
151  virtual void setEventsEnabled(bool enabled);
152 
154  virtual void expandLayoutBy(unsigned int rows, unsigned int cols);
155 
157  virtual void setVisible(bool visible);
158 
162  virtual void setLodOutAltitude(double lodOutAltitude);
163 
167  virtual void setIsLodOutAltitudeEnabled(bool isLodOutAltitudeEnabled);
168 
171  virtual void setHorizontalCenter(bool center);
172 
175  virtual void setVerticalCenter(bool center);
176 
178  virtual void setFontSize(float fontSize);
179 
181  virtual void setFontFile(const std::string& fontFile);
182 
184  virtual void setShadowText( bool enabled );
185 
187  virtual void setRotation(float);
188 
189  protected:
193  virtual void createOrUpdateTextAttribute(unsigned int rowIndex,
194  unsigned int columnIndex, const DtUnicode& textString);
195 
197  virtual DtTextAttribute* buildTextAttribute(const DtUnicode& text);
198 
199  protected:
200 
202 
203  osg::Vec4 myBackgroundColor;
204 
205  unsigned int myOrderGroup;
207 
208  float myR;
209  float myG;
210  float myB;
211  float myA;
212 
213  std::string myFontFile;
214  float myFontSize;
215 
216  unsigned int myOverlay;
217 
220 
221  };
222 
223 }
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
float myG
Definition: DtOsgAttributeGroupWidget.h:209
float myA
Definition: DtOsgAttributeGroupWidget.h:211
unsigned int myBackgroundOrderGroup
Definition: DtOsgAttributeGroupWidget.h:206
The attribute layout tells DtAttributes where to draw.
Definition: DtTextAttribute.h:33
double myLodOutAltitude
Definition: DtOsgAttributeGroupWidget.h:219
unsigned int myOverlay
Definition: DtOsgAttributeGroupWidget.h:216
Contains the DtAttributeGroupWidget class declaration.
The attribute layout tells DtAttributes where to draw using a grid type layout.
Definition: DtAttributeLayout.h:37
bool myIsLodOutAltitudeEnabled
Definition: DtOsgAttributeGroupWidget.h:218
Class for a widget that displays remote graphics attribute groups.
Definition: DtAttributeGroupWidget.h:20
float myB
Definition: DtOsgAttributeGroupWidget.h:210
osg::Vec4 myBackgroundColor
Definition: DtOsgAttributeGroupWidget.h:203
float myFontSize
Definition: DtOsgAttributeGroupWidget.h:214
DtAttributeLayout myLayout
Definition: DtOsgAttributeGroupWidget.h:201
float myR
Definition: DtOsgAttributeGroupWidget.h:208
unsigned int myOrderGroup
Definition: DtOsgAttributeGroupWidget.h:205
The osg implementation of an attribute group.
Definition: DtOsgAttributeGroupWidget.h:24
std::string myFontFile
Definition: DtOsgAttributeGroupWidget.h:213
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
Contains the DtAttributeLayout class declaration.

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)