]>
Commit | Line | Data |
---|---|---|
995c1788 | 1 | ///////////////////////////////////////////////////////////////////////////// |
fec9cc08 | 2 | // Name: src/xrc/xh_gdctl.cpp |
995c1788 VS |
3 | // Purpose: XRC resource for wxGenericDirCtrl |
4 | // Author: Markus Greither | |
5 | // Created: 2002/01/20 | |
fec9cc08 | 6 | // RCS-ID: $Id$ |
995c1788 VS |
7 | // Copyright: (c) 2002 Markus Greither |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
995c1788 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 && wxUSE_DIRDLG |
995c1788 | 19 | |
995c1788 | 20 | #include "wx/xrc/xh_gdctl.h" |
fec9cc08 WS |
21 | |
22 | #ifndef WX_PRECOMP | |
23 | #include "wx/textctrl.h" | |
24 | #endif | |
25 | ||
995c1788 VS |
26 | #include "wx/dirctrl.h" |
27 | ||
854e189f VS |
28 | IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler, wxXmlResourceHandler) |
29 | ||
995c1788 VS |
30 | wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler() |
31 | : wxXmlResourceHandler() | |
32 | { | |
66010e8d VS |
33 | XRC_ADD_STYLE(wxDIRCTRL_DIR_ONLY); |
34 | XRC_ADD_STYLE(wxDIRCTRL_3D_INTERNAL); | |
35 | XRC_ADD_STYLE(wxDIRCTRL_SELECT_FIRST); | |
aa9453d6 | 36 | XRC_ADD_STYLE(wxDIRCTRL_SHOW_FILTERS); |
192f8ddc | 37 | XRC_ADD_STYLE(wxDIRCTRL_EDIT_LABELS); |
80f624ec | 38 | XRC_ADD_STYLE(wxDIRCTRL_MULTIPLE); |
995c1788 VS |
39 | AddWindowStyles(); |
40 | } | |
41 | ||
42 | wxObject *wxGenericDirCtrlXmlHandler::DoCreateResource() | |
43 | { | |
44 | XRC_MAKE_INSTANCE(ctrl, wxGenericDirCtrl) | |
f80ea77b | 45 | |
995c1788 VS |
46 | ctrl->Create(m_parentAsWindow, |
47 | GetID(), | |
48 | GetText(wxT("defaultfolder")), | |
49 | GetPosition(), GetSize(), | |
50 | GetStyle(), | |
51 | GetText(wxT("filter")), | |
52 | (int)GetLong(wxT("defaultfilter")), | |
53 | GetName()); | |
54 | ||
55 | SetupWindow(ctrl); | |
56 | ||
57 | return ctrl; | |
58 | } | |
59 | ||
60 | bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode *node) | |
61 | { | |
62 | return IsOfClass(node, wxT("wxGenericDirCtrl")); | |
63 | } | |
64 | ||
621be1ec | 65 | #endif // wxUSE_XRC && wxUSE_DIRDLG |