FIFE
|
UTF-8 aware version of the TextField class. More...
#include <utf8textfield.h>
Public Member Functions | |
UTF8TextField (const std::string &text="") | |
UTF8TextField constructor. More... | |
virtual | ~UTF8TextField () |
Destructor. More... | |
virtual void | keyPressed (KeyEvent &keyEvent) |
Key pressed handler. More... | |
Protected Attributes | |
UTF8StringEditor * | mStringEditor |
UTF-8 string editor suppor. More... | |
UTF-8 aware version of the TextField class.
Using UTF8StringEditor, it is able to correctly edit UTF-8 text line.
You will also need an UTF-8 aware font to be able to correctly display such text (so gcn::ImageFont can not be used).
Definition at line 48 of file utf8textfield.h.
gcn::UTF8TextField::UTF8TextField | ( | const std::string & | text = "" | ) |
UTF8TextField constructor.
text | Initial text. |
Definition at line 35 of file utf8textfield.cpp.
References mStringEditor.
|
virtual |
|
virtual |
Key pressed handler.
Overides gcn::TextField to handle UTF-8 character codes.
keyEvent | Keyboard event. |
Definition at line 46 of file utf8textfield.cpp.
References gcn::UTF8StringEditor::eraseChar(), gcn::UTF8StringEditor::insertChar(), mStringEditor, gcn::UTF8StringEditor::nextChar(), and gcn::UTF8StringEditor::prevChar().
Referenced by FIFE::CommandLine::keyPressed().
|
protected |
UTF-8 string editor suppor.
It allows the UTF8TextField to easly traverse UTF-8 strings as well as inserting and deleting characters.
Definition at line 78 of file utf8textfield.h.
Referenced by keyPressed(), UTF8TextField(), and ~UTF8TextField().