This class is very similar to SplitterWindow
except that it
allows for four windows and two sashes. Many of the same styles,
constants, and methods behave the same as in SplitterWindow
.
However, in addition of the ability to drag the vertical and the
horizontal sash, by dragging at the intersection between the two
sashes, it is possible to resize the four windows at the same time.
Note
These things are not yet supported:
FourWaySplitter.SetExpanded()
method);__init__ |
Default class constructor. |
AdjustLayout |
Adjust layout of FourWaySplitter . Mainly used to recalculate the |
AppendWindow |
Add a new window to the splitter at the right side or bottom |
DetachWindow |
Removes the window from the stack of windows managed by the splitter. The |
DoGetBestSize |
Gets the size which best suits the window: for a control, it would be the |
DoSendChangingEvent |
Sends a EVT_SPLITTER_SASH_POS_CHANGING event. |
DrawSplitter |
Actually draws the sashes. |
DrawTrackSplitter |
Draws a fake sash in case we don’t have wx.SP_LIVE_UPDATE style. |
ExchangeWindows |
Trade the positions in the splitter of the two windows. |
GetAGWWindowStyleFlag |
Returns the FourWaySplitter window style. |
GetBottomLeft |
Returns the bottom left window (window index: 2). |
GetBottomRight |
Returns the bottom right window (window index: 3). |
GetMode |
Determines the split mode for FourWaySplitter . |
GetTopLeft |
Returns the top left window (window index: 0). |
GetTopRight |
Returns the top right window (window index: 1). |
GetWindow |
Returns the window at the index idx. |
InsertWindow |
Insert a new window into the splitter at the position given in idx. |
MoveSplit |
Moves the split accordingly to user action. |
OnEnterWindow |
Handles the wx.EVT_ENTER_WINDOW event for FourWaySplitter . |
OnLeaveWindow |
Handles the wx.EVT_LEAVE_WINDOW event for FourWaySplitter . |
OnLeftDown |
Handles the wx.EVT_LEFT_DOWN event for FourWaySplitter . |
OnLeftUp |
Handles the wx.EVT_LEFT_UP event for FourWaySplitter . |
OnMotion |
Handles the wx.EVT_MOTION event for FourWaySplitter . |
OnPaint |
Handles the wx.EVT_PAINT event for FourWaySplitter . |
OnSize |
Handles the wx.EVT_SIZE event for FourWaySplitter . |
ReplaceWindow |
Replaces oldWindow (which is currently being managed by the |
SetAGWWindowStyleFlag |
Sets the FourWaySplitter window style flags. |
SetExpanded |
This method is used to expand one of the four window to fill the |
SetHSplit |
Change horizontal split fraction. |
SetVSplit |
Change vertical split fraction. |
FourWaySplitter
(wx.Panel)¶This class is very similar to SplitterWindow
except that it
allows for four windows and two sashes. Many of the same styles,
constants, and methods behave the same as in SplitterWindow
.
However, in addition of the ability to drag the vertical and the
horizontal sash, by dragging at the intersection between the two
sashes, it is possible to resize the four windows at the same time.
Note
These things are not yet supported:
FourWaySplitter.SetExpanded()
method);__init__
(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=0, name="FourWaySplitter")¶Default class constructor.
Parameters: |
|
---|
AdjustLayout
(self)¶Adjust layout of FourWaySplitter
. Mainly used to recalculate the
correct values for split fractions.
AppendWindow
(self, window)¶Add a new window to the splitter at the right side or bottom of the window stack.
Parameters: | window – an instance of wx.Window . |
---|
DetachWindow
(self, window)¶Removes the window from the stack of windows managed by the splitter. The
window will still exist so you should Hide
or Destroy
it as needed.
Parameters: | window – an instance of wx.Window . |
---|
DoGetBestSize
(self)¶Gets the size which best suits the window: for a control, it would be the minimal size which doesn’t truncate the control, for a panel - the same size as it would have after a call to Fit().
Note
Overridden from Panel
.
DoSendChangingEvent
(self, pt)¶Sends a EVT_SPLITTER_SASH_POS_CHANGING
event.
Parameters: | pt – the point at which the splitter is being positioned. |
---|
DrawTrackSplitter
(self, x, y)¶Draws a fake sash in case we don’t have wx.SP_LIVE_UPDATE
style.
Parameters: |
|
---|
Note
This method relies on ScreenDC
which is currently unavailable on wxMac.
ExchangeWindows
(self, window1, window2)¶Trade the positions in the splitter of the two windows.
Parameters: |
---|
GetAGWWindowStyleFlag
(self)¶Returns the FourWaySplitter
window style.
See also
SetAGWWindowStyleFlag
for a list of possible window styles.
GetBottomLeft
(self)¶Returns the bottom left window (window index: 2).
GetBottomRight
(self)¶Returns the bottom right window (window index: 3).
GetMode
(self, pt)¶Determines the split mode for FourWaySplitter
.
Parameters: | pt – the point at which the mouse has been clicked, an instance of
wx.Point . |
||||||||
---|---|---|---|---|---|---|---|---|---|
Returns: | One of the following 3 split modes:
|
GetTopLeft
(self)¶Returns the top left window (window index: 0).
GetTopRight
(self)¶Returns the top right window (window index: 1).
GetWindow
(self, idx)¶Returns the window at the index idx.
Parameters: | idx – the index at which the window is located. |
---|
InsertWindow
(self, idx, window, sashPos=-1)¶Insert a new window into the splitter at the position given in idx.
Parameters: |
|
---|
MoveSplit
(self, x, y)¶Moves the split accordingly to user action.
Parameters: |
|
---|
OnEnterWindow
(self, event)¶Handles the wx.EVT_ENTER_WINDOW
event for FourWaySplitter
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnLeaveWindow
(self, event)¶Handles the wx.EVT_LEAVE_WINDOW
event for FourWaySplitter
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnLeftDown
(self, event)¶Handles the wx.EVT_LEFT_DOWN
event for FourWaySplitter
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnLeftUp
(self, event)¶Handles the wx.EVT_LEFT_UP
event for FourWaySplitter
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnMotion
(self, event)¶Handles the wx.EVT_MOTION
event for FourWaySplitter
.
Parameters: | event – a MouseEvent event to be processed. |
---|
OnPaint
(self, event)¶Handles the wx.EVT_PAINT
event for FourWaySplitter
.
Parameters: | event – a PaintEvent event to be processed. |
---|
OnSize
(self, event)¶Handles the wx.EVT_SIZE
event for FourWaySplitter
.
Parameters: | event – a wx.SizeEvent event to be processed. |
---|
ReplaceWindow
(self, oldWindow, newWindow)¶Replaces oldWindow (which is currently being managed by the
splitter) with newWindow. The oldWindow window will still
exist so you should Hide
or Destroy
it as needed.
Parameters: |
---|
SetAGWWindowStyleFlag
(self, agwStyle)¶Sets the FourWaySplitter
window style flags.
Parameters: | agwStyle – the AGW-specific window style. This can be a combination of the
following bits:
|
---|
SetExpanded
(self, expanded)¶This method is used to expand one of the four window to fill the whole client size (when expanded >= 0) or to return to the four-window view (when expanded < 0).
Parameters: | expanded – an integer >= 0 to expand a window to fill the whole client size, or an integer < 0 to return to the four-window view. |
---|
SetHSplit
(self, s)¶Change horizontal split fraction.
Parameters: | s – the split fraction, which is an integer value between 0 and
10000 (inclusive), indicating how much space to allocate to the leftmost
panes. For example, to split the panes at 35 percent, use:
fourSplitter.SetHSplit(3500)
|
---|
SetVSplit
(self, s)¶Change vertical split fraction.
Parameters: | s – the split fraction, which is an integer value between 0 and
10000 (inclusive), indicating how much space to allocate to the topmost
panes. For example, to split the panes at 35 percent, use:
fourSplitter.SetVSplit(3500)
|
---|