VR-Forces 4.6.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvCore
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
21
class
DT_DLL_VRVCORE
DtWidgetLabel
:
public
DtWidget
22
{
23
public
:
24
25
enum
HorizontalAlignment
26
{
27
AlignLeft
,
// Aligns text left
28
AlignCenter
,
// Aligns text center
29
AlignRight
,
// Aligns text right
30
AlignJustify
// Fully justifies text
31
};
32
33
enum
GlyphCenterPolicy
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
42
enum
SizeConstraints
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
}
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)