]> git.saurik.com Git - wxWidgets.git/blob - include/wx/xrc/xh_sizer.h
Fix handling of asterisks in wxPrintf() implementation.
[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 WXDLLIMPEXP_XRC wxSizerXmlHandler : public wxXmlResourceHandler
22 {
23 DECLARE_DYNAMIC_CLASS(wxSizerXmlHandler)
24
25 public:
26 wxSizerXmlHandler();
27 virtual wxObject *DoCreateResource();
28 virtual bool CanHandle(wxXmlNode *node);
29
30 private:
31 bool m_isInside;
32 bool m_isGBS;
33
34 wxSizer *m_parentSizer;
35
36 bool IsSizerNode(wxXmlNode *node);
37
38 wxObject* Handle_sizeritem();
39 wxObject* Handle_spacer();
40 wxObject* Handle_sizer();
41 wxSizer* Handle_wxBoxSizer();
42 #if wxUSE_STATBOX
43 wxSizer* Handle_wxStaticBoxSizer();
44 #endif
45 wxSizer* Handle_wxGridSizer();
46 wxFlexGridSizer* Handle_wxFlexGridSizer();
47 wxGridBagSizer* Handle_wxGridBagSizer();
48 wxSizer* Handle_wxWrapSizer();
49
50 bool ValidateGridSizerChildren();
51 void SetGrowables(wxFlexGridSizer* fsizer, const wxChar* param, bool rows);
52 wxGBPosition GetGBPos(const wxString& param);
53 wxGBSpan GetGBSpan(const wxString& param);
54 wxSizerItem* MakeSizerItem();
55 void SetSizerItemAttributes(wxSizerItem* sitem);
56 void AddSizerItem(wxSizerItem* sitem);
57 };
58
59 #if wxUSE_BUTTON
60
61 class WXDLLIMPEXP_XRC wxStdDialogButtonSizerXmlHandler
62 : public wxXmlResourceHandler
63 {
64 DECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler)
65
66 public:
67 wxStdDialogButtonSizerXmlHandler();
68 virtual wxObject *DoCreateResource();
69 virtual bool CanHandle(wxXmlNode *node);
70
71 private:
72 bool m_isInside;
73 wxStdDialogButtonSizer *m_parentSizer;
74 };
75
76 #endif // wxUSE_BUTTON
77
78 #endif // wxUSE_XRC
79
80 #endif // _WX_XH_SIZER_H_