1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _adv.sip 8// 9//--------------------------------------------------------------------------- 10 11%ModuleHeaderCode 12#include <wx/sashwin.h> 13%End 14 15 16//--------------------------------------------------------------------------- 17 18const int wxSW_NOBORDER; 19const int wxSW_BORDER; 20const int wxSW_3DSASH; 21const int wxSW_3DBORDER; 22const int wxSW_3D; 23enum wxSashEdgePosition 24{ 25 wxSASH_TOP, 26 wxSASH_RIGHT, 27 wxSASH_BOTTOM, 28 wxSASH_LEFT, 29 wxSASH_NONE 30}; 31 32enum wxSashDragStatus 33{ 34 wxSASH_STATUS_OK, 35 wxSASH_STATUS_OUT_OF_RANGE 36}; 37 38wxEventType wxEVT_SASH_DRAGGED /PyName=wxEVT_SASH_DRAGGED/; 39 40class wxSashWindow : wxWindow 41{ 42 %Docstring 43 SashWindow() 44 SashWindow(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.CLIP_CHILDREN|SW_3D, name="sashWindow") 45 46 wxSashWindow allows any of its edges to have a sash which can be 47 dragged to resize the window. 48 %End 49 %TypeHeaderCode 50 #include <wx/sashwin.h> 51 %End 52 53public: 54 wxSashWindow(); 55 %PreMethodCode 56 if (!wxPyCheckForApp()) return NULL; 57 %End 58 59 wxSashWindow( 60 wxWindow * parent /TransferThis/, 61 wxWindowID id = wxID_ANY, 62 const wxPoint & pos = wxDefaultPosition, 63 const wxSize & size = wxDefaultSize, 64 long style = wxCLIP_CHILDREN|wxSW_3D, 65 const wxString & name = "sashWindow" 66 ); 67 %PreMethodCode 68 if (!wxPyCheckForApp()) return NULL; 69 %End 70 71 ~wxSashWindow(); 72 73 int GetMaximumSizeX() const; 74 %Docstring 75 GetMaximumSizeX() -> int 76 77 Gets the maximum window size in the x direction. 78 %End 79 80 int GetMaximumSizeY() const; 81 %Docstring 82 GetMaximumSizeY() -> int 83 84 Gets the maximum window size in the y direction. 85 %End 86 87 int GetMinimumSizeX() const; 88 %Docstring 89 GetMinimumSizeX() -> int 90 91 Gets the minimum window size in the x direction. 92 %End 93 94 int GetMinimumSizeY() const; 95 %Docstring 96 GetMinimumSizeY() -> int 97 98 Gets the minimum window size in the y direction. 99 %End 100 101 bool GetSashVisible( 102 wxSashEdgePosition edge 103 ) const; 104 %Docstring 105 GetSashVisible(edge) -> bool 106 107 Returns true if a sash is visible on the given edge, false otherwise. 108 %End 109 110 void SetMaximumSizeX( 111 int min 112 ); 113 %Docstring 114 SetMaximumSizeX(min) 115 116 Sets the maximum window size in the x direction. 117 %End 118 119 void SetMaximumSizeY( 120 int min 121 ); 122 %Docstring 123 SetMaximumSizeY(min) 124 125 Sets the maximum window size in the y direction. 126 %End 127 128 void SetMinimumSizeX( 129 int min 130 ); 131 %Docstring 132 SetMinimumSizeX(min) 133 134 Sets the minimum window size in the x direction. 135 %End 136 137 void SetMinimumSizeY( 138 int min 139 ); 140 %Docstring 141 SetMinimumSizeY(min) 142 143 Sets the minimum window size in the y direction. 144 %End 145 146 void SetSashVisible( 147 wxSashEdgePosition edge, 148 bool visible 149 ); 150 %Docstring 151 SetSashVisible(edge, visible) 152 153 Call this function to make a sash visible or invisible on a particular 154 edge. 155 %End 156 157 int GetEdgeMargin( 158 wxSashEdgePosition edge 159 ) const; 160 %Docstring 161 GetEdgeMargin(edge) -> int 162 163 Get border size. 164 %End 165 166 void SetDefaultBorderSize( 167 int width 168 ); 169 %Docstring 170 SetDefaultBorderSize(width) 171 172 Sets the default sash border size. 173 %End 174 175 int GetDefaultBorderSize() const; 176 %Docstring 177 GetDefaultBorderSize() -> int 178 179 Gets the default sash border size. 180 %End 181 182 void SetExtraBorderSize( 183 int width 184 ); 185 %Docstring 186 SetExtraBorderSize(width) 187 188 Sets the additional border size between child and sash window. 189 %End 190 191 int GetExtraBorderSize() const; 192 %Docstring 193 GetExtraBorderSize() -> int 194 195 Gets the addition border size between child and sash window. 196 %End 197 198 wxSashEdgePosition SashHitTest( 199 int x, 200 int y, 201 int tolerance = 2 202 ); 203 %Docstring 204 SashHitTest(x, y, tolerance=2) -> SashEdgePosition 205 206 Tests for x, y over sash. 207 %End 208 209 void SizeWindows(); 210 %Docstring 211 SizeWindows() 212 213 Resizes subwindows. 214 %End 215 216 public: 217 virtual wxPoint GetClientAreaOrigin() const; 218 virtual bool Validate(); 219 virtual bool TransferDataToWindow(); 220 virtual bool TransferDataFromWindow(); 221 virtual void InitDialog(); 222 virtual bool AcceptsFocus() const; 223 virtual bool AcceptsFocusRecursively() const; 224 virtual bool AcceptsFocusFromKeyboard() const; 225 virtual void AddChild( wxWindowBase *child ); 226 virtual void RemoveChild( wxWindowBase *child ); 227 virtual void InheritAttributes(); 228 virtual bool ShouldInheritColours() const; 229 virtual void OnInternalIdle(); 230 virtual wxWindow *GetMainWindowOfCompositeControl(); 231 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 232 virtual void SetCanFocus(bool canFocus); 233 virtual bool Destroy(); 234 virtual void SetValidator( const wxValidator &validator ); 235 virtual wxValidator* GetValidator(); 236 237 238 protected: 239 virtual bool ProcessEvent(wxEvent & event); 240 virtual void DoEnable(bool enable); 241 virtual void DoGetPosition(int *x, int *y) const; 242 virtual void DoGetSize(int *width, int *height) const; 243 virtual void DoGetClientSize(int *width, int *height) const; 244 virtual wxSize DoGetBestSize() const; 245 virtual wxSize DoGetBestClientSize() const; 246 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 247 virtual void DoSetClientSize(int width, int height); 248 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 249 virtual wxSize DoGetBorderSize() const; 250 virtual void DoMoveWindow(int x, int y, int width, int height); 251 virtual void DoSetWindowVariant( wxWindowVariant variant); 252 virtual wxBorder GetDefaultBorder() const; 253 virtual wxBorder GetDefaultBorderForControl() const; 254 virtual void DoFreeze(); 255 virtual void DoThaw(); 256 virtual bool HasTransparentBackground(); 257 virtual bool TryBefore(wxEvent& event); 258 virtual bool TryAfter(wxEvent& event); 259 260 261 public: 262 263 264 static 265 wxVisualAttributes GetClassDefaultAttributes( 266 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 267 ); 268 %Docstring 269 GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes 270 %End 271 %PreMethodCode 272 if (!wxPyCheckForApp()) return NULL; 273 %End 274 275 public: 276 277 278 %Property(name=DefaultBorderSize, get=GetDefaultBorderSize, set=SetDefaultBorderSize) 279 %Property(name=ExtraBorderSize, get=GetExtraBorderSize, set=SetExtraBorderSize) 280 %Property(name=MaximumSizeX, get=GetMaximumSizeX, set=SetMaximumSizeX) 281 %Property(name=MaximumSizeY, get=GetMaximumSizeY, set=SetMaximumSizeY) 282 %Property(name=MinimumSizeX, get=GetMinimumSizeX, set=SetMinimumSizeX) 283 %Property(name=MinimumSizeY, get=GetMinimumSizeY, set=SetMinimumSizeY) 284}; // end of class wxSashWindow 285 286 287class wxSashEvent : wxCommandEvent 288{ 289 %Docstring 290 SashEvent(id=0, edge=SASH_NONE) 291 292 A sash event is sent when the sash of a wxSashWindow has been dragged 293 by the user. 294 %End 295 %TypeHeaderCode 296 #include <wx/sashwin.h> 297 %End 298 299public: 300 wxSashEvent( 301 int id = 0, 302 wxSashEdgePosition edge = wxSASH_NONE 303 ); 304 305 wxRect GetDragRect() const; 306 %Docstring 307 GetDragRect() -> wx.Rect 308 309 Returns the rectangle representing the new size the window would be if 310 the resize was applied. 311 %End 312 313 wxSashDragStatus GetDragStatus() const; 314 %Docstring 315 GetDragStatus() -> SashDragStatus 316 317 Returns the status of the sash: one of wxSASH_STATUS_OK, 318 wxSASH_STATUS_OUT_OF_RANGE. 319 %End 320 321 wxSashEdgePosition GetEdge() const; 322 %Docstring 323 GetEdge() -> SashEdgePosition 324 325 Returns the dragged edge. 326 %End 327 328 void SetEdge( 329 wxSashEdgePosition edge 330 ); 331 %Docstring 332 SetEdge(edge) 333 %End 334 335 void SetDragRect( 336 const wxRect & rect 337 ); 338 %Docstring 339 SetDragRect(rect) 340 %End 341 342 void SetDragStatus( 343 wxSashDragStatus status 344 ); 345 %Docstring 346 SetDragStatus(status) 347 %End 348 349 public: 350 virtual wxEvent* Clone() const /Factory/; 351 352 353 private: 354 wxSashEvent& operator=(const wxSashEvent&); 355 356 357 public: 358 359 360 %Property(name=DragRect, get=GetDragRect, set=SetDragRect) 361 %Property(name=DragStatus, get=GetDragStatus, set=SetDragStatus) 362 %Property(name=Edge, get=GetEdge, set=SetEdge) 363}; // end of class wxSashEvent 364 365 366%Extract(id=pycode_adv) 367EVT_SASH_DRAGGED = wx.PyEventBinder( wxEVT_SASH_DRAGGED, 1 ) 368EVT_SASH_DRAGGED_RANGE = wx.PyEventBinder( wxEVT_SASH_DRAGGED, 2 ) 369 370%End 371 372 373//--------------------------------------------------------------------------- 374 375