VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWidgetLabel.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtWidget.h>
14 
15 #include <vrvUtil/DtUnicode.h>
16 
17 #include <limits>
18 
20 
21 namespace makVrv
22 {
23 
27  {
28  public:
29 
31  {
32  AlignLeft, // Aligns text left
33  AlignCenter, // Aligns text center
34  AlignRight, // Aligns text right
35  AlignJustify // Fully justifies text
36  };
37 
39  {
40  CenterNone, // Does not center text in box
41  CenterHorizontal, // Centers text in box horizontally
42  CenterVertical, // Centers text in box vertically
43  CenterBoth, // Centers both horizontally and vertically
44  AlignToTextHeight // Places text at bottom of box
45  };
46 
48  {
49  ConstrainToText, // Constrains to width/height of text
50  ConstrainToBounds // Constrains to width/height set in setSize
51  };
52 
53  public:
54 
56  DtWidgetLabel( DtDe& de, DtUniqueID id );
57 
59  virtual ~DtWidgetLabel();
60 
62  DtWidgetLabel() = delete;
63 
66  const DtWidgetLabel &other) = delete;
67 
69  DtWidgetLabel &operator=(
70  const DtWidgetLabel &other) = delete;
71 
72  public:
73 
76  virtual void setText(const DtUnicode& string) = 0;
77 
79  virtual void setTextColor(float r, float g, float b, float a) = 0;
80 
82  virtual void setTextAlignment(HorizontalAlignment ha) = 0;
83 
85  virtual void setFont(const std::string& fontFace, float size) = 0;
86 
90  virtual void setSizeConstraints(SizeConstraints) = 0;
91 
96  virtual void setFontScale(float scale) = 0;
97 
99  virtual float fontScale(double minimumAltitudeForUse
100  = std::numeric_limits<double>::min()) const = 0;
101 
107  virtual void setAltitudeBasedConfigurations(
109 
113  virtual void clearAltitudeBasedConfigurations() = 0;
114 
120  virtual void setIsForcedAltitudeBasedFontScaleEnabled(bool enabled) = 0;
121 
125  virtual void setBaseAltitudeToUseForForcedFontScale(double baseAltitude) = 0;
126 
129  virtual void setLodOutAltitude(double lodOutAltitude) = 0;
130 
134  virtual void setIsLodOutAltitudeEnabled(bool isLodOutAltitudeEnabled) = 0;
135 
138  virtual void setBoundsLength(int len) = 0;
139 
141  virtual void setGlyphCenterPolicy( GlyphCenterPolicy gcp) = 0;
142 
144  virtual void setRotation( float angle ) = 0;
145 
147  virtual double getRotation() const = 0;
148 
150  virtual void setSize(float width, float height) = 0;
151 
153  virtual void getSize(float& width, float& height) = 0;
154  };
155 
156 }
Definition: DtWidgetLabel.h:33
GlyphCenterPolicy
Definition: DtWidgetLabel.h:38
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
Definition: DtWidgetLabel.h:32
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
Definition: DtWidgetLabel.h:42
voidpf void uLong size
Definition: ioapi.h:39
Definition: DtWidgetLabel.h:34
Contains makVrv::DtWidget class.
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Definition: DtWidgetLabel.h:49
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
The abstract base class for widgets.
Definition: DtWidget.h:26
Definition: DtWidgetLabel.h:41
SizeConstraints
Definition: DtWidgetLabel.h:47
This is the implementation independent widget class for showing text.
Definition: DtWidgetLabel.h:26
std::vector< DtDynamicScaleConfiguration > DtDynamicScaleConfigurationCollection
Definition: DtEntitySettingsRecord.h:54
Definition: DtWidgetLabel.h:40
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
HorizontalAlignment
Definition: DtWidgetLabel.h:30
Definition: DtWidgetLabel.h:43
Contains the DtEntitySettingsRecord class declaration.
Contains DLL export macros.

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)