Make it easier to define custom wxSizerXmlHandler subclasses.

No real changes but refactor wxSizerXmlHandler to make it easier to derive
from it by adding virtual IsSizerNode() and DoCreateSizer() methods. To add
support for a custom sizer class you only need to override them in
wxSizerXmlHandler subclass now.

Also document wxSizerXmlHandler which was not documented at all previously.

Closes #11845.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-10-24 14:33:58 +00:00
parent 8ec22772d0
commit 40730ad17d
3 changed files with 145 additions and 36 deletions

View File

@@ -27,13 +27,16 @@ public:
virtual wxObject *DoCreateResource();
virtual bool CanHandle(wxXmlNode *node);
protected:
virtual wxSizer* DoCreateSizer(const wxString& name);
virtual bool IsSizerNode(wxXmlNode *node) const;
private:
bool m_isInside;
bool m_isGBS;
wxSizer *m_parentSizer;
bool IsSizerNode(wxXmlNode *node);
wxObject* Handle_sizeritem();
wxObject* Handle_spacer();