Package wx :: Package lib :: Package agw :: Module fourwaysplitter :: Class FourWaySplitter
[frames | no frames]

Type FourWaySplitter

object --+                    
         |                    
    Object --+                
             |                
    EvtHandler --+            
                 |            
            Window --+        
                     |        
                 Panel --+    
                         |    
                   PyPanel --+
                             |
                            FourWaySplitter


This class is very similar to `wx.SplitterWindow` except that it
allows for four windows and two sashes.  Many of the same styles,
constants, and methods behave the same as in wx.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:

    * Minimum pane size (minimum of what? Width? Height?)
    
    * Using negative sash positions to indicate a position offset
      from the end.
      
    * User controlled unsplitting with double clicks on the sash
      (but supported via SetExpanded method).
      
    * Sash gravity

Method Summary
  __init__(self, parent, id, pos, size, style, name)
  AdjustLayout(self)
Adjust layout of FourWaySplitter.
  AppendWindow(self, window)
Add a new window to the splitter at the right side or bottom of the window stack.
  DetachWindow(self, window)
Removes the window from the stack of windows managed by the splitter.
  DoGetBestSize(self)
Returns the best size for FourWaySplitter.
  DoSendChangingEvent(self, pt)
Sends a wx.EVT_SPLITTER_SASH_POS_CHANGING event.
  DrawSplitter(self, dc)
Actually draws the sashes.
  DrawTrackSplitter(self, x, y)
Draws a fake sash in case we don't have wx.SP_LIVE_UPDATE style.
  ExchangeWindows(self, window1, window2)
Trade the positions in the splitter of the two windows.
  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.
  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`.
  InsertWindow(self, idx, window, sashPos)
Insert a new window into the splitter at the position given in ``idx``.
  MoveSplit(self, x, y)
Moves the split accordingly to user action.
  OnEnterWindow(self, event)
Handles the wx.EVT_ENTER_WINDOW event for FourWaySplitter.
  OnLeaveWindow(self, event)
Handles the wx.EVT_LEAVE_WINDOW event for FourWaySplitter.
  OnLeftDown(self, event)
Handles the wx.EVT_LEFT_DOWN event for FourWaySplitter.
  OnLeftUp(self, event)
Handles the wx.EVT_LEFT_UP event for FourWaySplitter.
  OnMotion(self, event)
Handles the wx.EVT_MOTION event for FourWaySplitter.
  OnPaint(self, event)
Handles the wx.EVT_PAINT event for FourWaySplitter.
  OnSize(self, event)
Handles the wx.EVT_SIZE event for FourWaySplitter.
  ReplaceWindow(self, oldWindow, newWindow)
Replaces oldWindow (which is currently being managed by the splitter) with newWindow.
  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).
  SetHSplit(self, s)
Change horizontal split fraction.
  SetVSplit(self, s)
Change vertical split fraction.

Property Summary

Instance Method Details

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.

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.

DoGetBestSize(self)

Returns the best size for FourWaySplitter.
Overrides:
wx.PyPanel.DoGetBestSize

DoSendChangingEvent(self, pt)

Sends a wx.EVT_SPLITTER_SASH_POS_CHANGING event.

DrawSplitter(self, dc)

Actually draws the sashes.

DrawTrackSplitter(self, x, y)

Draws a fake sash in case we don't have wx.SP_LIVE_UPDATE style.

ExchangeWindows(self, window1, window2)

Trade the positions in the splitter of the two windows.

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. There are 3 possibilities:
  • wx.HORIZONTAL: the user has clicked on the horizontal sash;
  • wx.VERTICAL: the user has clicked on the vertical sash;
  • wx.BOTH: the user has clicked at the intersection between the 2 sashes.

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`.

InsertWindow(self, idx, window, sashPos=-1)

Insert a new window into the splitter at the position given in ``idx``.

MoveSplit(self, x, y)

Moves the split accordingly to user action.

OnEnterWindow(self, event)

Handles the wx.EVT_ENTER_WINDOW event for FourWaySplitter.

OnLeaveWindow(self, event)

Handles the wx.EVT_LEAVE_WINDOW event for FourWaySplitter.

OnLeftDown(self, event)

Handles the wx.EVT_LEFT_DOWN event for FourWaySplitter.

OnLeftUp(self, event)

Handles the wx.EVT_LEFT_UP event for FourWaySplitter.

OnMotion(self, event)

Handles the wx.EVT_MOTION event for FourWaySplitter.

OnPaint(self, event)

Handles the wx.EVT_PAINT event for FourWaySplitter.

OnSize(self, event)

Handles the wx.EVT_SIZE event for FourWaySplitter.

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.

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).

SetHSplit(self, s)

Change horizontal split fraction. The split fraction s 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. The split fraction s 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)

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:54:40 2009 http://epydoc.sf.net