nux-1.14.0
nux::BaseKeyboardHandler Class Reference

List of all members.

Public Types

enum  eKeyEntryType {
  eAlphaNumeric, eDecimalNumber, eIntegerNumber, eHexadecimalNumber,
  eBinaryNumber
}

Public Member Functions

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 QueueDraw () 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< FontTextureGetFont () const

Protected Member Functions

void DeleteSelectionText ()
void InsertChar (t_u32 character)
void AdjustCursorAndTextPosition ()

Protected Attributes

ObjectPtr< FontTexturem_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 = 60
static t_s32 s_cursor_width = 4

Detailed Description

Definition at line 41 of file KeyboardHandler.h.


Member Data Documentation

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.

Definition at line 159 of file KeyboardHandler.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends