20#ifndef HEADER_TEXTBOX_HPP
21#define HEADER_TEXTBOX_HPP
25#include "guiengine/widget.hpp"
26#include "utils/leak_check.hpp"
27#include "utils/ptr_vector.hpp"
35 TBT_CAP_SENTENCES = 1,
45 virtual void onTextUpdated() = 0;
46 virtual bool onEnterPressed(
const irr::core::stringw& text) {
return false; }
69 setWithinATextBox(
false);
73 void addItem(
const char* item);
75 virtual EventPropagation
focused(
const int playerID);
76 virtual void unfocused(
const int playerID, Widget* new_focus);
78 void addListener(ITextBoxWidgetListener* listener);
79 void clearListeners();
81 irr::core::stringw getText()
const;
82 void setPasswordBox(
bool passwordBox,
wchar_t passwordChar = L
'*');
83 void setTextBoxType(TextBoxType t);
89 virtual EventPropagation onActivationInput(
const int playerID);
90 virtual EventPropagation
rightPressed(
const int playerID);
91 virtual EventPropagation
leftPressed (
const int playerID);
Definition: text_box_widget.hpp:42
A text field widget.
Definition: text_box_widget.hpp:53
virtual void elementRemoved()
Called when irrLicht widgets cleared.
Definition: text_box_widget.cpp:200
virtual void setActive(bool active=true)
Override method from base class Widget.
Definition: text_box_widget.cpp:214
virtual int getWidthNeededAroundLabel() const
When inferring widget size from its label length, this method will be called to if/how much space mus...
Definition: text_box_widget.hpp:56
virtual int getHeightNeededAroundLabel() const
When inferring widget size from its label length, this method will be called to if/how much space mus...
Definition: text_box_widget.hpp:60
virtual EventPropagation rightPressed(const int playerID)
called when right key is pressed and focus is on widget.
Definition: text_box_widget.cpp:241
virtual void unfocused(const int playerID, Widget *new_focus)
override in children if you need to know when the widget is unfocused.
Definition: text_box_widget.cpp:189
void add()
Create and add the irrLicht widget(s) associated with this object.
Definition: text_box_widget.cpp:112
virtual EventPropagation leftPressed(const int playerID)
called when left key is pressed and focus is on widget.
Definition: text_box_widget.cpp:251
virtual EventPropagation focused(const int playerID)
override in children if you need to know when the widget is focused.
Definition: text_box_widget.cpp:177
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33