Gave the sash and splitter windows Create and Init methods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-04-13 16:18:00 +00:00
parent 379b9ba2cf
commit 970047bbc3
8 changed files with 103 additions and 89 deletions

View File

@@ -141,7 +141,18 @@ class WXDLLEXPORT wxSashLayoutWindow: public wxSashWindow
{
DECLARE_CLASS(wxSashLayoutWindow)
public:
wxSashLayoutWindow()
{
Init();
}
wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow")
{
Create(parent, id, pos, size, style, name);
}
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow");
// Accessors
@@ -161,7 +172,10 @@ public:
// Called by layout algorithm to retrieve information about the window.
void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event);
protected:
private:
void Init();
wxLayoutAlignment m_alignment;
wxLayoutOrientation m_orientation;
wxSize m_defaultSize;

View File

@@ -74,13 +74,24 @@ public:
// Public API
// Default constructor
wxSashWindow();
wxSashWindow()
{
Init();
}
// Normal constructor
wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow");
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow")
{
Init();
Create(parent, id, pos, size, style, name);
}
~wxSashWindow();
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow");
// Set whether there's a sash in this position
void SetSashVisible(wxSashEdgePosition edge, bool sash);
@@ -151,7 +162,9 @@ public:
// Initialize colours
void InitColours();
protected:
private:
void Init();
wxSashEdge m_sashes[4];
int m_dragMode;
wxSashEdgePosition m_draggingEdge;

View File

@@ -60,16 +60,30 @@ public:
// Public API
// Default constructor
wxSplitterWindow();
wxSplitterWindow()
{
Init();
}
// Normal constructor
wxSplitterWindow(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_3D|wxCLIP_CHILDREN,
const wxString& name = "splitter");
const wxString& name = "splitter")
{
Init();
Create(parent, id, pos, size, style, name);
}
~wxSplitterWindow();
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxSP_3D|wxCLIP_CHILDREN,
const wxString& name = "splitter");
// Gets the only or left/top pane
wxWindow *GetWindow1() const { return m_windowOne; }
@@ -191,6 +205,10 @@ protected:
void SendUnsplitEvent(wxWindow *winRemoved);
private:
void Init();
int m_splitMode;
bool m_permitUnsplitAlways;
bool m_needUpdating; // when in live mode, set the to TRUE to resize children in idle