1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/xrc/xh_sizer.h
3 // Purpose: XML resource handler for wxBoxSizer
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2000 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_XH_SIZER_H_
11 #define _WX_XH_SIZER_H_
13 #include "wx/xrc/xmlres.h"
18 #include "wx/gbsizer.h"
20 class WXDLLIMPEXP_XRC wxSizerXmlHandler
: public wxXmlResourceHandler
22 DECLARE_DYNAMIC_CLASS(wxSizerXmlHandler
)
26 virtual wxObject
*DoCreateResource();
27 virtual bool CanHandle(wxXmlNode
*node
);
30 virtual wxSizer
* DoCreateSizer(const wxString
& name
);
31 virtual bool IsSizerNode(wxXmlNode
*node
) const;
37 wxSizer
*m_parentSizer
;
40 wxObject
* Handle_sizeritem();
41 wxObject
* Handle_spacer();
42 wxObject
* Handle_sizer();
43 wxSizer
* Handle_wxBoxSizer();
45 wxSizer
* Handle_wxStaticBoxSizer();
47 wxSizer
* Handle_wxGridSizer();
48 wxFlexGridSizer
* Handle_wxFlexGridSizer();
49 wxGridBagSizer
* Handle_wxGridBagSizer();
50 wxSizer
* Handle_wxWrapSizer();
52 bool ValidateGridSizerChildren();
53 void SetFlexibleMode(wxFlexGridSizer
* fsizer
);
54 void SetGrowables(wxFlexGridSizer
* fsizer
, const wxChar
* param
, bool rows
);
55 wxGBPosition
GetGBPos(const wxString
& param
);
56 wxGBSpan
GetGBSpan(const wxString
& param
);
57 wxSizerItem
* MakeSizerItem();
58 void SetSizerItemAttributes(wxSizerItem
* sitem
);
59 void AddSizerItem(wxSizerItem
* sitem
);
64 class WXDLLIMPEXP_XRC wxStdDialogButtonSizerXmlHandler
65 : public wxXmlResourceHandler
67 DECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler
)
70 wxStdDialogButtonSizerXmlHandler();
71 virtual wxObject
*DoCreateResource();
72 virtual bool CanHandle(wxXmlNode
*node
);
76 wxStdDialogButtonSizer
*m_parentSizer
;
79 #endif // wxUSE_BUTTON
83 #endif // _WX_XH_SIZER_H_