]>
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
6 // Copyright: (c) 2007 Sander Berents
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_SEARCHCTRL
19 #include "wx/xrc/xh_srchctrl.h"
20 #include "wx/srchctrl.h"
22 IMPLEMENT_DYNAMIC_CLASS(wxSearchCtrlXmlHandler
, wxXmlResourceHandler
)
24 wxSearchCtrlXmlHandler::wxSearchCtrlXmlHandler() : wxXmlResourceHandler()
26 XRC_ADD_STYLE(wxTE_PROCESS_ENTER
);
27 XRC_ADD_STYLE(wxTE_PROCESS_TAB
);
28 XRC_ADD_STYLE(wxTE_NOHIDESEL
);
29 XRC_ADD_STYLE(wxTE_LEFT
);
30 XRC_ADD_STYLE(wxTE_CENTRE
);
31 XRC_ADD_STYLE(wxTE_RIGHT
);
32 XRC_ADD_STYLE(wxTE_CAPITALIZE
);
37 wxObject
*wxSearchCtrlXmlHandler::DoCreateResource()
39 XRC_MAKE_INSTANCE(ctrl
, wxSearchCtrl
)
41 ctrl
->Create(m_parentAsWindow
,
43 GetText(wxT("value")),
46 GetStyle(wxT("style"), wxTE_LEFT
),
55 bool wxSearchCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
57 return IsOfClass(node
, wxT("wxSearchCtrl"));
60 #endif // wxUSE_XRC && wxUSE_SEARCHCTRL