]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_srchctrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_srchctl.cpp
3 // Purpose: XRC resource handler for wxSearchCtrl
4 // Author: Sander Berents
7 // Copyright: (c) 2007 Sander Berents
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_SEARCHCTRL
20 #include "wx/xrc/xh_srchctrl.h"
21 #include "wx/srchctrl.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxSearchCtrlXmlHandler
, wxXmlResourceHandler
)
25 wxSearchCtrlXmlHandler::wxSearchCtrlXmlHandler() : wxXmlResourceHandler()
27 XRC_ADD_STYLE(wxTE_PROCESS_ENTER
);
28 XRC_ADD_STYLE(wxTE_PROCESS_TAB
);
29 XRC_ADD_STYLE(wxTE_NOHIDESEL
);
30 XRC_ADD_STYLE(wxTE_LEFT
);
31 XRC_ADD_STYLE(wxTE_CENTRE
);
32 XRC_ADD_STYLE(wxTE_RIGHT
);
33 XRC_ADD_STYLE(wxTE_CAPITALIZE
);
38 wxObject
*wxSearchCtrlXmlHandler::DoCreateResource()
40 XRC_MAKE_INSTANCE(ctrl
, wxSearchCtrl
)
42 ctrl
->Create(m_parentAsWindow
,
44 GetText(wxT("value")),
47 GetStyle(wxT("style"), wxTE_LEFT
),
56 bool wxSearchCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
58 return IsOfClass(node
, wxT("wxSearchCtrl"));
61 #endif // wxUSE_XRC && wxUSE_SEARCHCTRL