1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XRC resource for wxGenericDirCtrl
4 // Author: Markus Greither
7 // Copyright: (c) 2002 Markus Greither
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "xh_gdctl.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #if wxUSE_XRC && wxUSE_DIRDLG
24 #include "wx/textctrl.h"
25 #include "wx/xrc/xh_gdctl.h"
26 #include "wx/dirctrl.h"
28 IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler
, wxXmlResourceHandler
)
30 wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler()
31 : wxXmlResourceHandler()
33 XRC_ADD_STYLE(wxDIRCTRL_DIR_ONLY
);
34 XRC_ADD_STYLE(wxDIRCTRL_3D_INTERNAL
);
35 XRC_ADD_STYLE(wxDIRCTRL_SELECT_FIRST
);
36 XRC_ADD_STYLE(wxDIRCTRL_SHOW_FILTERS
);
40 wxObject
*wxGenericDirCtrlXmlHandler::DoCreateResource()
42 XRC_MAKE_INSTANCE(ctrl
, wxGenericDirCtrl
)
44 ctrl
->Create(m_parentAsWindow
,
46 GetText(wxT("defaultfolder")),
47 GetPosition(), GetSize(),
49 GetText(wxT("filter")),
50 (int)GetLong(wxT("defaultfilter")),
58 bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
60 return IsOfClass(node
, wxT("wxGenericDirCtrl"));
63 #endif // wxUSE_XRC && wxUSE_DIRDLG