LineEdit.pkg 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. $#include "UI/LineEdit.h"
  2. class LineEdit : public BorderImage
  3. {
  4. LineEdit();
  5. virtual ~LineEdit();
  6. void SetText(const String text);
  7. void SetCursorPosition(unsigned position);
  8. void SetCursorBlinkRate(float rate);
  9. void SetMaxLength(unsigned length);
  10. void SetEchoCharacter(unsigned c);
  11. void SetCursorMovable(bool enable);
  12. void SetTextSelectable(bool enable);
  13. void SetTextCopyable(bool enable);
  14. const String GetText() const;
  15. unsigned GetCursorPosition() const;
  16. float GetCursorBlinkRate() const;
  17. unsigned GetMaxLength() const;
  18. unsigned GetEchoCharacter() const;
  19. bool IsCursorMovable() const;
  20. bool IsTextSelectable() const;
  21. bool IsTextCopyable() const;
  22. Text* GetTextElement() const;
  23. BorderImage* GetCursor() const;
  24. tolua_property__get_set String text;
  25. tolua_property__get_set unsigned cursorPosition;
  26. tolua_property__get_set float cursorBlinkRate;
  27. tolua_property__get_set unsigned maxLength;
  28. tolua_property__get_set unsigned echoCharacter;
  29. tolua_property__is_set bool cursorMovable;
  30. tolua_property__is_set bool textSelectable;
  31. tolua_property__is_set bool textCopyable;
  32. tolua_readonly tolua_property__get_set Text* textElement;
  33. tolua_readonly tolua_property__get_set BorderImage* cursor;
  34. };
  35. ${
  36. #define TOLUA_DISABLE_tolua_UILuaAPI_LineEdit_new00
  37. static int tolua_UILuaAPI_LineEdit_new00(lua_State* tolua_S)
  38. {
  39. return ToluaNewObject<LineEdit>(tolua_S);
  40. }
  41. #define TOLUA_DISABLE_tolua_UILuaAPI_LineEdit_new00_local
  42. static int tolua_UILuaAPI_LineEdit_new00_local(lua_State* tolua_S)
  43. {
  44. return ToluaNewObjectGC<LineEdit>(tolua_S);
  45. }
  46. $}