Класс для работы с кнопками
More...
#include <UI.hpp>
|
| Button (point coord={0, 0}, point size={20, 20}, std::string text="Button", unsigned Margin=DefaultMargin, ksys_color_t ButtonColor=OS::sys_color_table.work_button, ksys_color_t TextColor=OS::sys_color_table.work_text) |
| Это конструктор
|
|
void | init (point coord={0, 0}, point size={0, 0}, std::string text="Button", unsigned Margin=DefaultMargin, ksys_color_t ButtonColor=OS::sys_color_table.work_button, ksys_color_t TextColor=OS::sys_color_table.work_text) |
| инициализировать параметры
|
|
void | render () |
| Отрисовать кнопку
|
|
bool | Handler () |
| Обработчик кнопки
|
|
bool | GetStatus () |
| Получить сосояние кнопки на момент последней обработки
|
|
unsigned | GetId () |
| Получить номер кнопки
|
|
void | Deactivate () |
| Деактивировать кнопку
|
|
void | Activate () |
| Активировать кнопку
|
|
| UIElement (point coord={0, 0}, KolibriLib::point size={16, 16}, unsigned Margin=DefaultMargin) |
|
Класс для работы с кнопками
◆ Button()
KolibriLib::UI::buttons::Button::Button |
( |
point | coord = {0, 0}, |
|
|
point | size = {20, 20}, |
|
|
std::string | text = "Button", |
|
|
unsigned | Margin = DefaultMargin, |
|
|
ksys_color_t | ButtonColor = OS::sys_color_table.work_button, |
|
|
ksys_color_t | TextColor = OS::sys_color_table.work_text ) |
Это конструктор
- Parameters
-
coord | координата |
size | размер |
text | текст |
Margin | отступы текста от границ |
ButtonColor | цвет кнопки |
TextColor | цвет текста |
◆ Activate()
void KolibriLib::UI::buttons::Button::Activate |
( |
| ) |
|
|
inline |
◆ Deactivate()
void KolibriLib::UI::buttons::Button::Deactivate |
( |
| ) |
|
Деактивировать кнопку
функция может выполнятся очень долго, если вы уже создали довольно много кнопок. Это становится действительно важно когда у вас объявленно более 2000 кнопок
◆ GetId()
unsigned KolibriLib::UI::buttons::Button::GetId |
( |
| ) |
|
Получить номер кнопки
- Returns
- _id
◆ GetStatus()
bool KolibriLib::UI::buttons::Button::GetStatus |
( |
| ) |
|
Получить сосояние кнопки на момент последней обработки
- Returns
- _status
◆ Handler()
bool KolibriLib::UI::buttons::Button::Handler |
( |
| ) |
|
Обработчик кнопки
- Returns
- Состояние кнопки(Нажата/Ненажата)
переменную #_status в true если эта кнопка нажата, иначе false
◆ init()
void KolibriLib::UI::buttons::Button::init |
( |
point | coord = {0, 0}, |
|
|
point | size = {0, 0}, |
|
|
std::string | text = "Button", |
|
|
unsigned | Margin = DefaultMargin, |
|
|
ksys_color_t | ButtonColor = OS::sys_color_table.work_button, |
|
|
ksys_color_t | TextColor = OS::sys_color_table.work_text ) |
инициализировать параметры
- Parameters
-
coord | координата |
size | размер |
text | текст |
Margin | отступы текста от границ |
BackgroundColor | цвет кнопки |
TextColor | цвет текста |
The documentation for this class was generated from the following file:
- F:/KolibriOs/Kalc/KolibriOS-Cpp-Lib/src/include/kolibriLib/UI.hpp