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 _core.sip 8// 9//--------------------------------------------------------------------------- 10 11%ModuleHeaderCode 12#include <wx/splitter.h> 13%End 14 15 16//--------------------------------------------------------------------------- 17 18const int wxSP_NOBORDER; 19const int wxSP_THIN_SASH; 20const int wxSP_NOSASH; 21const int wxSP_PERMIT_UNSPLIT; 22const int wxSP_LIVE_UPDATE; 23const int wxSP_3DSASH; 24const int wxSP_3DBORDER; 25const int wxSP_NO_XP_THEME; 26const int wxSP_BORDER; 27const int wxSP_3D; 28enum wxSplitMode 29{ 30 wxSPLIT_HORIZONTAL, 31 wxSPLIT_VERTICAL 32}; 33 34enum 35{ 36 wxSPLIT_DRAG_NONE, 37 wxSPLIT_DRAG_DRAGGING, 38 wxSPLIT_DRAG_LEFT_DOWN 39}; 40 41wxEventType wxEVT_SPLITTER_SASH_POS_CHANGED /PyName=wxEVT_SPLITTER_SASH_POS_CHANGED/; 42 43wxEventType wxEVT_SPLITTER_SASH_POS_CHANGING /PyName=wxEVT_SPLITTER_SASH_POS_CHANGING/; 44 45wxEventType wxEVT_SPLITTER_DOUBLECLICKED /PyName=wxEVT_SPLITTER_DOUBLECLICKED/; 46 47wxEventType wxEVT_SPLITTER_UNSPLIT /PyName=wxEVT_SPLITTER_UNSPLIT/; 48 49class wxSplitterWindow : wxWindow 50{ 51 %Docstring 52 SplitterWindow() 53 SplitterWindow(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=SP_3D, name="splitterWindow") 54 55 This class manages up to two subwindows. 56 %End 57 %TypeHeaderCode 58 #include <wx/splitter.h> 59 %End 60 61public: 62 wxSplitterWindow(); 63 %PreMethodCode 64 if (!wxPyCheckForApp()) return NULL; 65 %End 66 67 wxSplitterWindow( 68 wxWindow * parent /TransferThis/, 69 wxWindowID id = wxID_ANY, 70 const wxPoint & pos = wxDefaultPosition, 71 const wxSize & size = wxDefaultSize, 72 long style = wxSP_3D, 73 const wxString & name = "splitterWindow" 74 ); 75 %PreMethodCode 76 if (!wxPyCheckForApp()) return NULL; 77 %End 78 79 ~wxSplitterWindow(); 80 81 bool Create( 82 wxWindow * parent /TransferThis/, 83 wxWindowID id = wxID_ANY, 84 const wxPoint & point = wxDefaultPosition, 85 const wxSize & size = wxDefaultSize, 86 long style = wxSP_3D, 87 const wxString & name = "splitter" 88 ); 89 %Docstring 90 Create(parent, id=ID_ANY, point=DefaultPosition, size=DefaultSize, style=SP_3D, name="splitter") -> bool 91 92 Creation function, for two-step construction. 93 %End 94 95 int GetMinimumPaneSize() const; 96 %Docstring 97 GetMinimumPaneSize() -> int 98 99 Returns the current minimum pane size (defaults to zero). 100 %End 101 102 double GetSashGravity() const; 103 %Docstring 104 GetSashGravity() -> double 105 106 Returns the current sash gravity. 107 %End 108 109 int GetSashPosition() const; 110 %Docstring 111 GetSashPosition() -> int 112 113 Returns the current sash position. 114 %End 115 116 int GetSashSize() const; 117 %Docstring 118 GetSashSize() -> int 119 120 Returns the default sash size in pixels or 0 if it is invisible. 121 %End 122 123 int GetDefaultSashSize() const; 124 %Docstring 125 GetDefaultSashSize() -> int 126 127 Returns the default sash size in pixels. 128 %End 129 130 wxSplitMode GetSplitMode() const; 131 %Docstring 132 GetSplitMode() -> SplitMode 133 134 Gets the split mode. 135 %End 136 137 wxWindow * GetWindow1() const; 138 %Docstring 139 GetWindow1() -> Window 140 141 Returns the left/top or only pane. 142 %End 143 144 wxWindow * GetWindow2() const; 145 %Docstring 146 GetWindow2() -> Window 147 148 Returns the right/bottom pane. 149 %End 150 151 void Initialize( 152 wxWindow * window 153 ); 154 %Docstring 155 Initialize(window) 156 157 Initializes the splitter window to have one pane. 158 %End 159 160 bool IsSashInvisible() const; 161 %Docstring 162 IsSashInvisible() -> bool 163 164 Returns true if the sash is invisible even when the window is split, 165 false otherwise. 166 %End 167 168 bool IsSplit() const; 169 %Docstring 170 IsSplit() -> bool 171 172 Returns true if the window is split, false otherwise. 173 %End 174 175 bool ReplaceWindow( 176 wxWindow * winOld, 177 wxWindow * winNew 178 ); 179 %Docstring 180 ReplaceWindow(winOld, winNew) -> bool 181 182 This function replaces one of the windows managed by the 183 wxSplitterWindow with another one. 184 %End 185 186 void SetMinimumPaneSize( 187 int paneSize 188 ); 189 %Docstring 190 SetMinimumPaneSize(paneSize) 191 192 Sets the minimum pane size. 193 %End 194 195 void SetSashGravity( 196 double gravity 197 ); 198 %Docstring 199 SetSashGravity(gravity) 200 201 Sets the sash gravity. 202 %End 203 204 void SetSashPosition( 205 int position, 206 bool redraw = true 207 ); 208 %Docstring 209 SetSashPosition(position, redraw=True) 210 211 Sets the sash position. 212 %End 213 214 void SetSashSize( 215 int size 216 ); 217 %Docstring 218 SetSashSize(size) 219 220 Returns the default sash size in pixels or 0 if it is invisible. 221 %End 222 223 void SetSplitMode( 224 int mode 225 ); 226 %Docstring 227 SetSplitMode(mode) 228 229 Sets the split mode. 230 %End 231 232 void SetSashInvisible( 233 bool invisible = true 234 ); 235 %Docstring 236 SetSashInvisible(invisible=True) 237 238 Sets whether the sash should be invisible, even when the window is 239 split. 240 %End 241 242 bool SplitHorizontally( 243 wxWindow * window1, 244 wxWindow * window2, 245 int sashPosition = 0 246 ); 247 %Docstring 248 SplitHorizontally(window1, window2, sashPosition=0) -> bool 249 250 Initializes the top and bottom panes of the splitter window. 251 %End 252 253 bool SplitVertically( 254 wxWindow * window1, 255 wxWindow * window2, 256 int sashPosition = 0 257 ); 258 %Docstring 259 SplitVertically(window1, window2, sashPosition=0) -> bool 260 261 Initializes the left and right panes of the splitter window. 262 %End 263 264 bool Unsplit( 265 wxWindow * toRemove = NULL 266 ); 267 %Docstring 268 Unsplit(toRemove=None) -> bool 269 270 Unsplits the window. 271 %End 272 273 void UpdateSize(); 274 %Docstring 275 UpdateSize() 276 277 Causes any pending sizing of the sash and child panes to take place 278 immediately. 279 %End 280 281 public: 282 virtual wxPoint GetClientAreaOrigin() const; 283 virtual bool Validate(); 284 virtual bool TransferDataToWindow(); 285 virtual bool TransferDataFromWindow(); 286 virtual void InitDialog(); 287 virtual bool AcceptsFocus() const; 288 virtual bool AcceptsFocusRecursively() const; 289 virtual bool AcceptsFocusFromKeyboard() const; 290 virtual void AddChild( wxWindowBase *child ); 291 virtual void RemoveChild( wxWindowBase *child ); 292 virtual void InheritAttributes(); 293 virtual bool ShouldInheritColours() const; 294 virtual void OnInternalIdle(); 295 virtual wxWindow *GetMainWindowOfCompositeControl(); 296 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 297 virtual void SetCanFocus(bool canFocus); 298 virtual bool Destroy(); 299 virtual void SetValidator( const wxValidator &validator ); 300 virtual wxValidator* GetValidator(); 301 302 303 protected: 304 virtual bool ProcessEvent(wxEvent & event); 305 virtual void DoEnable(bool enable); 306 virtual void DoGetPosition(int *x, int *y) const; 307 virtual void DoGetSize(int *width, int *height) const; 308 virtual void DoGetClientSize(int *width, int *height) const; 309 virtual wxSize DoGetBestSize() const; 310 virtual wxSize DoGetBestClientSize() const; 311 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 312 virtual void DoSetClientSize(int width, int height); 313 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 314 virtual wxSize DoGetBorderSize() const; 315 virtual void DoMoveWindow(int x, int y, int width, int height); 316 virtual void DoSetWindowVariant( wxWindowVariant variant); 317 virtual wxBorder GetDefaultBorder() const; 318 virtual wxBorder GetDefaultBorderForControl() const; 319 virtual void DoFreeze(); 320 virtual void DoThaw(); 321 virtual bool HasTransparentBackground(); 322 virtual bool TryBefore(wxEvent& event); 323 virtual bool TryAfter(wxEvent& event); 324 325 326 public: 327 328 329 static 330 wxVisualAttributes GetClassDefaultAttributes( 331 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 332 ); 333 %Docstring 334 GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes 335 %End 336 %PreMethodCode 337 if (!wxPyCheckForApp()) return NULL; 338 %End 339 340 public: 341 342 343 %Property(name=DefaultSashSize, get=GetDefaultSashSize) 344 %Property(name=MinimumPaneSize, get=GetMinimumPaneSize, set=SetMinimumPaneSize) 345 %Property(name=SashGravity, get=GetSashGravity, set=SetSashGravity) 346 %Property(name=SashPosition, get=GetSashPosition, set=SetSashPosition) 347 %Property(name=SashSize, get=GetSashSize, set=SetSashSize) 348 %Property(name=SplitMode, get=GetSplitMode, set=SetSplitMode) 349 %Property(name=Window1, get=GetWindow1) 350 %Property(name=Window2, get=GetWindow2) 351 %Property(name=SashInvisible, get=IsSashInvisible, set=SetSashInvisible) 352}; // end of class wxSplitterWindow 353 354 355class wxSplitterEvent : wxNotifyEvent 356{ 357 %Docstring 358 SplitterEvent(eventType=wxEVT_NULL, splitter=None) 359 360 This class represents the events generated by a splitter control. 361 %End 362 %TypeHeaderCode 363 #include <wx/splitter.h> 364 %End 365 366public: 367 wxSplitterEvent( 368 wxEventType eventType = wxEVT_NULL, 369 wxSplitterWindow * splitter = NULL 370 ); 371 372 int GetSashPosition() const; 373 %Docstring 374 GetSashPosition() -> int 375 376 Returns the new sash position. 377 %End 378 379 wxWindow * GetWindowBeingRemoved() const; 380 %Docstring 381 GetWindowBeingRemoved() -> Window 382 383 Returns a pointer to the window being removed when a splitter window 384 is unsplit. 385 %End 386 387 int GetX() const; 388 %Docstring 389 GetX() -> int 390 391 Returns the x coordinate of the double-click point. 392 %End 393 394 int GetY() const; 395 %Docstring 396 GetY() -> int 397 398 Returns the y coordinate of the double-click point. 399 %End 400 401 void SetSashPosition( 402 int pos 403 ); 404 %Docstring 405 SetSashPosition(pos) 406 407 In the case of wxEVT_SPLITTER_SASH_POS_CHANGED events, sets the new 408 sash position. 409 %End 410 411 public: 412 virtual wxEvent* Clone() const /Factory/; 413 414 415 private: 416 wxSplitterEvent& operator=(const wxSplitterEvent&); 417 418 419 public: 420 421 422 %Property(name=SashPosition, get=GetSashPosition, set=SetSashPosition) 423 %Property(name=WindowBeingRemoved, get=GetWindowBeingRemoved) 424 %Property(name=X, get=GetX) 425 %Property(name=Y, get=GetY) 426}; // end of class wxSplitterEvent 427 428 429%Extract(id=pycode_core) 430EVT_SPLITTER_SASH_POS_CHANGED = wx.PyEventBinder( wxEVT_SPLITTER_SASH_POS_CHANGED, 1 ) 431EVT_SPLITTER_SASH_POS_CHANGING = wx.PyEventBinder( wxEVT_SPLITTER_SASH_POS_CHANGING, 1 ) 432EVT_SPLITTER_DOUBLECLICKED = wx.PyEventBinder( wxEVT_SPLITTER_DOUBLECLICKED, 1 ) 433EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_SPLITTER_UNSPLIT, 1 ) 434EVT_SPLITTER_DCLICK = EVT_SPLITTER_DOUBLECLICKED 435 436# deprecated wxEVT aliases 437wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED = wxEVT_SPLITTER_SASH_POS_CHANGED 438wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING = wxEVT_SPLITTER_SASH_POS_CHANGING 439wxEVT_COMMAND_SPLITTER_DOUBLECLICKED = wxEVT_SPLITTER_DOUBLECLICKED 440wxEVT_COMMAND_SPLITTER_UNSPLIT = wxEVT_SPLITTER_UNSPLIT 441 442%End 443 444 445//--------------------------------------------------------------------------- 446 447