]>
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é
7 // Copyright: (c) 2009 wxWidgets development team
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_FILECTRL
20 #include "wx/xrc/xh_filectrl.h"
21 #include "wx/filectrl.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxFileCtrlXmlHandler
, wxXmlResourceHandler
)
25 wxFileCtrlXmlHandler::wxFileCtrlXmlHandler() : wxXmlResourceHandler()
27 XRC_ADD_STYLE(wxFC_DEFAULT_STYLE
);
28 XRC_ADD_STYLE(wxFC_OPEN
);
29 XRC_ADD_STYLE(wxFC_SAVE
);
30 XRC_ADD_STYLE(wxFC_MULTIPLE
);
31 XRC_ADD_STYLE(wxFC_NOSHOWHIDDEN
);
36 wxObject
*wxFileCtrlXmlHandler::DoCreateResource()
38 XRC_MAKE_INSTANCE(filectrl
, wxFileCtrl
)
40 filectrl
->Create(m_parentAsWindow
,
42 GetText(wxT("defaultdirectory")),
43 GetText(wxT("defaultfilename")),
44 GetParamValue(wxT("wildcard")),
45 GetStyle(wxT("style"), wxFC_DEFAULT_STYLE
),
50 SetupWindow(filectrl
);
54 bool wxFileCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
56 return IsOfClass(node
, wxT("wxFileCtrl"));
59 #endif // wxUSE_XRC && wxUSE_FILECTRL