This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::WidgetEditLine Class

Header: #include <UnigineWidgets.h>
Inherits from: Widget

This class creates an editable single-line text field containing a text string.

See Also#

WidgetEditLine Class

Members

void setText ( const char * text ) #

Sets a new text for the text field.

Arguments

  • const char * text - The contents of the text field.

const char * getText() const#

Returns the current text for the text field.

Return value

Current contents of the text field.

void setSelection ( int selection ) #

Sets a new position from which the selection starts.

Arguments

  • int selection - The position from which the selection starts.

int getSelection() const#

Returns the current position from which the selection starts.

Return value

Current position from which the selection starts.

void setCursor ( int cursor ) #

Sets a new cursor position in the text field.

Arguments

  • int cursor - The cursor position. The set value is saturated in the range from 0 to text field capacity.

int getCursor() const#

Returns the current cursor position in the text field.

Return value

Current cursor position. The set value is saturated in the range from 0 to text field capacity.

void setCapacity ( int capacity ) #

Sets a new maximum length of a string entered into the text field.

Arguments

  • int capacity - The maximum number of characters. The default is 1024.

int getCapacity() const#

Returns the current maximum length of a string entered into the text field.

Return value

Current maximum number of characters. The default is 1024.

void setBackground ( int background ) #

Sets a new value indicating if a background texture is rendered for the text field.

Arguments

  • int background - The positive number if a background texture is rendered; otherwise, 0. The default is 1.

int getBackground() const#

Returns the current value indicating if a background texture is rendered for the text field.

Return value

Current positive number if a background texture is rendered; otherwise, 0. The default is 1.

void setValidator ( int validator ) #

Sets a new validator associated with the text field. The default is VALIDATOR_ANY.

Arguments

  • int validator - The validator, one of the Gui:: Enumeration with VALIDATOR_* prefixes.

int getValidator() const#

Returns the current validator associated with the text field. The default is VALIDATOR_ANY.

Return value

Current validator, one of the Gui:: Enumeration with VALIDATOR_* prefixes.

void setPassword ( ) #

Sets a new value indicating if the text field is a password field (all entered characters are displayed as dots).

Arguments

  • password - The the widget is a password field

isPassword() const#

Returns the current value indicating if the text field is a password field (all entered characters are displayed as dots).

Return value

Current the widget is a password field

void setEditable ( bool editable ) #

Sets a new value indicating if the contents of the text field can be edited.

Arguments

  • bool editable - Set true to enable the text field contents can be edited; false - to disable it.

bool isEditable() const#

Returns the current value indicating if the contents of the text field can be edited.

Return value

true if the text field contents can be edited is enabled; otherwise false.

void setBorderColor ( const const Math::vec4 && color ) #

Sets a new border color for the widget.

Arguments

  • const const Math::vec4 && color - The four-component vector specifying the color in the RGBA format.

const Math::vec4 & getBorderColor() const#

Returns the current border color for the widget.

Return value

Current four-component vector specifying the color in the RGBA format.

void setSelectionColor ( const const Math::vec4 && color ) #

Sets a new color used to highlight the selection for the widget.

Arguments

  • const const Math::vec4 && color - The four-component vector specifying the color in the RGBA format.

const Math::vec4 & getSelectionColor() const#

Returns the current color used to highlight the selection for the widget.

Return value

Current four-component vector specifying the color in the RGBA format.

void setBackgroundColor ( const const Math::vec4 && color ) #

Sets a new background color for the widget.

Arguments

  • const const Math::vec4 && color - The four-component vector specifying the color in the RGBA format.

const Math::vec4 & getBackgroundColor() const#

Returns the current background color for the widget.

Return value

Current four-component vector specifying the color in the RGBA format.

void setStyleTextureBorder ( const char * border ) #

Sets a new path to the texture to be used as a border of the widget.

Arguments

  • const char * border - The path to the texture to be used as a border of the widget.

const char * getStyleTextureBorder() const#

Returns the current path to the texture to be used as a border of the widget.

Return value

Current path to the texture to be used as a border of the widget.

void setStyleTextureBackground ( const char * background ) #

Sets a new path to the texture to be used as a background of the widget.

Arguments

  • const char * background - The path to the texture to be used as a background of the widget.

const char * getStyleTextureBackground() const#

Returns the current path to the texture to be used as a background of the widget.

Return value

Current path to the texture to be used as a background of the widget.

void setStyleTextureSelection ( const char * selection ) #

Sets a new path to the texture to be used as a background for the selected text.

Arguments

  • const char * selection - The path to the texture to be used as a background for the selected text.

const char * getStyleTextureSelection() const#

Returns the current path to the texture to be used as a background for the selected text.

Return value

Current path to the texture to be used as a background for the selected text.

static WidgetEditLinePtr create ( const Ptr<Gui> & gui, const char * str = 0 ) #

Constructor. Creates a text field and adds it to the specified GUI.

Arguments

  • const Ptr<Gui> & gui - GUI, to which the text field will belong.
  • const char * str - Initial value. This is an optional parameter.

static WidgetEditLinePtr create ( const char * str = 0 ) #

Constructor. Creates a text field and adds it to the Engine GUI.

Arguments

  • const char * str - Initial value. This is an optional parameter.

String getSelectionText ( ) const#

Returns currently selected text.

Return value

Currently selected text.

void clearSelectionText ( ) #

Deletes currently selected text.
Last update: 12.07.2024
Build: ()