#include <Nux/KeyboardHandler.h>
Public Types |
enum | eKeyEntryType {
eAlphaNumeric,
eDecimalNumber,
eIntegerNumber,
eHexadecimalNumber,
eBinaryNumber
} |
Public Member Functions |
| BaseKeyboardHandler () |
virtual | ~BaseKeyboardHandler () |
virtual long | ProcessKey (unsigned long eventType, unsigned long keysym, unsigned long state, TCHAR character, const Geometry &g) |
NString | GetTextLine () const |
t_u32 | GetLength () const |
t_u32 | GetCursorPosition () const |
bool | NeedRedraw () const |
t_s32 | GetPositionX () const |
t_s32 | GetPositionY () const |
void | SetText (const TCHAR *str) |
void | SetText (const tstring &s) |
void | SetText (const NString &s) |
void | ClearText () |
void | PlaceCaret (t_u32 cp) |
void | MoveCursorAtStart () |
void | MoveCursorAtEnd () |
void | SetKeyEntryType (eKeyEntryType keytype) |
eKeyEntryType | GetKeyEntryType () |
void | SetClipRegion (const Geometry &g) |
void | GetTextSelection (t_s32 *start, t_s32 *end) const |
t_s32 | GetTextSelectionStart () const |
t_s32 | GetTextSelectionEnd () const |
NString | GetSelectedText () const |
void | SelectAllText () |
void | UnselectAllText () |
bool | IsTextSelected () |
void | SetPrefix (NString) |
void | SetPostfix (NString) |
void | EnterFocus () |
t_u32 | NextWordPosition (t_u32 cp) |
t_u32 | PrevWordPosition (t_u32 cp) |
void | ResolveCaretPosition (t_s32 x, t_s32 y) |
void | CaretAutoScroll (t_s32 x, t_s32 y, Geometry geo) |
void | MouseDown (t_s32 x, t_s32 y) |
void | MouseUp (t_s32 x, t_s32 y) |
void | MouseDrag (t_s32 x, t_s32 y) |
void | SetFont (ObjectPtr< FontTexture > Font) |
ObjectPtr< FontTexture > | GetFont () const |
Protected Member Functions |
void | DeleteSelectionText () |
void | InsertChar (t_u32 character) |
void | AdjustCursorAndTextPosition () |
Protected Attributes |
ObjectPtr< FontTexture > | m_Font |
NString | m_textline |
t_s32 | m_previous_cursor_position |
bool | m_need_redraw |
t_s32 | m_text_positionx |
t_s32 | m_text_positiony |
Geometry | m_clip_region |
eKeyEntryType | m_KeyType |
t_s32 | m_caret |
| Caret position, in characters.
|
bool | m_insert_mode |
| If true, control is in insert mode. Else, overwrite mode.
|
t_s32 | m_selection_start |
| Starting position of the selection. The caret marks the end.
|
t_s32 | m_first_visible_char |
| First visible character in the edit control.
|
bool | m_entering_focus |
bool | m_mouse_drag |
bool | m_mouse_inside_text_area |
Static Protected Attributes |
static t_s32 | s_jump_offset_at_borders |
static t_s32 | s_cursor_width |
Member Enumeration Documentation
- Enumerator:
eAlphaNumeric |
|
eDecimalNumber |
|
eIntegerNumber |
|
eHexadecimalNumber |
|
eBinaryNumber |
|
Constructor & Destructor Documentation
nux::BaseKeyboardHandler::BaseKeyboardHandler |
( |
| ) |
|
virtual nux::BaseKeyboardHandler::~BaseKeyboardHandler |
( |
| ) |
[virtual] |
Member Function Documentation
void nux::BaseKeyboardHandler::AdjustCursorAndTextPosition |
( |
| ) |
[protected] |
void nux::BaseKeyboardHandler::ClearText |
( |
| ) |
|
void nux::BaseKeyboardHandler::DeleteSelectionText |
( |
| ) |
[protected] |
void nux::BaseKeyboardHandler::EnterFocus |
( |
| ) |
|
t_u32 nux::BaseKeyboardHandler::GetCursorPosition |
( |
| ) |
const [inline] |
t_u32 nux::BaseKeyboardHandler::GetLength |
( |
| ) |
const [inline] |
t_s32 nux::BaseKeyboardHandler::GetPositionX |
( |
| ) |
const [inline] |
t_s32 nux::BaseKeyboardHandler::GetPositionY |
( |
| ) |
const [inline] |
NString nux::BaseKeyboardHandler::GetSelectedText |
( |
| ) |
const |
NString nux::BaseKeyboardHandler::GetTextLine |
( |
| ) |
const [inline] |
void nux::BaseKeyboardHandler::GetTextSelection |
( |
t_s32 * |
start, |
|
|
t_s32 * |
end |
|
) |
| const |
t_s32 nux::BaseKeyboardHandler::GetTextSelectionEnd |
( |
| ) |
const |
t_s32 nux::BaseKeyboardHandler::GetTextSelectionStart |
( |
| ) |
const |
void nux::BaseKeyboardHandler::InsertChar |
( |
t_u32 |
character | ) |
[protected] |
bool nux::BaseKeyboardHandler::IsTextSelected |
( |
| ) |
|
void nux::BaseKeyboardHandler::MouseDown |
( |
t_s32 |
x, |
|
|
t_s32 |
y |
|
) |
| |
void nux::BaseKeyboardHandler::MouseDrag |
( |
t_s32 |
x, |
|
|
t_s32 |
y |
|
) |
| |
void nux::BaseKeyboardHandler::MouseUp |
( |
t_s32 |
x, |
|
|
t_s32 |
y |
|
) |
| |
void nux::BaseKeyboardHandler::MoveCursorAtEnd |
( |
| ) |
|
void nux::BaseKeyboardHandler::MoveCursorAtStart |
( |
| ) |
|
bool nux::BaseKeyboardHandler::NeedRedraw |
( |
| ) |
const [inline] |
t_u32 nux::BaseKeyboardHandler::NextWordPosition |
( |
t_u32 |
cp | ) |
|
void nux::BaseKeyboardHandler::PlaceCaret |
( |
t_u32 |
cp | ) |
|
t_u32 nux::BaseKeyboardHandler::PrevWordPosition |
( |
t_u32 |
cp | ) |
|
virtual long nux::BaseKeyboardHandler::ProcessKey |
( |
unsigned long |
eventType, |
|
|
unsigned long |
keysym, |
|
|
unsigned long |
state, |
|
|
TCHAR |
character, |
|
|
const Geometry & |
g |
|
) |
| [virtual] |
void nux::BaseKeyboardHandler::ResolveCaretPosition |
( |
t_s32 |
x, |
|
|
t_s32 |
y |
|
) |
| |
void nux::BaseKeyboardHandler::SelectAllText |
( |
| ) |
|
void nux::BaseKeyboardHandler::SetClipRegion |
( |
const Geometry & |
g | ) |
|
void nux::BaseKeyboardHandler::SetKeyEntryType |
( |
eKeyEntryType |
keytype | ) |
|
void nux::BaseKeyboardHandler::SetPostfix |
( |
NString |
| ) |
|
void nux::BaseKeyboardHandler::SetPrefix |
( |
NString |
| ) |
|
void nux::BaseKeyboardHandler::SetText |
( |
const TCHAR * |
str | ) |
|
void nux::BaseKeyboardHandler::SetText |
( |
const NString & |
s | ) |
|
void nux::BaseKeyboardHandler::SetText |
( |
const tstring & |
s | ) |
|
void nux::BaseKeyboardHandler::UnselectAllText |
( |
| ) |
|
Field Documentation
First visible character in the edit control.
If true, control is in insert mode. Else, overwrite mode.
Starting position of the selection. The caret marks the end.
When the caret reaches the left or right border of the control and there are more characters to reveals, the caret jumps back in the opposite direction by a number of pixel at the same moment when new characters are revealed.
The documentation for this class was generated from the following file: