VR-Forces 4.8 Class Documentation
 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) 2012 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 #include <vrvUtil/DtUnicode.h>
15 
16 namespace makVrv
17 {
18 
22  {
23  public:
24 
26  {
27  AlignLeft, // Aligns text left
28  AlignCenter, // Aligns text center
29  AlignRight, // Aligns text right
30  AlignJustify // Fully justifies text
31  };
32 
34  {
35  CenterNone, // Does not center text in box
36  CenterHorizontal, // Centers text in box horizontally
37  CenterVertical, // Centers text in box vertically
38  CenterBoth, // Centers both horizontally and vertically
39  AlignToTextHeight // Places text at bottom of box
40  };
41 
43  {
44  ConstrainToText, // Constrains to width/height of text
45  ConstrainToBounds // Constrains to width/height set in setSize
46  };
47 
49  DtWidgetLabel( DtDe& de, DtUniqueID id );
50 
52  virtual ~DtWidgetLabel();
53 
56  virtual void setText(const DtUnicode& string) = 0;
57 
59  virtual void setTextColor(float r, float g, float b, float a) = 0;
60 
62  virtual void setTextAlignment(HorizontalAlignment ha) = 0;
63 
65  virtual void setFont(const std::string& fontFace, float size) = 0;
66 
69  virtual void setSizeConstraints(SizeConstraints) = 0;
70 
74  virtual void setFontScale(float scale) = 0;
75 
77  virtual float fontScale() const = 0;
78 
81  virtual void setBoundsLength(int len) = 0;
82 
84  virtual void setGlyphCenterPolicy( GlyphCenterPolicy gcp) = 0;
85 
87  virtual void setRotation( float angle ) = 0;
88 
90  virtual double getRotation() const = 0;
91 
93  virtual void setSize(float width, float height) = 0;
94 
96  virtual void getSize(float& width, float& height) = 0;
97  };
98 
99 }
Definition: DtWidgetLabel.h:28
GlyphCenterPolicy
Definition: DtWidgetLabel.h:33
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
Definition: DtWidgetLabel.h:27
A unicode string.
Definition: DtUnicode.h:33
Definition: DtWidgetLabel.h:37
voidpf void uLong size
Definition: ioapi.h:39
Definition: DtWidgetLabel.h:29
Contains makVrv::DtWidget class.
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Definition: DtWidgetLabel.h:44
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
The abstract base class for widgets.
Definition: DtWidget.h:23
Definition: DtWidgetLabel.h:36
SizeConstraints
Definition: DtWidgetLabel.h:42
This is the implementation independent widget class for showing text.
Definition: DtWidgetLabel.h:21
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
Definition: DtWidgetLabel.h:35
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
HorizontalAlignment
Definition: DtWidgetLabel.h:25
Definition: DtWidgetLabel.h:38
Contains DLL export macros.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)