KolibriLib
Loading...
Searching...
No Matches
KolibriLib::UI::buttons::TextButton Class Reference

кнопка с тектсом More...

#include <button.hpp>

Inheritance diagram for KolibriLib::UI::buttons::TextButton:
KolibriLib::UI::buttons::EmpetyButton KolibriLib::UI::UIElement

Public Member Functions

 TextButton (const point< unsigned > &coord={0, 0}, const point< unsigned > &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 ()
 Отрисовать кнопку
 
void SetText (const std::string &text)
 Изменить текст на кнопке
 
void SetTextColor (ksys_color_t NewColor)
 
- Public Member Functions inherited from KolibriLib::UI::buttons::EmpetyButton
 EmpetyButton (const point< unsigned > &coord={0, 0}, const point< unsigned > &size={20, 20}, unsigned Margin=DefaultMargin, ksys_color_t ButtonColor=OS::sys_color_table.work_button)
 Это конструктор
 
void init (const point< unsigned > &coord={0, 0}, const point< unsigned > &size={0, 0}, unsigned Margin=DefaultMargin, ksys_color_t ButtonColor=OS::sys_color_table.work_button)
 инициализировать параметры
 
virtual void render ()
 Отрисовать кнопку
 
bool Handler ()
 Обработчик кнопки
 
bool GetStatus ()
 Получить сосояние кнопки на момент последней обработки
 
unsigned GetId ()
 Получить номер кнопки
 
void Deactivate ()
 Деактивировать кнопку
 
void Activate ()
 Активировать кнопку
 
void SetColor (ksys_color_t NewColor)
 
void SetText (std::string NewText)
 
- Public Member Functions inherited from KolibriLib::UI::UIElement
 UIElement (point< unsigned > coord={0, 0}, point< unsigned > size={16, 16}, ksys_color_t MainColor=OS::sys_color_table.frame_area, unsigned Margin=DefaultMargin)
 
bool Hover ()
 Проверяет находится ли курсор мыши на этом элементе
 
void SetSize (const point< unsigned > &NewSize)
 Изменить размер текстовой метки
 
void SetCoord (const point< unsigned > &NewCoords)
 Изменить координаты текстовой метки
 
point< unsigned > GetSize ()
 Получить размер элемента
 
point< unsigned > GetCoord ()
 Получить координаты элемента
 

Additional Inherited Members

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

Detailed Description

кнопка с тектсом

Member Function Documentation

◆ SetText()

void KolibriLib::UI::buttons::TextButton::SetText ( const std::string & text)

Изменить текст на кнопке

Parameters
textновый тект

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