1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/xrc/xh_sizer.h
3 // Purpose: XML resource handler for wxBoxSizer
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_XH_SIZER_H_
12 #define _WX_XH_SIZER_H_
14 #include "wx/xrc/xmlres.h"
19 #include "wx/gbsizer.h"
21 class WXDLLIMPEXP_XRC wxSizerXmlHandler
: public wxXmlResourceHandler
23 DECLARE_DYNAMIC_CLASS(wxSizerXmlHandler
)
27 virtual wxObject
*DoCreateResource();
28 virtual bool CanHandle(wxXmlNode
*node
);
31 virtual wxSizer
* DoCreateSizer(const wxString
& name
);
32 virtual bool IsSizerNode(wxXmlNode
*node
) const;
38 wxSizer
*m_parentSizer
;
41 wxObject
* Handle_sizeritem();
42 wxObject
* Handle_spacer();
43 wxObject
* Handle_sizer();
44 wxSizer
* Handle_wxBoxSizer();
46 wxSizer
* Handle_wxStaticBoxSizer();
48 wxSizer
* Handle_wxGridSizer();
49 wxFlexGridSizer
* Handle_wxFlexGridSizer();
50 wxGridBagSizer
* Handle_wxGridBagSizer();
51 wxSizer
* Handle_wxWrapSizer();
53 bool ValidateGridSizerChildren();
54 void SetFlexibleMode(wxFlexGridSizer
* fsizer
);
55 void SetGrowables(wxFlexGridSizer
* fsizer
, const wxChar
* param
, bool rows
);
56 wxGBPosition
GetGBPos(const wxString
& param
);
57 wxGBSpan
GetGBSpan(const wxString
& param
);
58 wxSizerItem
* MakeSizerItem();
59 void SetSizerItemAttributes(wxSizerItem
* sitem
);
60 void AddSizerItem(wxSizerItem
* sitem
);
65 class WXDLLIMPEXP_XRC wxStdDialogButtonSizerXmlHandler
66 : public wxXmlResourceHandler
68 DECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler
)
71 wxStdDialogButtonSizerXmlHandler();
72 virtual wxObject
*DoCreateResource();
73 virtual bool CanHandle(wxXmlNode
*node
);
77 wxStdDialogButtonSizer
*m_parentSizer
;
80 #endif // wxUSE_BUTTON
84 #endif // _WX_XH_SIZER_H_