Fixed design flaw in splitter window whereby you couldn't have a sash without

a border. Fixed sash layout window bug that didn't erase old sash on resize.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-04-25 14:35:58 +00:00
parent 37aba5df39
commit 2ba791ada8
11 changed files with 114 additions and 58 deletions

View File

@@ -1117,10 +1117,14 @@ enum wxStretch
* wxSplitterWindow flags
*/
#define wxSP_NOBORDER 0x0000
#define wxSP_3D 0x0010
#define wxSP_NOSASH 0x0010
#define wxSP_BORDER 0x0020
#define wxSP_PERMIT_UNSPLIT 0x0040
#define wxSP_LIVE_UPDATE 0x0080
#define wxSP_3DSASH 0x0100
#define wxSP_3DBORDER 0x0200
#define wxSP_FULLSASH 0x0400
#define wxSP_3D (wxSP_3DBORDER | wxSP_3DSASH)
/*
* wxFrame extra flags

View File

@@ -204,7 +204,7 @@ public:
return LayoutWindow(frame, mainWindow);
}
// mainWindow is sized to whatever's left over. This function for backward
// mainWindow is sized to whatever's left over.
bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = (wxWindow*) NULL);
};

View File

@@ -55,8 +55,11 @@ public:
*/
#define wxSW_NOBORDER 0x0000
#define wxSW_3D 0x0010
//#define wxSW_3D 0x0010
#define wxSW_BORDER 0x0020
#define wxSW_3DSASH 0x0040
#define wxSW_3DBORDER 0x0080
#define wxSW_3D (wxSW_3DSASH | wxSW_3DBORDER)
/*
* wxSashWindow allows any of its edges to have a sash which can be dragged

View File

@@ -178,23 +178,26 @@ public:
void OnIdle(wxIdleEvent& event);
// Draws borders
void DrawBorders(wxDC& dc);
virtual void DrawBorders(wxDC& dc);
// Draws the sash
void DrawSash(wxDC& dc);
virtual void DrawSash(wxDC& dc);
// Draws the sash tracker (for whilst moving the sash)
void DrawSashTracker(int x, int y);
virtual void DrawSashTracker(int x, int y);
// Tests for x, y over sash
bool SashHitTest(int x, int y, int tolerance = 2);
virtual bool SashHitTest(int x, int y, int tolerance = 2);
// Resizes subwindows
void SizeWindows();
virtual void SizeWindows();
// Initialize colours
void InitColours();
void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; }
bool GetNeedUpdating() const { return m_needUpdating ; }
protected:
// our event handlers
void OnSashPosChanged(wxSplitterEvent& event);
@@ -211,7 +214,7 @@ private:
int m_splitMode;
bool m_permitUnsplitAlways;
bool m_needUpdating; // when in live mode, set the to TRUE to resize children in idle
bool m_needUpdating; // when in live mode, set this to TRUE to resize children in idle
wxWindow* m_windowOne;
wxWindow* m_windowTwo;
int m_dragMode;