Cursor.pkg 1.0 KB

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