Window.pkg 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. $#include "UI/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. void SetModalAutoDismiss(bool enable);
  29. bool IsMovable() const;
  30. bool IsResizable() const;
  31. bool GetFixedWidthResizing() const;
  32. bool GetFixedHeightResizing() const;
  33. const IntRect& GetResizeBorder() const;
  34. bool IsModal() const;
  35. const Color& GetModalShadeColor() const;
  36. const Color& GetModalFrameColor() const;
  37. const IntVector2& GetModalFrameSize() const;
  38. bool GetModalAutoDismiss() const;
  39. tolua_property__is_set bool movable;
  40. tolua_property__is_set bool resizable;
  41. tolua_property__get_set bool fixedWidthResizing;
  42. tolua_property__get_set bool fixedHeightResizing;
  43. tolua_property__get_set IntRect& resizeBorder;
  44. tolua_property__is_set bool modal;
  45. tolua_property__get_set Color& modalShadeColor;
  46. tolua_property__get_set Color& modalFrameColor;
  47. tolua_property__get_set IntVector2& modalFrameSize;
  48. tolua_property__get_set bool modalAutoDismiss;
  49. };
  50. ${
  51. #define TOLUA_DISABLE_tolua_UILuaAPI_Window_new00
  52. static int tolua_UILuaAPI_Window_new00(lua_State* tolua_S)
  53. {
  54. return ToluaNewObject<Window>(tolua_S);
  55. }
  56. #define TOLUA_DISABLE_tolua_UILuaAPI_Window_new00_local
  57. static int tolua_UILuaAPI_Window_new00_local(lua_State* tolua_S)
  58. {
  59. return ToluaNewObjectGC<Window>(tolua_S);
  60. }
  61. $}