A simple text input field with TTF font. More...
Inherits Label, and IMEDelegate.
Inherited by UICCTextField.
Public Member Functions | |
TextFieldTTF () | |
Default constructor. | |
virtual | ~TextFieldTTF () |
Default destructor. | |
bool | initWithPlaceHolder (const std::string &placeholder, const Size &dimensions, TextHAlignment alignment, const std::string &fontName, float fontSize) |
Initializes the TextFieldTTF with a font name, alignment, dimension and font size. More... | |
bool | initWithPlaceHolder (const std::string &placeholder, const std::string &fontName, float fontSize) |
Creates a TextFieldTTF from placeholder, a fontname and font size. More... | |
virtual bool | attachWithIME () override |
Open keyboard and receive input text. More... | |
virtual bool | detachWithIME () override |
End text input and close keyboard. More... | |
var | detachWithIME () |
End text input and close keyboard. More... | |
local | detachWithIME () |
End text input and close keyboard. More... | |
std::size_t | getCharCount () const |
Query the currently inputed character count. More... | |
local | getCharCount () |
Query the currently inputed character count. More... | |
virtual const Color4B & | getColorSpaceHolder () |
Query the color of place holder. More... | |
var | getColorSpaceHolder () |
Query the color of place holder. More... | |
local | getColorSpaceHolder () |
Query the color of place holder. More... | |
virtual void | setColorSpaceHolder (const Color3B &color) |
Change input placeholder color. More... | |
local | setColorSpaceHolder ( local color) |
Change input placeholder color. More... | |
virtual void | setColorSpaceHolder (const Color4B &color) |
Change the placeholder color. More... | |
local | setColorSpaceHolder ( local color) |
Change the placeholder color. More... | |
virtual void | setTextColor (const Color4B &textColor) override |
Change the color of input text. More... | |
local | setTextColor ( local textColor) |
Change the color of input text. More... | |
virtual void | setString (const std::string &text) override |
Change input text of TextField. More... | |
local | setString ( local text) |
Change input text of TextField. More... | |
virtual void | appendString (const std::string &text) |
Append to input text of TextField. More... | |
local | appendString ( local text) |
Append to input text of TextField. More... | |
virtual const std::string & | getString () const override |
Query the input text of TextField. More... | |
local | getString () |
Query the input text of TextField. More... | |
virtual void | setPlaceHolder (const std::string &text) |
Change placeholder text. More... | |
local | setPlaceHolder ( local text) |
Change placeholder text. More... | |
virtual const std::string & | getPlaceHolder () const |
Query the placeholder string. More... | |
local | getPlaceHolder () |
Query the placeholder string. More... | |
virtual void | setSecureTextEntry (bool value) |
Set enable secure text entry representation. More... | |
local | setSecureTextEntry ( local value) |
Set enable secure text entry representation. More... | |
virtual bool | isSecureTextEntry () const |
Query whether the currently display mode is secure text entry or not. More... | |
local | isSecureTextEntry () |
Query whether the currently display mode is secure text entry or not. More... | |
void | setCursorEnabled (bool enabled) |
Set enable cursor use. | |
local | setCursorEnabled ( local enabled) |
Set enable cursor use. | |
void | setCursorChar (char cursor) |
Set char showing cursor. | |
void | setCursorPosition (std::size_t cursorPosition) |
Set cursor position, if enabled. More... | |
local | setCursorPosition ( local cursorPosition) |
Set cursor position, if enabled. More... | |
void | setCursorFromPoint (const Vec2 &point, const Camera *camera) |
Set cursor position to hit letter, if enabled. More... | |
local | setCursorFromPoint ( local point, local camera) |
Set cursor position to hit letter, if enabled. More... | |
Public Member Functions inherited from IMEDelegate | |
virtual | ~IMEDelegate () |
Default destructor. | |
Static Public Member Functions | |
static TextFieldTTF * | textFieldWithPlaceHolder (const std::string &placeholder, const Size &dimensions, TextHAlignment alignment, const std::string &fontName, float fontSize) |
Creates a TextFieldTTF from placeholder, a fontname, alignment, dimension and font size. More... | |
local | textFieldWithPlaceHolder ( local placeholder, local dimensions, local alignment, local fontName, local fontSize) |
Creates a TextFieldTTF from placeholder, a fontname, alignment, dimension and font size. More... | |
static TextFieldTTF * | textFieldWithPlaceHolder (const std::string &placeholder, const std::string &fontName, float fontSize) |
Creates a TextFieldTTF from placeholder, a fontname and font size. More... | |
A simple text input field with TTF font.
|
static |
Creates a TextFieldTTF from placeholder, a fontname, alignment, dimension and font size.
The place holder string. The size of the TextField. The alignment of the TextField. The font name of the TextField. The font size of the TextField. A TextFieldTTF object.
|
static |
Creates a TextFieldTTF from placeholder, a fontname, alignment, dimension and font size.
The place holder string. The size of the TextField. The alignment of the TextField. The font name of the TextField. The font size of the TextField. A TextFieldTTF object.
|
static |
Creates a TextFieldTTF from placeholder, a fontname and font size.
The place holder string. The font name of the TextField. The font size of the TextField. A TextFieldTTF object.
|
static |
Creates a TextFieldTTF from placeholder, a fontname and font size.
The place holder string. The font name of the TextField. The font size of the TextField. A TextFieldTTF object.
bool initWithPlaceHolder | ( | const std::string & | placeholder, |
const Size & | dimensions, | ||
TextHAlignment | alignment, | ||
const std::string & | fontName, | ||
float | fontSize | ||
) |
Initializes the TextFieldTTF with a font name, alignment, dimension and font size.
The place holder string. The size of the TextField. The alignment of the TextField. The font name of the TextField. The font size of the TextField. If the initialization success, return true; else, return false.
var initWithPlaceHolder | ( | var | placeholder, |
var | dimensions, | ||
var | alignment, | ||
var | fontName, | ||
var | fontSize | ||
) |
Initializes the TextFieldTTF with a font name, alignment, dimension and font size.
The place holder string. The size of the TextField. The alignment of the TextField. The font name of the TextField. The font size of the TextField. If the initialization success, return true; else, return false.
local initWithPlaceHolder | ( | local | placeholder, |
local | dimensions, | ||
local | alignment, | ||
local | fontName, | ||
local | fontSize | ||
) |
Initializes the TextFieldTTF with a font name, alignment, dimension and font size.
The place holder string. The size of the TextField. The alignment of the TextField. The font name of the TextField. The font size of the TextField. If the initialization success, return true; else, return false.
bool initWithPlaceHolder | ( | const std::string & | placeholder, |
const std::string & | fontName, | ||
float | fontSize | ||
) |
Creates a TextFieldTTF from placeholder, a fontname and font size.
The place holder string. The font name of the TextField. The font size of the TextField. If the initialization success, return true; else, return false.
var initWithPlaceHolder | ( | var | placeholder, |
var | fontName, | ||
var | fontSize | ||
) |
Creates a TextFieldTTF from placeholder, a fontname and font size.
The place holder string. The font name of the TextField. The font size of the TextField. If the initialization success, return true; else, return false.
local initWithPlaceHolder | ( | local | placeholder, |
local | fontName, | ||
local | fontSize | ||
) |
Creates a TextFieldTTF from placeholder, a fontname and font size.
The place holder string. The font name of the TextField. The font size of the TextField. If the initialization success, return true; else, return false.
|
overridevirtual |
Open keyboard and receive input text.
If the action success, return true; else return false.
Reimplemented from IMEDelegate.
|
overridevirtual |
Open keyboard and receive input text.
If the action success, return true; else return false.
Reimplemented from IMEDelegate.
|
overridevirtual |
Open keyboard and receive input text.
If the action success, return true; else return false.
Reimplemented from IMEDelegate.
|
overridevirtual |
End text input and close keyboard.
If the action success, return true; else return false.
Reimplemented from IMEDelegate.
|
overridevirtual |
End text input and close keyboard.
If the action success, return true; else return false.
Reimplemented from IMEDelegate.
|
overridevirtual |
End text input and close keyboard.
If the action success, return true; else return false.
Reimplemented from IMEDelegate.
|
inline |
Query the currently inputed character count.
The total input character count.
|
inline |
Query the currently inputed character count.
The total input character count.
|
inline |
Query the currently inputed character count.
The total input character count.
|
virtual |
Query the color of place holder.
The place holder color.
|
virtual |
Query the color of place holder.
The place holder color.
|
virtual |
Query the color of place holder.
The place holder color.
|
virtual |
Change input placeholder color.
A color value in Color3B
.
|
virtual |
Change input placeholder color.
A color value in Color3B
.
|
virtual |
Change input placeholder color.
A color value in Color3B
.
|
virtual |
Change the placeholder color.
The placeholder color in Color4B.
|
virtual |
Change the placeholder color.
The placeholder color in Color4B.
|
virtual |
Change the placeholder color.
The placeholder color in Color4B.
|
overridevirtual |
Change the color of input text.
The text color in Color4B.
|
overridevirtual |
Change the color of input text.
The text color in Color4B.
|
overridevirtual |
Change the color of input text.
The text color in Color4B.
|
overridevirtual |
Change input text of TextField.
The input text of TextField.
|
overridevirtual |
Change input text of TextField.
The input text of TextField.
|
overridevirtual |
Change input text of TextField.
The input text of TextField.
|
virtual |
Append to input text of TextField.
The append text of TextField.
|
virtual |
Append to input text of TextField.
The append text of TextField.
|
virtual |
Append to input text of TextField.
The append text of TextField.
|
overridevirtual |
Query the input text of TextField.
Get the input text of TextField.
|
overridevirtual |
Query the input text of TextField.
Get the input text of TextField.
|
overridevirtual |
Query the input text of TextField.
Get the input text of TextField.
|
virtual |
Change placeholder text.
place holder text displayed when there is no text in the text field. The place holder string.
|
virtual |
Change placeholder text.
place holder text displayed when there is no text in the text field. The place holder string.
|
virtual |
Change placeholder text.
place holder text displayed when there is no text in the text field. The place holder string.
|
virtual |
Query the placeholder string.
The placeholder string.
|
virtual |
Query the placeholder string.
The placeholder string.
|
virtual |
Query the placeholder string.
The placeholder string.
|
virtual |
Set enable secure text entry representation.
If you want to display password in TextField, this option is very helpful. Whether or not to display text with secure text entry.
|
virtual |
Set enable secure text entry representation.
If you want to display password in TextField, this option is very helpful. Whether or not to display text with secure text entry.
|
virtual |
Query whether the currently display mode is secure text entry or not.
Whether current text is displayed as secure text entry.
|
virtual |
Query whether the currently display mode is secure text entry or not.
Whether current text is displayed as secure text entry.
void setCursorPosition | ( | std::size_t | cursorPosition | ) |
Set cursor position, if enabled.
local setCursorPosition | ( | local | cursorPosition | ) |
Set cursor position, if enabled.
Set cursor position to hit letter, if enabled.
local setCursorFromPoint | ( | local | point, |
local | camera | ||
) |
Set cursor position to hit letter, if enabled.