]>
Commit | Line | Data |
---|---|---|
78d14f80 | 1 | ///////////////////////////////////////////////////////////////////////////// |
1c067fe3 | 2 | // Name: src/xrc/xh_panel.cpp |
b5d6954b | 3 | // Purpose: XRC resource for panels |
78d14f80 VS |
4 | // Author: Vaclav Slavik |
5 | // Created: 2000/03/05 | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) 2000 Vaclav Slavik | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
f80ea77b | 10 | |
78d14f80 VS |
11 | // For compilers that support precompilation, includes "wx.h". |
12 | #include "wx/wxprec.h" | |
13 | ||
14 | #ifdef __BORLANDC__ | |
15 | #pragma hdrstop | |
16 | #endif | |
17 | ||
621be1ec | 18 | #if wxUSE_XRC |
a1e4ec87 | 19 | |
78d14f80 VS |
20 | #include "wx/xrc/xh_panel.h" |
21 | #include "wx/panel.h" | |
1c067fe3 | 22 | #include "wx/frame.h" |
78d14f80 | 23 | |
854e189f | 24 | IMPLEMENT_DYNAMIC_CLASS(wxPanelXmlHandler, wxXmlResourceHandler) |
78d14f80 VS |
25 | |
26 | wxPanelXmlHandler::wxPanelXmlHandler() : wxXmlResourceHandler() | |
27 | { | |
1c067fe3 | 28 | #if WXWIN_COMPATIBILITY_2_6 |
544fee32 | 29 | XRC_ADD_STYLE(wxNO_3D); |
1c067fe3 | 30 | #endif // WXWIN_COMPATIBILITY_2_6 |
544fee32 VS |
31 | XRC_ADD_STYLE(wxTAB_TRAVERSAL); |
32 | XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); | |
1c067fe3 | 33 | |
78d14f80 VS |
34 | AddWindowStyles(); |
35 | } | |
36 | ||
78d14f80 | 37 | wxObject *wxPanelXmlHandler::DoCreateResource() |
f80ea77b | 38 | { |
544fee32 | 39 | XRC_MAKE_INSTANCE(panel, wxPanel) |
f2588180 VS |
40 | |
41 | panel->Create(m_parentAsWindow, | |
42 | GetID(), | |
43 | GetPosition(), GetSize(), | |
44 | GetStyle(wxT("style"), wxTAB_TRAVERSAL), | |
45 | GetName()); | |
46 | ||
78d14f80 VS |
47 | SetupWindow(panel); |
48 | CreateChildren(panel); | |
f80ea77b | 49 | |
78d14f80 VS |
50 | return panel; |
51 | } | |
52 | ||
78d14f80 VS |
53 | bool wxPanelXmlHandler::CanHandle(wxXmlNode *node) |
54 | { | |
55 | return IsOfClass(node, wxT("wxPanel")); | |
56 | } | |
a1e4ec87 | 57 | |
621be1ec | 58 | #endif // wxUSE_XRC |