LineEdit.pkg 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. $#include "LineEdit.h"
  2. class LineEdit : public BorderImage
  3. {
  4. public:
  5. // Methods:
  6. LineEdit(Context* context);
  7. virtual ~LineEdit();
  8. void SetText(const String& text);
  9. void SetCursorPosition(unsigned position);
  10. void SetCursorBlinkRate(float rate);
  11. void SetMaxLength(unsigned length);
  12. void SetEchoCharacter(unsigned c);
  13. void SetCursorMovable(bool enable);
  14. void SetTextSelectable(bool enable);
  15. void SetTextCopyable(bool enable);
  16. void SetDoubleClickInterval(float interval);
  17. const String& GetText() const;
  18. unsigned GetCursorPosition() const;
  19. float GetCursorBlinkRate() const;
  20. unsigned GetMaxLength() const;
  21. unsigned GetEchoCharacter() const;
  22. bool IsCursorMovable() const;
  23. bool IsTextSelectable() const;
  24. bool IsTextCopyable() const;
  25. Text* GetTextElement() const;
  26. BorderImage* GetCursor() const;
  27. float GetDoubleClickInterval() const;
  28. // Properties:
  29. tolua_property__get_set String& text;
  30. tolua_property__get_set unsigned cursorPosition;
  31. tolua_property__get_set float cursorBlinkRate;
  32. tolua_property__get_set unsigned maxLength;
  33. tolua_property__get_set unsigned echoCharacter;
  34. tolua_property__is_set bool cursorMovable;
  35. tolua_property__is_set bool textSelectable;
  36. tolua_property__is_set bool textCopyable;
  37. tolua_readonly tolua_property__get_set Text* textElement;
  38. tolua_readonly tolua_property__get_set BorderImage* cursor;
  39. tolua_property__get_set float doubleClickInterval;
  40. };