1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XRC resource for wxGenericDirCtrl
4 // Author: Markus Greither
7 // Copyright: (c) 2002 Markus Greither
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_DIRDLG
20 #include "wx/textctrl.h"
21 #include "wx/xrc/xh_gdctl.h"
22 #include "wx/dirctrl.h"
24 IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler
, wxXmlResourceHandler
)
26 wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler()
27 : wxXmlResourceHandler()
29 XRC_ADD_STYLE(wxDIRCTRL_DIR_ONLY
);
30 XRC_ADD_STYLE(wxDIRCTRL_3D_INTERNAL
);
31 XRC_ADD_STYLE(wxDIRCTRL_SELECT_FIRST
);
32 XRC_ADD_STYLE(wxDIRCTRL_SHOW_FILTERS
);
36 wxObject
*wxGenericDirCtrlXmlHandler::DoCreateResource()
38 XRC_MAKE_INSTANCE(ctrl
, wxGenericDirCtrl
)
40 ctrl
->Create(m_parentAsWindow
,
42 GetText(wxT("defaultfolder")),
43 GetPosition(), GetSize(),
45 GetText(wxT("filter")),
46 (int)GetLong(wxT("defaultfilter")),
54 bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
56 return IsOfClass(node
, wxT("wxGenericDirCtrl"));
59 #endif // wxUSE_XRC && wxUSE_DIRDLG