Cursor.pkg 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. $#include "UI/Cursor.h"
  2. enum CursorShape
  3. {
  4. CS_NORMAL = 0,
  5. CS_IBEAM,
  6. CS_CROSS,
  7. CS_RESIZEVERTICAL,
  8. CS_RESIZEDIAGONAL_TOPRIGHT,
  9. CS_RESIZEHORIZONTAL,
  10. CS_RESIZEDIAGONAL_TOPLEFT,
  11. CS_RESIZE_ALL,
  12. CS_ACCEPTDROP,
  13. CS_REJECTDROP,
  14. CS_BUSY,
  15. CS_BUSY_ARROW,
  16. CS_MAX_SHAPES
  17. };
  18. class Cursor : public BorderImage
  19. {
  20. Cursor();
  21. virtual ~Cursor();
  22. void DefineShape(const String shape, Image* image, const IntRect& imageRect, const IntVector2& hotSpot);
  23. void DefineShape(CursorShape shape, Image* image, const IntRect& imageRect, const IntVector2& hotSpot);
  24. void SetShape(CursorShape shape);
  25. void SetShape(const String shape);
  26. void SetUseSystemShapes(bool enable);
  27. String GetShape() const;
  28. bool GetUseSystemShapes() const;
  29. tolua_property__get_set String shape;
  30. tolua_property__get_set bool useSystemShapes;
  31. };
  32. ${
  33. #define TOLUA_DISABLE_tolua_UILuaAPI_Cursor_new00
  34. static int tolua_UILuaAPI_Cursor_new00(lua_State* tolua_S)
  35. {
  36. return ToluaNewObject<Cursor>(tolua_S);
  37. }
  38. #define TOLUA_DISABLE_tolua_UILuaAPI_Cursor_new00_local
  39. static int tolua_UILuaAPI_Cursor_new00_local(lua_State* tolua_S)
  40. {
  41. return ToluaNewObjectGC<Cursor>(tolua_S);
  42. }
  43. $}