]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_srchctrl.cpp
Reflect changes in stc.cpp in stc.cpp.in from which it's generated.
[wxWidgets.git] / src / xrc / xh_srchctrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_srchctl.cpp
3 // Purpose: XRC resource handler for wxSearchCtrl
4 // Author: Sander Berents
5 // Created: 2007/07/12
6 // Copyright: (c) 2007 Sander Berents
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
12
13 #ifdef __BORLANDC__
14 #pragma hdrstop
15 #endif
16
17 #if wxUSE_XRC && wxUSE_SEARCHCTRL
18
19 #include "wx/xrc/xh_srchctrl.h"
20 #include "wx/srchctrl.h"
21
22 IMPLEMENT_DYNAMIC_CLASS(wxSearchCtrlXmlHandler, wxXmlResourceHandler)
23
24 wxSearchCtrlXmlHandler::wxSearchCtrlXmlHandler() : wxXmlResourceHandler()
25 {
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);
33
34 AddWindowStyles();
35 }
36
37 wxObject *wxSearchCtrlXmlHandler::DoCreateResource()
38 {
39 XRC_MAKE_INSTANCE(ctrl, wxSearchCtrl)
40
41 ctrl->Create(m_parentAsWindow,
42 GetID(),
43 GetText(wxT("value")),
44 GetPosition(),
45 GetSize(),
46 GetStyle(wxT("style"), wxTE_LEFT),
47 wxDefaultValidator,
48 GetName());
49
50 SetupWindow(ctrl);
51
52 return ctrl;
53 }
54
55 bool wxSearchCtrlXmlHandler::CanHandle(wxXmlNode *node)
56 {
57 return IsOfClass(node, wxT("wxSearchCtrl"));
58 }
59
60 #endif // wxUSE_XRC && wxUSE_SEARCHCTRL