1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_dirpicker.cpp
3 // Purpose: XML resource handler for wxDirPickerCtrl
4 // Author: Francesco Montorsi
7 // Copyright: (c) 2006 Francesco Montorsi
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_DIRPICKERCTRL
20 #include "wx/xrc/xh_dirpicker.h"
21 #include "wx/filepicker.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxDirPickerCtrlXmlHandler
, wxXmlResourceHandler
)
25 wxDirPickerCtrlXmlHandler::wxDirPickerCtrlXmlHandler() : wxXmlResourceHandler()
27 XRC_ADD_STYLE(wxDIRP_USE_TEXTCTRL
);
28 XRC_ADD_STYLE(wxDIRP_DIR_MUST_EXIST
);
29 XRC_ADD_STYLE(wxDIRP_CHANGE_DIR
);
30 XRC_ADD_STYLE(wxDIRP_DEFAULT_STYLE
);
34 wxObject
*wxDirPickerCtrlXmlHandler::DoCreateResource()
36 XRC_MAKE_INSTANCE(picker
, wxDirPickerCtrl
)
38 picker
->Create(m_parentAsWindow
,
40 GetParamValue(wxT("value")),
41 GetText(wxT("message")),
42 GetPosition(), GetSize(),
43 GetStyle(wxT("style"), wxDIRP_DEFAULT_STYLE
),
52 bool wxDirPickerCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
54 return IsOfClass(node
, wxT("wxDirPickerCtrl"));
57 #endif // wxUSE_XRC && wxUSE_DIRPICKERCTRL