ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
include
asw
modules
ui
label.h
Go to the documentation of this file.
1
8
9
#ifndef ASW_MODULES_UI_LABEL_H
10
#define ASW_MODULES_UI_LABEL_H
11
12
#include <string>
13
14
#include "
../types.h
"
15
#include "
context.h
"
16
#include "
widget.h
"
17
18
namespace
asw::ui
{
19
22
class
Label
:
public
Widget
{
23
public
:
26
Label
()
27
{
28
focusable
=
false
;
29
}
30
35
void
draw(
Context
& ctx)
override
;
36
38
asw::Font
font
;
39
41
std::string
text
;
42
44
asw::TextJustify
justify
=
asw::TextJustify::Left
;
45
47
asw::Color
color
;
48
};
49
50
}
// namespace asw::ui
51
52
#endif
// ASW_MODULES_UI_LABEL_H
asw::ui::Context
Shared state for the UI system.
Definition
context.h:75
asw::ui::Label
A text display widget.
Definition
label.h:22
asw::ui::Label::color
asw::Color color
The text color.
Definition
label.h:47
asw::ui::Label::font
asw::Font font
The font to use for rendering.
Definition
label.h:38
asw::ui::Label::text
std::string text
The text to display.
Definition
label.h:41
asw::ui::Label::Label
Label()
Default constructor.
Definition
label.h:26
asw::ui::Label::justify
asw::TextJustify justify
The text justification.
Definition
label.h:44
asw::ui::Widget
Base class for all UI widgets.
Definition
widget.h:28
asw::ui::Widget::focusable
bool focusable
Whether the widget can receive focus.
Definition
widget.h:66
context.h
UI context and focus management for the ASW UI module.
asw::ui
Definition
button.h:19
asw::Font
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
Definition
types.h:41
asw::TextJustify
TextJustify
Text justification options for text rendering.
Definition
types.h:31
asw::TextJustify::Left
@ Left
asw::Color
RGBA color struct with 8-bit channels.
Definition
color.h:11
types.h
Types used throughout the ASW library.
widget.h
Base widget class for the ASW UI module.
Generated by
1.12.0