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

Форма для ввода текста More...

#include <form.hpp>

Inheritance diagram for KolibriLib::UI::Form:
KolibriLib::UI::UIElement

Public Member Functions

 Form (const Coord &coord={0, 0}, const Size &size={32, 16}, const std::string &BackgroundText="Text...", const Color::Color &FormColor=OS::sys_color_table.work_text, const Color::Color &ButtonTextColor=OS::sys_color_table.work_area, const unsigned &Margin=DefaultMargin)
 конструктор
 
void init (Coord coord={0, 0}, Size size={32, 16}, std::string BackgroundText=" ", Color::Color FormColor=OS::sys_color_table.work_text, Color::Color ButtonTextColor=OS::sys_color_table.work_area, unsigned Margin=DefaultMargin)
 
void Render ()
 Отрисовать форму
 
void Handler ()
 Обработчик
 
bool ButtonHandler ()
 Обработчик кнопки
 
std::string GetInput ()
 Получить введённый текст
 
std::string GetBackgroundText ()
 
Color::Color GetBackgroundColor ()
 
- 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

Форма для ввода текста

Constructor & Destructor Documentation

◆ Form()

KolibriLib::UI::Form::Form ( const Coord & coord = {0, 0},
const Size & size = {32, 16},
const std::string & BackgroundText = "Text...",
const Color::Color & FormColor = OS::sys_color_table.work_text,
const Color::Color & ButtonTextColor = OS::sys_color_table.work_area,
const unsigned & Margin = DefaultMargin )

конструктор

Parameters
coordпозиция в коне
sizeразмеры
BackgroundTextфоновый текст(проподает когда вводится текст)
FormColorцвет рамки формы
BackgroundTextColorцвет фонового текста
Marginотступы рамки от текста

Member Function Documentation

◆ ButtonHandler()

bool KolibriLib::UI::Form::ButtonHandler ( )

Обработчик кнопки

Returns
true если на форму нажали,

◆ GetBackgroundColor()

Color::Color KolibriLib::UI::Form::GetBackgroundColor ( )
Returns

◆ GetBackgroundText()

std::string KolibriLib::UI::Form::GetBackgroundText ( )
Returns

◆ GetInput()

std::string KolibriLib::UI::Form::GetInput ( )

Получить введённый текст

Returns
(текст который ввели в форму)

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