]>
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 | |
995c1788 VS |
6 | // Copyright: (c) 2002 Markus Greither |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
995c1788 VS |
10 | // For compilers that support precompilation, includes "wx.h". |
11 | #include "wx/wxprec.h" | |
12 | ||
13 | #ifdef __BORLANDC__ | |
14 | #pragma hdrstop | |
15 | #endif | |
16 | ||
621be1ec | 17 | #if wxUSE_XRC && wxUSE_DIRDLG |
995c1788 | 18 | |
995c1788 | 19 | #include "wx/xrc/xh_gdctl.h" |
fec9cc08 WS |
20 | |
21 | #ifndef WX_PRECOMP | |
22 | #include "wx/textctrl.h" | |
23 | #endif | |
24 | ||
995c1788 VS |
25 | #include "wx/dirctrl.h" |
26 | ||
854e189f VS |
27 | IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler, wxXmlResourceHandler) |
28 | ||
995c1788 VS |
29 | wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler() |
30 | : wxXmlResourceHandler() | |
31 | { | |
66010e8d VS |
32 | XRC_ADD_STYLE(wxDIRCTRL_DIR_ONLY); |
33 | XRC_ADD_STYLE(wxDIRCTRL_3D_INTERNAL); | |
34 | XRC_ADD_STYLE(wxDIRCTRL_SELECT_FIRST); | |
aa9453d6 | 35 | XRC_ADD_STYLE(wxDIRCTRL_SHOW_FILTERS); |
192f8ddc | 36 | XRC_ADD_STYLE(wxDIRCTRL_EDIT_LABELS); |
80f624ec | 37 | XRC_ADD_STYLE(wxDIRCTRL_MULTIPLE); |
995c1788 VS |
38 | AddWindowStyles(); |
39 | } | |
40 | ||
41 | wxObject *wxGenericDirCtrlXmlHandler::DoCreateResource() | |
42 | { | |
43 | XRC_MAKE_INSTANCE(ctrl, wxGenericDirCtrl) | |
f80ea77b | 44 | |
995c1788 VS |
45 | ctrl->Create(m_parentAsWindow, |
46 | GetID(), | |
47 | GetText(wxT("defaultfolder")), | |
48 | GetPosition(), GetSize(), | |
49 | GetStyle(), | |
50 | GetText(wxT("filter")), | |
51 | (int)GetLong(wxT("defaultfilter")), | |
52 | GetName()); | |
53 | ||
54 | SetupWindow(ctrl); | |
55 | ||
56 | return ctrl; | |
57 | } | |
58 | ||
59 | bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode *node) | |
60 | { | |
61 | return IsOfClass(node, wxT("wxGenericDirCtrl")); | |
62 | } | |
63 | ||
621be1ec | 64 | #endif // wxUSE_XRC && wxUSE_DIRDLG |