]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_srchctrl.cpp
Deprecate second parameter of wxSlider::SetTickFreq().
[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 // RCS-ID: $Id$
7 // Copyright: (c) 2007 Sander Berents
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
13
14 #ifdef __BORLANDC__
15 #pragma hdrstop
16 #endif
17
18 #if wxUSE_XRC && wxUSE_SEARCHCTRL
19
20 #include "wx/xrc/xh_srchctrl.h"
21 #include "wx/srchctrl.h"
22
23 IMPLEMENT_DYNAMIC_CLASS(wxSearchCtrlXmlHandler, wxXmlResourceHandler)
24
25 wxSearchCtrlXmlHandler::wxSearchCtrlXmlHandler() : wxXmlResourceHandler()
26 {
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);
34
35 AddWindowStyles();
36 }
37
38 wxObject *wxSearchCtrlXmlHandler::DoCreateResource()
39 {
40 XRC_MAKE_INSTANCE(ctrl, wxSearchCtrl)
41
42 ctrl->Create(m_parentAsWindow,
43 GetID(),
44 GetText(wxT("value")),
45 GetPosition(),
46 GetSize(),
47 GetStyle(wxT("style"), wxTE_LEFT),
48 wxDefaultValidator,
49 GetName());
50
51 SetupWindow(ctrl);
52
53 return ctrl;
54 }
55
56 bool wxSearchCtrlXmlHandler::CanHandle(wxXmlNode *node)
57 {
58 return IsOfClass(node, wxT("wxSearchCtrl"));
59 }
60
61 #endif // wxUSE_XRC && wxUSE_SEARCHCTRL