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.
This commit is contained in:
Vadim Zeitlin 2017-12-21 13:48:30 +01:00
parent 598c62a267
commit 59ca9b93a0

View File

@ -33,17 +33,6 @@ class wxCompositeWindow : public W
public: public:
typedef W BaseWindowClass; 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 // Override all wxWindow methods which must be forwarded to the composite
// window parts. // window parts.
@ -136,6 +125,17 @@ public:
wxSetFocusToChild(this, NULL); wxSetFocusToChild(this, NULL);
} }
protected:
// Default ctor sets things up for handling children events correctly.
wxCompositeWindow()
{
this->Connect
(
wxEVT_CREATE,
wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate)
);
}
private: private:
// Must be implemented by the derived class to return all children to which // Must be implemented by the derived class to return all children to which
// the public methods we override should forward to. // the public methods we override should forward to.