Работа с кнопками
More...
|
typedef unsigned int | ButtonID |
|
|
unsigned | GetFreeButtonId () |
| Получить свободный номер id кнопки из списка
|
|
void | FreeButtonId (unsigned id) |
| Освободить номер кнопки
|
|
ButtonID | GetButtonId (unsigned id) |
| Получить id кнопки
|
|
void | CutList () |
|
unsigned | autoDefineButton (const point< int > coords, const Size &size, ksys_color_t color=OS::sys_color_table.work_button) |
| Создать кнопку, автоматически присвоить ей id.
|
|
void | DefineButton (const point< int > &coord, const Size &size, const ButtonID &id, ksys_color_t color=OS::sys_color_table.work_button) |
| Создать кнопку, вручную
|
|
void | DeleteButton (unsigned id) |
| Удалить кнопу
|
|
unsigned | GetPressedButton () |
| проверить какая кнопка нажата
|
|
|
const ButtonID | StartButtonId = 100 |
|
std::vector< ButtonsIdData > | ButtonsIdList |
| Список idшников кнопок
|
|
◆ autoDefineButton()
unsigned KolibriLib::UI::buttons::autoDefineButton |
( |
const point< int > | coords, |
|
|
const Size & | size, |
|
|
ksys_color_t | color = OS::sys_color_table.work_button ) |
|
inline |
Создать кнопку, автоматически присвоить ей id.
- Parameters
-
coords | координаты |
size | размер |
color | цвет |
- Returns
- id созданной кнопки
◆ DefineButton()
void KolibriLib::UI::buttons::DefineButton |
( |
const point< int > & | coord, |
|
|
const Size & | size, |
|
|
const ButtonID & | id, |
|
|
ksys_color_t | color = OS::sys_color_table.work_button ) |
|
inline |
Создать кнопку, вручную
- Parameters
-
coords | координаты |
size | размер |
id | idшник кнопки |
color | цвет |
◆ DeleteButton()
void KolibriLib::UI::buttons::DeleteButton |
( |
unsigned | id | ) |
|
|
inline |
◆ FreeButtonId()
void KolibriLib::UI::buttons::FreeButtonId |
( |
unsigned | id | ) |
|
|
inline |
Освободить номер кнопки
- Parameters
-
◆ GetButtonId()
ButtonID KolibriLib::UI::buttons::GetButtonId |
( |
unsigned | id | ) |
|
|
inline |
Получить id кнопки
- Parameters
-
кнопки выдаваемый системой
- Returns
- ButtonsIdList[id].ID
◆ GetFreeButtonId()
unsigned KolibriLib::UI::buttons::GetFreeButtonId |
( |
| ) |
|
Получить свободный номер id кнопки из списка
функция может выполнятся очень долго, если вы уже создали довольно много кнопок. Это становится действительно важно когда у вас объявленно более 2000 кнопок
- Returns
- номер кнопки из списка ButtonsIdList
◆ GetPressedButton()
unsigned KolibriLib::UI::buttons::GetPressedButton |
( |
| ) |
|
|
inline |
проверить какая кнопка нажата
- Returns
- id нажатой кнопки