changed wxControlContainer to avoid triggering tons of warnings from VC++ at
warning level 4 ("'this' : used in base member initializer list" is really the stupidiest warning I've ever seen) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -39,14 +39,14 @@ class WXDLLEXPORT wxControlContainer
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// ctors and such
|
// ctors and such
|
||||||
wxControlContainer(wxWindow *winParent);
|
wxControlContainer(wxWindow *winParent = NULL);
|
||||||
|
void SetContainerWindow(wxWindow *winParent) { m_winParent = winParent; }
|
||||||
|
|
||||||
|
// default item access
|
||||||
wxWindow *GetDefaultItem() const { return m_winDefault; }
|
wxWindow *GetDefaultItem() const { return m_winDefault; }
|
||||||
wxWindow *SetDefaultItem(wxWindow *win)
|
wxWindow *SetDefaultItem(wxWindow *win)
|
||||||
{ wxWindow *winOld = m_winDefault; m_winDefault = win; return winOld; }
|
{ wxWindow *winOld = m_winDefault; m_winDefault = win; return winOld; }
|
||||||
|
|
||||||
void SetLastFocus(wxWindow *win);
|
|
||||||
|
|
||||||
// the methods to be called from the window event handlers
|
// the methods to be called from the window event handlers
|
||||||
void HandleOnNavigationKey(wxNavigationKeyEvent& event);
|
void HandleOnNavigationKey(wxNavigationKeyEvent& event);
|
||||||
void HandleOnFocus(wxFocusEvent& event);
|
void HandleOnFocus(wxFocusEvent& event);
|
||||||
@@ -56,6 +56,10 @@ public:
|
|||||||
// the focus and the default processing should take place
|
// the focus and the default processing should take place
|
||||||
bool DoSetFocus();
|
bool DoSetFocus();
|
||||||
|
|
||||||
|
// called from OnChildFocus() handler, i.e. when one of our (grand)
|
||||||
|
// children gets the focus
|
||||||
|
void SetLastFocus(wxWindow *win);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// set the focus to the child which had it the last time
|
// set the focus to the child which had it the last time
|
||||||
bool SetFocusToChild();
|
bool SetFocusToChild();
|
||||||
|
@@ -34,7 +34,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
|
|||||||
class WXDLLEXPORT wxPanel : public wxWindow
|
class WXDLLEXPORT wxPanel : public wxWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxPanel() : m_container(this) { Init(); }
|
wxPanel() { Init(); }
|
||||||
|
|
||||||
// Old-style constructor (no default values for coordinates to avoid
|
// Old-style constructor (no default values for coordinates to avoid
|
||||||
// ambiguity with the new one)
|
// ambiguity with the new one)
|
||||||
@@ -42,7 +42,6 @@ public:
|
|||||||
int x, int y, int width, int height,
|
int x, int y, int width, int height,
|
||||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||||
const wxString& name = wxPanelNameStr)
|
const wxString& name = wxPanelNameStr)
|
||||||
: m_container(this)
|
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
@@ -56,7 +55,6 @@ public:
|
|||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER,
|
||||||
const wxString& name = wxPanelNameStr)
|
const wxString& name = wxPanelNameStr)
|
||||||
: m_container(this)
|
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ public:
|
|||||||
// Public API
|
// Public API
|
||||||
|
|
||||||
// Default constructor
|
// Default constructor
|
||||||
wxSplitterWindow() : m_container(this)
|
wxSplitterWindow()
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,6 @@ public:
|
|||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSP_3D,
|
long style = wxSP_3D,
|
||||||
const wxString& name = "splitter")
|
const wxString& name = "splitter")
|
||||||
: m_container(this)
|
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
Create(parent, id, pos, size, style, name);
|
Create(parent, id, pos, size, style, name);
|
||||||
|
@@ -65,6 +65,7 @@ WX_DELEGATE_TO_CONTROL_CONTAINER(wxPanel)
|
|||||||
|
|
||||||
void wxPanel::Init()
|
void wxPanel::Init()
|
||||||
{
|
{
|
||||||
|
m_container.SetContainerWindow(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPanel::Create(wxWindow *parent, wxWindowID id,
|
bool wxPanel::Create(wxWindow *parent, wxWindowID id,
|
||||||
|
@@ -93,6 +93,8 @@ bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
void wxSplitterWindow::Init()
|
void wxSplitterWindow::Init()
|
||||||
{
|
{
|
||||||
|
m_container.SetContainerWindow(this);
|
||||||
|
|
||||||
m_splitMode = wxSPLIT_VERTICAL;
|
m_splitMode = wxSPLIT_VERTICAL;
|
||||||
m_permitUnsplitAlways = TRUE;
|
m_permitUnsplitAlways = TRUE;
|
||||||
m_windowOne = (wxWindow *) NULL;
|
m_windowOne = (wxWindow *) NULL;
|
||||||
|
Reference in New Issue
Block a user