]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_filectrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_filectrl.cpp
3 // Purpose: XML resource handler for wxFileCtrl
4 // Author: Kinaou Hervé
6 // Copyright: (c) 2009 wxWidgets development team
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_FILECTRL
19 #include "wx/xrc/xh_filectrl.h"
20 #include "wx/filectrl.h"
22 IMPLEMENT_DYNAMIC_CLASS(wxFileCtrlXmlHandler
, wxXmlResourceHandler
)
24 wxFileCtrlXmlHandler::wxFileCtrlXmlHandler() : wxXmlResourceHandler()
26 XRC_ADD_STYLE(wxFC_DEFAULT_STYLE
);
27 XRC_ADD_STYLE(wxFC_OPEN
);
28 XRC_ADD_STYLE(wxFC_SAVE
);
29 XRC_ADD_STYLE(wxFC_MULTIPLE
);
30 XRC_ADD_STYLE(wxFC_NOSHOWHIDDEN
);
35 wxObject
*wxFileCtrlXmlHandler::DoCreateResource()
37 XRC_MAKE_INSTANCE(filectrl
, wxFileCtrl
)
39 filectrl
->Create(m_parentAsWindow
,
41 GetText(wxT("defaultdirectory")),
42 GetText(wxT("defaultfilename")),
43 GetParamValue(wxT("wildcard")),
44 GetStyle(wxT("style"), wxFC_DEFAULT_STYLE
),
49 SetupWindow(filectrl
);
53 bool wxFileCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
55 return IsOfClass(node
, wxT("wxFileCtrl"));
58 #endif // wxUSE_XRC && wxUSE_FILECTRL