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/laywin.h> 13%End 14 15 16//--------------------------------------------------------------------------- 17 18enum wxLayoutOrientation 19{ 20 wxLAYOUT_HORIZONTAL, 21 wxLAYOUT_VERTICAL 22}; 23 24enum wxLayoutAlignment 25{ 26 wxLAYOUT_NONE, 27 wxLAYOUT_TOP, 28 wxLAYOUT_LEFT, 29 wxLAYOUT_RIGHT, 30 wxLAYOUT_BOTTOM 31}; 32 33wxEventType wxEVT_QUERY_LAYOUT_INFO /PyName=wxEVT_QUERY_LAYOUT_INFO/; 34 35wxEventType wxEVT_CALCULATE_LAYOUT /PyName=wxEVT_CALCULATE_LAYOUT/; 36 37class wxLayoutAlgorithm : wxObject 38{ 39 %Docstring 40 LayoutAlgorithm() 41 42 wxLayoutAlgorithm implements layout of subwindows in MDI or SDI 43 frames. 44 %End 45 %TypeHeaderCode 46 #include <wx/laywin.h> 47 %End 48 49public: 50 wxLayoutAlgorithm(); 51 52 virtual 53 ~wxLayoutAlgorithm(); 54 55 bool LayoutFrame( 56 wxFrame * frame, 57 wxWindow * mainWindow = NULL 58 ); 59 %Docstring 60 LayoutFrame(frame, mainWindow=None) -> bool 61 62 Lays out the children of a normal frame. 63 %End 64 65 bool LayoutMDIFrame( 66 wxMDIParentFrame * frame, 67 wxRect * rect = NULL 68 ); 69 %Docstring 70 LayoutMDIFrame(frame, rect=None) -> bool 71 72 Lays out the children of an MDI parent frame. 73 %End 74 75 bool LayoutWindow( 76 wxWindow * parent, 77 wxWindow * mainWindow = NULL 78 ); 79 %Docstring 80 LayoutWindow(parent, mainWindow=None) -> bool 81 82 Lays out the children of a normal frame or other window. 83 %End 84 85}; // end of class wxLayoutAlgorithm 86 87 88class wxSashLayoutWindow : wxSashWindow 89{ 90 %Docstring 91 SashLayoutWindow() 92 SashLayoutWindow(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.CLIP_CHILDREN|SW_3D, name="layoutWindow") 93 94 wxSashLayoutWindow responds to OnCalculateLayout events generated by 95 wxLayoutAlgorithm. 96 %End 97 %TypeHeaderCode 98 #include <wx/laywin.h> 99 %End 100 101public: 102 wxSashLayoutWindow(); 103 %PreMethodCode 104 if (!wxPyCheckForApp()) return NULL; 105 %End 106 107 wxSashLayoutWindow( 108 wxWindow * parent /TransferThis/, 109 wxWindowID id = wxID_ANY, 110 const wxPoint & pos = wxDefaultPosition, 111 const wxSize & size = wxDefaultSize, 112 long style = wxCLIP_CHILDREN|wxSW_3D, 113 const wxString & name = "layoutWindow" 114 ); 115 %PreMethodCode 116 if (!wxPyCheckForApp()) return NULL; 117 %End 118 119 bool Create( 120 wxWindow * parent /TransferThis/, 121 wxWindowID id = wxID_ANY, 122 const wxPoint & pos = wxDefaultPosition, 123 const wxSize & size = wxDefaultSize, 124 long style = wxCLIP_CHILDREN|wxSW_3D, 125 const wxString & name = "layoutWindow" 126 ); 127 %Docstring 128 Create(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.CLIP_CHILDREN|SW_3D, name="layoutWindow") -> bool 129 130 Initializes a sash layout window, which can be a child of a frame, 131 dialog or any other non-control window. 132 %End 133 134 wxLayoutAlignment GetAlignment() const; 135 %Docstring 136 GetAlignment() -> LayoutAlignment 137 138 Returns the alignment of the window: one of wxLAYOUT_TOP, 139 wxLAYOUT_LEFT, wxLAYOUT_RIGHT, wxLAYOUT_BOTTOM. 140 %End 141 142 wxLayoutOrientation GetOrientation() const; 143 %Docstring 144 GetOrientation() -> LayoutOrientation 145 146 Returns the orientation of the window: one of wxLAYOUT_HORIZONTAL, 147 wxLAYOUT_VERTICAL. 148 %End 149 150 void OnCalculateLayout( 151 wxCalculateLayoutEvent & event 152 ); 153 %Docstring 154 OnCalculateLayout(event) 155 156 The default handler for the event that is generated by 157 wxLayoutAlgorithm. 158 %End 159 160 void OnQueryLayoutInfo( 161 wxQueryLayoutInfoEvent & event 162 ); 163 %Docstring 164 OnQueryLayoutInfo(event) 165 166 The default handler for the event that is generated by 167 OnCalculateLayout to get size, alignment and orientation information 168 for the window. 169 %End 170 171 void SetAlignment( 172 wxLayoutAlignment alignment 173 ); 174 %Docstring 175 SetAlignment(alignment) 176 177 Sets the alignment of the window (which edge of the available parent 178 client area the window is attached to). 179 %End 180 181 void SetDefaultSize( 182 const wxSize & size 183 ); 184 %Docstring 185 SetDefaultSize(size) 186 187 Sets the default dimensions of the window. 188 %End 189 190 void SetOrientation( 191 wxLayoutOrientation orientation 192 ); 193 %Docstring 194 SetOrientation(orientation) 195 196 Sets the orientation of the window (the direction the window will 197 stretch in, to fill the available parent client area). 198 %End 199 200 public: 201 virtual wxPoint GetClientAreaOrigin() const; 202 virtual bool Validate(); 203 virtual bool TransferDataToWindow(); 204 virtual bool TransferDataFromWindow(); 205 virtual void InitDialog(); 206 virtual bool AcceptsFocus() const; 207 virtual bool AcceptsFocusRecursively() const; 208 virtual bool AcceptsFocusFromKeyboard() const; 209 virtual void AddChild( wxWindowBase *child ); 210 virtual void RemoveChild( wxWindowBase *child ); 211 virtual void InheritAttributes(); 212 virtual bool ShouldInheritColours() const; 213 virtual void OnInternalIdle(); 214 virtual wxWindow *GetMainWindowOfCompositeControl(); 215 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 216 virtual void SetCanFocus(bool canFocus); 217 virtual bool Destroy(); 218 virtual void SetValidator( const wxValidator &validator ); 219 virtual wxValidator* GetValidator(); 220 221 222 protected: 223 virtual bool ProcessEvent(wxEvent & event); 224 virtual void DoEnable(bool enable); 225 virtual void DoGetPosition(int *x, int *y) const; 226 virtual void DoGetSize(int *width, int *height) const; 227 virtual void DoGetClientSize(int *width, int *height) const; 228 virtual wxSize DoGetBestSize() const; 229 virtual wxSize DoGetBestClientSize() const; 230 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 231 virtual void DoSetClientSize(int width, int height); 232 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 233 virtual wxSize DoGetBorderSize() const; 234 virtual void DoMoveWindow(int x, int y, int width, int height); 235 virtual void DoSetWindowVariant( wxWindowVariant variant); 236 virtual wxBorder GetDefaultBorder() const; 237 virtual wxBorder GetDefaultBorderForControl() const; 238 virtual void DoFreeze(); 239 virtual void DoThaw(); 240 virtual bool HasTransparentBackground(); 241 virtual bool TryBefore(wxEvent& event); 242 virtual bool TryAfter(wxEvent& event); 243 244 245 public: 246 247 248 static 249 wxVisualAttributes GetClassDefaultAttributes( 250 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 251 ); 252 %Docstring 253 GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes 254 %End 255 %PreMethodCode 256 if (!wxPyCheckForApp()) return NULL; 257 %End 258 259 public: 260 261 262 %Property(name=Alignment, get=GetAlignment, set=SetAlignment) 263 %Property(name=Orientation, get=GetOrientation, set=SetOrientation) 264}; // end of class wxSashLayoutWindow 265 266 267class wxQueryLayoutInfoEvent : wxEvent 268{ 269 %Docstring 270 QueryLayoutInfoEvent(id=0) 271 272 This event is sent when wxLayoutAlgorithm wishes to get the size, 273 orientation and alignment of a window. 274 %End 275 %TypeHeaderCode 276 #include <wx/laywin.h> 277 %End 278 279public: 280 wxQueryLayoutInfoEvent( 281 wxWindowID id = 0 282 ); 283 284 wxLayoutAlignment GetAlignment() const; 285 %Docstring 286 GetAlignment() -> LayoutAlignment 287 288 Specifies the alignment of the window (which side of the remaining 289 parent client area the window sticks to). 290 %End 291 292 int GetFlags() const; 293 %Docstring 294 GetFlags() -> int 295 296 Returns the flags associated with this event. 297 %End 298 299 wxLayoutOrientation GetOrientation() const; 300 %Docstring 301 GetOrientation() -> LayoutOrientation 302 303 Returns the orientation that the event handler specified to the event 304 object. 305 %End 306 307 int GetRequestedLength() const; 308 %Docstring 309 GetRequestedLength() -> int 310 311 Returns the requested length of the window in the direction of the 312 window orientation. 313 %End 314 315 wxSize GetSize() const; 316 %Docstring 317 GetSize() -> wx.Size 318 319 Returns the size that the event handler specified to the event object 320 as being the requested size of the window. 321 %End 322 323 void SetAlignment( 324 wxLayoutAlignment alignment 325 ); 326 %Docstring 327 SetAlignment(alignment) 328 329 Call this to specify the alignment of the window (which side of the 330 remaining parent client area the window sticks to). 331 %End 332 333 void SetFlags( 334 int flags 335 ); 336 %Docstring 337 SetFlags(flags) 338 339 Sets the flags associated with this event. 340 %End 341 342 void SetOrientation( 343 wxLayoutOrientation orientation 344 ); 345 %Docstring 346 SetOrientation(orientation) 347 348 Call this to specify the orientation of the window. 349 %End 350 351 void SetRequestedLength( 352 int length 353 ); 354 %Docstring 355 SetRequestedLength(length) 356 357 Sets the requested length of the window in the direction of the window 358 orientation. 359 %End 360 361 void SetSize( 362 const wxSize & size 363 ); 364 %Docstring 365 SetSize(size) 366 367 Call this to let the calling code know what the size of the window is. 368 %End 369 370 public: 371 virtual wxEvent* Clone() const /Factory/; 372 373 374 private: 375 wxQueryLayoutInfoEvent& operator=(const wxQueryLayoutInfoEvent&); 376 377 378 public: 379 380 381 %Property(name=Alignment, get=GetAlignment, set=SetAlignment) 382 %Property(name=Flags, get=GetFlags, set=SetFlags) 383 %Property(name=Orientation, get=GetOrientation, set=SetOrientation) 384 %Property(name=RequestedLength, get=GetRequestedLength, set=SetRequestedLength) 385 %Property(name=Size, get=GetSize, set=SetSize) 386}; // end of class wxQueryLayoutInfoEvent 387 388 389class wxCalculateLayoutEvent : wxEvent 390{ 391 %Docstring 392 CalculateLayoutEvent(id=0) 393 394 This event is sent by wxLayoutAlgorithm to calculate the amount of the 395 remaining client area that the window should occupy. 396 %End 397 %TypeHeaderCode 398 #include <wx/laywin.h> 399 %End 400 401public: 402 wxCalculateLayoutEvent( 403 wxWindowID id = 0 404 ); 405 406 int GetFlags() const; 407 %Docstring 408 GetFlags() -> int 409 410 Returns the flags associated with this event. 411 %End 412 413 wxRect GetRect() const; 414 %Docstring 415 GetRect() -> wx.Rect 416 417 Before the event handler is entered, returns the remaining parent 418 client area that the window could occupy. 419 %End 420 421 void SetFlags( 422 int flags 423 ); 424 %Docstring 425 SetFlags(flags) 426 427 Sets the flags associated with this event. 428 %End 429 430 void SetRect( 431 const wxRect & rect 432 ); 433 %Docstring 434 SetRect(rect) 435 436 Call this to specify the new remaining parent client area, after the 437 space occupied by the window has been subtracted. 438 %End 439 440 public: 441 virtual wxEvent* Clone() const /Factory/; 442 443 444 private: 445 wxCalculateLayoutEvent& operator=(const wxCalculateLayoutEvent&); 446 447 448 public: 449 450 451 %Property(name=Flags, get=GetFlags, set=SetFlags) 452 %Property(name=Rect, get=GetRect, set=SetRect) 453}; // end of class wxCalculateLayoutEvent 454 455 456%Extract(id=pycode_adv) 457EVT_QUERY_LAYOUT_INFO = wx.PyEventBinder( wxEVT_QUERY_LAYOUT_INFO ) 458EVT_CALCULATE_LAYOUT = wx.PyEventBinder( wxEVT_CALCULATE_LAYOUT ) 459 460%End 461 462 463//--------------------------------------------------------------------------- 464 465