X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..9e477492e29e03c02827b1e42a16cb09a13f5149:/wxPython/src/_sashwin.i?ds=sidebyside diff --git a/wxPython/src/_sashwin.i b/wxPython/src/_sashwin.i index c2de865ace..a38c88ea68 100644 --- a/wxPython/src/_sashwin.i +++ b/wxPython/src/_sashwin.i @@ -15,12 +15,8 @@ //--------------------------------------------------------------------------- -%{ - static const wxChar* wxSashNameStr = wxT("sashWindow"); - DECLARE_DEF_STRING(SashNameStr); - static const wxChar* wxSashLayoutNameStr = wxT("layoutWindow"); - DECLARE_DEF_STRING(SashLayoutNameStr); -%} +MAKE_CONST_WXSTRING2(SashNameStr, wxT("sashWindow")); +MAKE_CONST_WXSTRING2(SashLayoutNameStr, wxT("layoutWindow")); //--------------------------------------------------------------------------- %newgroup; @@ -52,20 +48,22 @@ enum wxSashEdgePosition { // wxSashWindow allows any of its edges to have a sash which can be dragged // to resize the window. The actual content window will be created as a child // of wxSashWindow. +MustHaveApp(wxSashWindow); + class wxSashWindow: public wxWindow { public: - %addtofunc wxSashWindow "self._setOORInfo(self)" - %addtofunc wxSashWindow() "" + %pythonAppend wxSashWindow "self._setOORInfo(self)" + %pythonAppend wxSashWindow() "" - wxSashWindow(wxWindow* parent, wxWindowID id, + wxSashWindow(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const wxString& name = wxPySashNameStr); - %name(PreSashWindow)wxSashWindow(); + %RenameCtor(PreSashWindow, wxSashWindow()); - bool Create(wxWindow* parent, wxWindowID id, + bool Create(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, @@ -114,6 +112,13 @@ public: // Resizes subwindows void SizeWindows(); + + %property(DefaultBorderSize, GetDefaultBorderSize, SetDefaultBorderSize, doc="See `GetDefaultBorderSize` and `SetDefaultBorderSize`"); + %property(ExtraBorderSize, GetExtraBorderSize, SetExtraBorderSize, doc="See `GetExtraBorderSize` and `SetExtraBorderSize`"); + %property(MaximumSizeX, GetMaximumSizeX, SetMaximumSizeX, doc="See `GetMaximumSizeX` and `SetMaximumSizeX`"); + %property(MaximumSizeY, GetMaximumSizeY, SetMaximumSizeY, doc="See `GetMaximumSizeY` and `SetMaximumSizeY`"); + %property(MinimumSizeX, GetMinimumSizeX, SetMinimumSizeX, doc="See `GetMinimumSizeX` and `SetMinimumSizeX`"); + %property(MinimumSizeY, GetMinimumSizeY, SetMinimumSizeY, doc="See `GetMinimumSizeY` and `SetMinimumSizeY`"); }; @@ -140,6 +145,10 @@ public: //// dragging the top below the bottom) void SetDragStatus(wxSashDragStatus status); wxSashDragStatus GetDragStatus() const; + + %property(DragRect, GetDragRect, SetDragRect, doc="See `GetDragRect` and `SetDragRect`"); + %property(DragStatus, GetDragStatus, SetDragStatus, doc="See `GetDragStatus` and `SetDragStatus`"); + %property(Edge, GetEdge, SetEdge, doc="See `GetEdge` and `SetEdge`"); }; @@ -209,6 +218,12 @@ public: void SetAlignment(wxLayoutAlignment align); wxLayoutAlignment GetAlignment() const; + + %property(Alignment, GetAlignment, SetAlignment, doc="See `GetAlignment` and `SetAlignment`"); + %property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`"); + %property(Orientation, GetOrientation, SetOrientation, doc="See `GetOrientation` and `SetOrientation`"); + %property(RequestedLength, GetRequestedLength, SetRequestedLength, doc="See `GetRequestedLength` and `SetRequestedLength`"); + %property(Size, GetSize, SetSize, doc="See `GetSize` and `SetSize`"); }; @@ -225,6 +240,9 @@ public: // Set by the app void SetRect(const wxRect& rect); wxRect GetRect() const; + + %property(Flags, GetFlags, SetFlags, doc="See `GetFlags` and `SetFlags`"); + %property(Rect, GetRect, SetRect, doc="See `GetRect` and `SetRect`"); }; @@ -238,20 +256,22 @@ public: // This is window that can remember alignment/orientation, does its own layout, // and can provide sashes too. Useful for implementing docked windows with sashes in // an IDE-style interface. +MustHaveApp(wxSashLayoutWindow); + class wxSashLayoutWindow: public wxSashWindow { public: - %addtofunc wxSashLayoutWindow "self._setOORInfo(self)" - %addtofunc wxSashLayoutWindow() "" + %pythonAppend wxSashLayoutWindow "self._setOORInfo(self)" + %pythonAppend wxSashLayoutWindow() "" - wxSashLayoutWindow(wxWindow* parent, wxWindowID id, + wxSashLayoutWindow(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, const wxString& name = wxPySashLayoutNameStr); - %name(PreSashLayoutWindow)wxSashLayoutWindow(); + %RenameCtor(PreSashLayoutWindow, wxSashLayoutWindow()); - bool Create(wxWindow* parent, wxWindowID id, + bool Create(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxSW_3D, @@ -262,6 +282,9 @@ public: void SetAlignment(wxLayoutAlignment alignment); void SetDefaultSize(const wxSize& size); void SetOrientation(wxLayoutOrientation orientation); + + %property(Alignment, GetAlignment, SetAlignment, doc="See `GetAlignment` and `SetAlignment`"); + %property(Orientation, GetOrientation, SetOrientation, doc="See `GetOrientation` and `SetOrientation`"); };