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
panel.h
Go to the documentation of this file.
1
8
9
#ifndef ASW_MODULES_UI_PANEL_H
10
#define ASW_MODULES_UI_PANEL_H
11
12
#include "
../types.h
"
13
#include "
context.h
"
14
#include "
widget.h
"
15
16
namespace
asw::ui
{
17
20
class
Panel
:
public
Widget
{
21
public
:
24
Panel
()
25
{
26
focusable
=
false
;
27
}
28
30
asw::Color
bg
{ 0, 0, 0, 0 };
31
33
asw::Texture
bg_image
;
34
39
void
draw
(
Context
& ctx)
override
;
40
};
41
42
}
// namespace asw::ui
43
44
#endif
// ASW_MODULES_UI_PANEL_H
asw::ui::Context
Shared state for the UI system.
Definition
context.h:75
asw::ui::Panel
A container widget with a background color or image.
Definition
panel.h:20
asw::ui::Panel::draw
void draw(Context &ctx) override
Draw the panel and its children.
Definition
panel.cpp:5
asw::ui::Panel::bg
asw::Color bg
The background color.
Definition
panel.h:30
asw::ui::Panel::Panel
Panel()
Default constructor.
Definition
panel.h:24
asw::ui::Panel::bg_image
asw::Texture bg_image
The background image texture.
Definition
panel.h:33
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::Texture
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
Definition
types.h:38
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