UGDK
0.5.0
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
label.h
Go to the documentation of this file.
1
#ifndef UGDK_TEXT_LABEL_H_
2
#define UGDK_TEXT_LABEL_H_
3
4
#include <
ugdk/graphic.h
>
5
#include <
ugdk/text.h
>
6
7
#include <
ugdk/ui/drawable.h
>
8
#include <
ugdk/graphic/vertexdata.h
>
9
#include <
ugdk/util/utf8.h
>
10
#include <
ugdk/structure/types.h
>
11
#include <
ugdk/math/vector2D.h
>
12
13
#include <string>
14
#include <cstddef>
15
#include <vector>
16
#include <memory>
17
18
namespace
ugdk
{
19
namespace
text {
20
21
class
Label
:
public
ui::Drawable
{
22
public
:
23
Label
(
const
std::string& utf8_message,
Font
* font);
24
Label
(
const
std::u32string& ucs4_message,
Font
* font);
25
~Label
();
26
28
void
ChangeMessage
(
const
std::string& utf8_message);
29
void
ChangeMessage
(
const
std::u32string& ucs4_message);
30
31
void
Draw
(
graphic::Canvas
&)
const override
;
32
const
ugdk::math::Vector2D
&
size
()
const override
;
33
34
private
:
35
Font
* font_;
36
std::unique_ptr<graphic::VertexData> buffer_;
37
std::vector<int> first_vector_, size_vector_;
38
39
ugdk::math::Vector2D
size_;
40
std::size_t num_characters_;
41
};
42
43
}
// namespace text
44
}
// namespace ugdk
45
46
#endif // UGDK_TEXT_LABEL_H_
ugdk::graphic::Canvas
Definition:
canvas.h:28
types.h
ugdk::math::Vector2D
Definition:
vector2D.h:18
text.h
ugdk::text::Font
Definition:
font.h:16
ugdk::text::Label::ChangeMessage
void ChangeMessage(const std::string &utf8_message)
This operation is slow.
ugdk::text::Label::~Label
~Label()
ugdk
Definition:
animation.h:11
utf8.h
ugdk::text::Label
Definition:
label.h:21
ugdk::ui::Drawable
Definition:
drawable.h:13
ugdk::text::Label::Draw
void Draw(graphic::Canvas &) const override
drawable.h
ugdk::text::Label::Label
Label(const std::string &utf8_message, Font *font)
graphic.h
vector2D.h
vertexdata.h
ugdk::text::Label::size
const ugdk::math::Vector2D & size() const override
modules
ugdk-2d
include
ugdk
text
label.h
Generated on Sun Dec 6 2015 00:40:24 for UGDK by
1.8.8