Текстовая метка
More...
#include <text.hpp>
|
| TextLabel (const Coord &coord={0, 0}, const Size &size={16, 16}, const std::string &text="Text", const unsigned &FontSize=9, bool TextScale=true, const Color::Color &TextColor=OS::sys_color_table.work_text, const unsigned &Margin=0) |
| Конструктор
|
|
void | Render () |
| Отрисовать текстовую метку
|
|
std::string | GetText () |
| Получить текст
|
|
unsigned | GetFontSize () |
| Получить Размер шрифта
|
|
Color::Color | GetTextColor () |
| Получить цвет текста
|
|
void | SetText (const std::string &NewText) |
| Изменить текст
|
|
void | SetFontSize (const unsigned &NewTextSize) |
| Изменить рамер текста
|
|
void | SetScale (bool scale) |
| Изменить значение переменной _TextScale.
|
|
void | init (Coord coord, Size size, std::string text, unsigned FontSize, Color::Color TextColor) |
|
| 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 () |
|
UIElement & | operator= (const UIElement &Element) |
|
◆ TextLabel()
KolibriLib::UI::text::TextLabel::TextLabel |
( |
const Coord & | coord = {0, 0}, |
|
|
const Size & | size = {16, 16}, |
|
|
const std::string & | text = "Text", |
|
|
const unsigned & | FontSize = 9, |
|
|
bool | TextScale = true, |
|
|
const Color::Color & | TextColor = OS::sys_color_table.work_text, |
|
|
const unsigned & | Margin = 0 ) |
Конструктор
- Parameters
-
coord | координата |
size | Рамер элемента, игнорируется если TextScale = false |
text | Текст текста |
FontSize | Размер текста |
TextScale | Маштабировать текст, чтобы он не выходил за границы элемента |
Margin | Отступы от границ |
◆ GetFontSize()
unsigned KolibriLib::UI::text::TextLabel::GetFontSize |
( |
| ) |
|
◆ GetText()
std::string KolibriLib::UI::text::TextLabel::GetText |
( |
| ) |
|
Получить текст
- Returns
- _text
◆ GetTextColor()
Color::Color KolibriLib::UI::text::TextLabel::GetTextColor |
( |
| ) |
|
◆ SetFontSize()
void KolibriLib::UI::text::TextLabel::SetFontSize |
( |
const unsigned & | NewTextSize | ) |
|
Изменить рамер текста
- Parameters
-
NewTextSize | Новый размер текста (в px) |
◆ SetScale()
void KolibriLib::UI::text::TextLabel::SetScale |
( |
bool | scale | ) |
|
◆ SetText()
void KolibriLib::UI::text::TextLabel::SetText |
( |
const std::string & | NewText | ) |
|
Изменить текст
- Parameters
-
The documentation for this class was generated from the following file:
- F:/KolibriOs/KolibriOS-Cpp-Lib/src/include/kolibriLib/text.hpp