Window.pkg 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. $#include "Window.h"
  2. enum WindowDragMode
  3. {
  4. DRAG_NONE,
  5. DRAG_MOVE,
  6. DRAG_RESIZE_TOPLEFT,
  7. DRAG_RESIZE_TOP,
  8. DRAG_RESIZE_TOPRIGHT,
  9. DRAG_RESIZE_RIGHT,
  10. DRAG_RESIZE_BOTTOMRIGHT,
  11. DRAG_RESIZE_BOTTOM,
  12. DRAG_RESIZE_BOTTOMLEFT,
  13. DRAG_RESIZE_LEFT
  14. };
  15. class Window : public BorderImage
  16. {
  17. Window();
  18. virtual ~Window();
  19. void SetMovable(bool enable);
  20. void SetResizable(bool enable);
  21. void SetFixedWidthResizing(bool enable);
  22. void SetFixedHeightResizing(bool enable);
  23. void SetResizeBorder(const IntRect& rect);
  24. void SetModal(bool modal);
  25. void SetModalShadeColor(const Color& color);
  26. void SetModalFrameColor(const Color& color);
  27. void SetModalFrameSize(const IntVector2& size);
  28. bool IsMovable() const;
  29. bool IsResizable() const;
  30. bool GetFixedWidthResizing() const;
  31. bool GetFixedHeightResizing() const;
  32. const IntRect& GetResizeBorder() const;
  33. bool IsModal() const;
  34. const Color& GetModalShadeColor() const;
  35. const Color& GetModalFrameColor() const;
  36. const IntVector2& GetModalFrameSize() const;
  37. tolua_property__is_set bool movable;
  38. tolua_property__is_set bool resizable;
  39. tolua_property__get_set bool fixedWidthResizing;
  40. tolua_property__get_set bool fixedHeightResizing;
  41. tolua_property__get_set IntRect& resizeBorder;
  42. tolua_property__is_set bool modal;
  43. tolua_property__get_set Color& modalShadeColor;
  44. tolua_property__get_set Color& modalFrameColor;
  45. tolua_property__get_set IntVector2& modalFrameSize;
  46. };
  47. ${
  48. #define TOLUA_DISABLE_tolua_UILuaAPI_Window_new00
  49. static int tolua_UILuaAPI_Window_new00(lua_State* tolua_S)
  50. {
  51. return ToluaNewObject<Window>(tolua_S);
  52. }
  53. #define TOLUA_DISABLE_tolua_UILuaAPI_Window_new00_local
  54. static int tolua_UILuaAPI_Window_new00_local(lua_State* tolua_S)
  55. {
  56. return ToluaNewObjectGC<Window>(tolua_S);
  57. }
  58. $}