From 59ca9b93a0b36200e1bc15f39c85f78bb0ee7d38 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 21 Dec 2017 13:48:30 +0100 Subject: [PATCH] Make wxCompositeWindow ctor protected As this class is only supposed to be used as a base class, its ctor doesn't need to be, and hence ought not to be, public. Also update an outdated comment stating that the ctor didn't do anything when it, in fact, does perform an important task. --- include/wx/compositewin.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/wx/compositewin.h b/include/wx/compositewin.h index 48d0ae344e..ec26a414b5 100644 --- a/include/wx/compositewin.h +++ b/include/wx/compositewin.h @@ -33,17 +33,6 @@ class wxCompositeWindow : public W public: typedef W BaseWindowClass; - // Default ctor doesn't do anything. - wxCompositeWindow() - { - this->Connect - ( - wxEVT_CREATE, - wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate) - ); - - } - // Override all wxWindow methods which must be forwarded to the composite // window parts. @@ -136,6 +125,17 @@ public: wxSetFocusToChild(this, NULL); } +protected: + // Default ctor sets things up for handling children events correctly. + wxCompositeWindow() + { + this->Connect + ( + wxEVT_CREATE, + wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate) + ); + } + private: // Must be implemented by the derived class to return all children to which // the public methods we override should forward to.