]> git.saurik.com Git - wxWidgets.git/blob - include/wx/xrc/xh_sizer.h
Implement HasSelection for the OSX WebKit backend.
[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 protected:
31 virtual wxSizer* DoCreateSizer(const wxString& name);
32 virtual bool IsSizerNode(wxXmlNode *node) const;
33
34 private:
35 bool m_isInside;
36 bool m_isGBS;
37
38 wxSizer *m_parentSizer;
39
40
41 wxObject* Handle_sizeritem();
42 wxObject* Handle_spacer();
43 wxObject* Handle_sizer();
44 wxSizer* Handle_wxBoxSizer();
45 #if wxUSE_STATBOX
46 wxSizer* Handle_wxStaticBoxSizer();
47 #endif
48 wxSizer* Handle_wxGridSizer();
49 wxFlexGridSizer* Handle_wxFlexGridSizer();
50 wxGridBagSizer* Handle_wxGridBagSizer();
51 wxSizer* Handle_wxWrapSizer();
52
53 bool ValidateGridSizerChildren();
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);
60 };
61
62 #if wxUSE_BUTTON
63
64 class WXDLLIMPEXP_XRC wxStdDialogButtonSizerXmlHandler
65 : public wxXmlResourceHandler
66 {
67 DECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler)
68
69 public:
70 wxStdDialogButtonSizerXmlHandler();
71 virtual wxObject *DoCreateResource();
72 virtual bool CanHandle(wxXmlNode *node);
73
74 private:
75 bool m_isInside;
76 wxStdDialogButtonSizer *m_parentSizer;
77 };
78
79 #endif // wxUSE_BUTTON
80
81 #endif // wxUSE_XRC
82
83 #endif // _WX_XH_SIZER_H_