KolibriLib
Loading...
Searching...
No Matches
KolibriLib::UI::CheckBox Class Reference

Класс для работы с чекбоксами More...

#include <checkbox.hpp>

Inheritance diagram for KolibriLib::UI::CheckBox:
KolibriLib::UI::buttons::Button KolibriLib::UI::UIElement

Public Types

enum  style { Default , Circle , Smoth }
 Стиль Чекбокса More...
 
- Public Types inherited from KolibriLib::UI::buttons::Button
enum  Type { Image = 0 , Text }
 

Public Member Functions

 CheckBox (const Coord &coord={0, 0}, const Size &size={32, 16}, const int &style=0, const Color::Color &CheckBoxBorderColor=OS::sys_color_table.work_text, const Color::Color &BackgroundColor=OS::sys_color_table.work_area, const unsigned &Margin=DefaultMargin)
 
void Render ()
 
bool Handler ()
 Обработчик кнопки
 
- Public Member Functions inherited from KolibriLib::UI::buttons::Button
 Button (const Coord &coord={0, 0}, const Size &size={20, 20}, unsigned Margin=UI::DefaultMargin, Color::Color ButtonColor=OS::sys_color_table.work_button)
 Это конструктор
 
void init (const Coord &coord={0, 0}, const Size &size={0, 0}, const std::string &text="button", const unsigned &Margin=UI::DefaultMargin, const Color::Color &ButtonColor=OS::sys_color_table.work_button)
 инициализировать параметры
 
void init (const Coord &coord={0, 0}, const Size &size={0, 0}, const Images::image &image=Images::image(), const unsigned &Margin=DefaultMargin, const Color::Color &ButtonColor=OS::sys_color_table.work_button)
 инициализировать параметры
 
void init (const Coord &coord={0, 0}, const Size &size={0, 0}, std::string Path=DefaultImage)
 инициализировать параметры
 
void Render ()
 Отрисовать кнопку
 
bool Handler ()
 Обработчик кнопки
 
bool GetStatus ()
 Получить сосояние кнопки на момент последней обработки
 
ButtonID GetId ()
 Получить номер кнопки
 
void Deactivate ()
 Деактивировать кнопку
 
void Activate ()
 Активировать кнопку
 
unsigned GetType ()
 Возвращает тип данных используемых в кнопке _type.
 
std::string GetTextLabel ()
 Возвращает текст кнопки
 
Images::image GetImage ()
 Получить изображение кнопки
 
void SetText (std::string NewText)
 Изменить текст кнопки
 
 ~Button ()
 Декструктор
 
Buttonoperator= (const Button &butt)
 
- Public Member Functions inherited from KolibriLib::UI::UIElement
 UIElement (const Coord &coord={0, 0}, const Size &size={16, 16}, const Color::Color &MainColor=0, const unsigned &Margin=DefaultMargin)
 
Size GetSize ()
 
void SetSize (Size NewSize)
 
unsigned GetMargin ()
 
Color::Color GetColor ()
 Получить осносной цвет элемента
 
void SetColor (Color::Color NewColor)
 
void SetCoord (Coord NewCoord)
 
Coord GetCoord ()
 
UIElementoperator= (const UIElement &Element)
 

Additional Inherited Members

- Protected Attributes inherited from KolibriLib::UI::UIElement
Coord _coord
 Координаты
 
Size _size
 Размер
 
Color::Color _MainColor
 
unsigned _Margin
 Отступы
 

Detailed Description

Класс для работы с чекбоксами

просто чекбокс, ему можно задать различные стили

Member Enumeration Documentation

◆ style

Стиль Чекбокса

Enumerator
Default 

По вид умолчанию, квадрат

Circle 

В виде круга

Smoth 

Квадрат с со сглаженными углами

Warning
Не реализованно (пока что)

The documentation for this class was generated from the following file: