]> git.saurik.com Git - wxWidgets.git/blob - include/wx/xrc/xh_sizer.h
Allow wxGenericListCtrl to correctly handle Get/SetScrollPos [bug 1584099].
[wxWidgets.git] / include / wx / xrc / xh_sizer.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/xrc/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 #include "wx/xrc/xmlres.h"
15
16 #if wxUSE_XRC
17
18 #include "wx/sizer.h"
19 #include "wx/gbsizer.h"
20
21 class WXDLLEXPORT wxSizer;
22
23 class WXDLLIMPEXP_XRC wxSizerXmlHandler : public wxXmlResourceHandler
24 {
25 DECLARE_DYNAMIC_CLASS(wxSizerXmlHandler)
26
27 public:
28 wxSizerXmlHandler();
29 virtual wxObject *DoCreateResource();
30 virtual bool CanHandle(wxXmlNode *node);
31
32 private:
33 bool m_isInside;
34 bool m_isGBS;
35
36 wxSizer *m_parentSizer;
37
38 bool IsSizerNode(wxXmlNode *node);
39
40 wxObject* Handle_sizeritem();
41 wxObject* Handle_spacer();
42 wxObject* Handle_sizer();
43 wxSizer* Handle_wxBoxSizer();
44 wxSizer* Handle_wxStaticBoxSizer();
45 wxSizer* Handle_wxGridSizer();
46 wxSizer* Handle_wxFlexGridSizer();
47 wxSizer* Handle_wxGridBagSizer();
48
49 void SetGrowables(wxFlexGridSizer* fsizer, const wxChar* param, bool rows);
50 wxGBPosition GetGBPos(const wxString& param);
51 wxGBSpan GetGBSpan(const wxString& param);
52 wxSizerItem* MakeSizerItem();
53 void SetSizerItemAttributes(wxSizerItem* sitem);
54 void AddSizerItem(wxSizerItem* sitem);
55 };
56
57 #if wxUSE_BUTTON
58
59 class WXDLLIMPEXP_XRC wxStdDialogButtonSizerXmlHandler
60 : public wxXmlResourceHandler
61 {
62 DECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler)
63
64 public:
65 wxStdDialogButtonSizerXmlHandler();
66 virtual wxObject *DoCreateResource();
67 virtual bool CanHandle(wxXmlNode *node);
68
69 private:
70 bool m_isInside;
71 wxStdDialogButtonSizer *m_parentSizer;
72 };
73
74 #endif // wxUSE_BUTTON
75
76 #endif // wxUSE_XRC
77
78 #endif // _WX_XH_SIZER_H_