]> git.saurik.com Git - wxWidgets.git/blob - include/wx/xrc/xh_sizer.h
fixed previous revision: call wxControl's, not wxButton's DoGetBestSize
[wxWidgets.git] / include / wx / xrc / xh_sizer.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xh_sizer.h
3 // Purpose: XML resource handler for wxBoxSizer
4 // Author: Vaclav Slavik
5 // Created: 2000/04/24
6 // RCS-ID: $Id$
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_XH_SIZER_H_
12 #define _WX_XH_SIZER_H_
13
14 #if defined(__GNUG__) && !defined(__APPLE__)
15 #pragma interface "xh_sizer.h"
16 #endif
17
18 #include "wx/xrc/xmlres.h"
19 #include "wx/sizer.h"
20 #include "wx/gbsizer.h"
21
22
23 class WXDLLEXPORT wxSizer;
24
25 class WXDLLIMPEXP_XRC wxSizerXmlHandler : public wxXmlResourceHandler
26 {
27 DECLARE_DYNAMIC_CLASS(wxSizerXmlHandler)
28 public:
29 wxSizerXmlHandler();
30 virtual wxObject *DoCreateResource();
31 virtual bool CanHandle(wxXmlNode *node);
32
33 private:
34 bool m_isInside;
35 bool m_isGBS;
36
37 wxSizer *m_parentSizer;
38
39 bool IsSizerNode(wxXmlNode *node);
40
41 wxObject* Handle_sizeritem();
42 wxObject* Handle_spacer();
43 wxObject* Handle_sizer();
44 wxSizer* Handle_wxBoxSizer();
45 wxSizer* Handle_wxStaticBoxSizer();
46 wxSizer* Handle_wxGridSizer();
47 wxSizer* Handle_wxFlexGridSizer();
48 wxSizer* Handle_wxGridBagSizer();
49
50 void SetGrowables(wxFlexGridSizer* fsizer, const wxChar* param, bool rows);
51 wxGBPosition GetGBPos(const wxString& param);
52 wxGBSpan GetGBSpan(const wxString& param);
53 wxSizerItem* MakeSizerItem();
54 void SetSizerItemAttributes(wxSizerItem* sitem);
55 void AddSizerItem(wxSizerItem* sitem);
56 };
57
58
59 #endif // _WX_XH_BOXSIZER_H_