1. slightly changed how wxControlContainer is used

2. use it now for wxSplitterWindow too
3. don't compile wxIdleEvent in !wxUSE_GUI mode (why was it done?)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-08-06 12:55:04 +00:00
parent a86253375b
commit 6b55490abd
8 changed files with 62 additions and 51 deletions

View File

@@ -23,7 +23,6 @@
#include "wx/window.h"
#include "wx/containr.h"
class WXDLLEXPORT wxButton;
class WXDLLEXPORT wxControlContainer;
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
@@ -35,7 +34,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
class WXDLLEXPORT wxPanel : public wxWindow
{
public:
wxPanel() { Init(); }
wxPanel() : m_container(this) { Init(); }
// Old-style constructor (no default values for coordinates to avoid
// ambiguity with the new one)
@@ -43,6 +42,7 @@ public:
int x, int y, int width, int height,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxPanelNameStr)
: m_container(this)
{
Init();
@@ -56,6 +56,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
const wxString& name = wxPanelNameStr)
: m_container(this)
{
Init();
@@ -90,9 +91,6 @@ protected:
// common part of all ctors
void Init();
// the object which implements the TAB traversal logic
wxControlContainer *m_container;
private:
DECLARE_DYNAMIC_CLASS(wxPanel)
DECLARE_EVENT_TABLE()

View File

@@ -37,6 +37,8 @@ enum
wxSPLIT_DRAG_LEFT_DOWN
};
class WXDLLEXPORT wxControlContainer;
// ---------------------------------------------------------------------------
// wxSplitterWindow maintains one or two panes, with
// an optional vertical or horizontal split which
@@ -60,7 +62,7 @@ public:
// Public API
// Default constructor
wxSplitterWindow()
wxSplitterWindow() : m_container(this)
{
Init();
}
@@ -71,12 +73,13 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxSP_3D,
const wxString& name = "splitter")
: m_container(this)
{
Init();
Create(parent, id, pos, size, style, name);
}
~wxSplitterWindow();
virtual ~wxSplitterWindow();
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
@@ -209,9 +212,9 @@ protected:
void SendUnsplitEvent(wxWindow *winRemoved);
protected:
// common part of all ctors
void Init();
int m_splitMode;
bool m_permitUnsplitAlways;
bool m_needUpdating; // when in live mode, set this to TRUE to resize children in idle
@@ -237,6 +240,8 @@ protected:
wxPen* m_facePen;
private:
WX_DECLARE_CONTROL_CONTAINER();
DECLARE_DYNAMIC_CLASS(wxSplitterWindow)
DECLARE_EVENT_TABLE()
};