]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_srchctrl.i
13516b6a50df2b38d140852ba055d96ee1d38223
[wxWidgets.git] / wxPython / src / _srchctrl.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _srchctrl.i
3 // Purpose: SWIG interface for wxSearchCtrl
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 9-Dec-2006
8 // RCS-ID: $Id$
9 // Copyright: (c) 2006 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 // Not a %module
14
15 %{
16 #include <wx/srchctrl.h>
17 %}
18
19 //---------------------------------------------------------------------------
20 %newgroup
21
22 MAKE_CONST_WXSTRING(SearchCtrlNameStr);
23
24
25 MustHaveApp(wxSearchCtrl);
26
27
28 class wxSearchCtrl : public wxTextCtrl
29 {
30 public:
31 %pythonAppend wxSearchCtrl "self._setOORInfo(self)";
32 %pythonAppend wxSearchCtrl() "";
33
34 wxSearchCtrl(wxWindow *parent, wxWindowID id=-1,
35 const wxString& value = wxEmptyString,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxPySearchCtrlNameStr);
41
42 DocCtorStrName(
43 wxSearchCtrl(),
44 "Precreate a wx.SearchCtrl for 2-phase creation.", "",
45 PreSearchCtrl);
46
47 bool Create(wxWindow *parent, wxWindowID id=-1,
48 const wxString& value = wxEmptyString,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = 0,
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxPySearchCtrlNameStr);
54
55
56 // get/set search button menu
57 // --------------------------
58 virtual void SetMenu( wxMenu* menu );
59 virtual wxMenu* GetMenu();
60
61 // get/set search options
62 // ----------------------
63 virtual void SetSearchButtonVisible( bool show );
64 virtual bool GetSearchButtonVisible() const;
65
66 virtual void SetCancelButtonVisible( bool show );
67 virtual bool GetCancelButtonVisible() const;
68
69 #ifdef __WXMAC__
70 %extend {
71 void SetSearchBitmap( const wxBitmap& ) {}
72 void SetSearchMenuBitmap( const wxBitmap& ) {}
73 void SetCancelBitmap( const wxBitmap& ) {}
74 }
75 #else
76 void SetSearchBitmap( const wxBitmap& bitmap );
77 void SetSearchMenuBitmap( const wxBitmap& bitmap );
78 void SetCancelBitmap( const wxBitmap& bitmap );
79 #endif
80
81
82 %property(Menu, GetMenu, SetMenu);
83 %property(SearchButtonVisible, GetSearchButtonVisible, SetSearchButtonVisible);
84 %property(CancelButtonVisible, GetCancelButtonVisible, SetCancelButtonVisible);
85 };
86
87
88
89
90 %constant wxEventType wxEVT_COMMAND_SEARCHCTRL_CANCEL;
91 %constant wxEventType wxEVT_COMMAND_SEARCHCTRL_SEARCH;
92
93 %pythoncode {
94 EVT_SEARCHCTRL_CANCEL = wx.PyEventBinder( wxEVT_COMMAND_SEARCHCTRL_CANCEL, 1)
95 EVT_SEARCHCTRL_SEARCH = wx.PyEventBinder( wxEVT_COMMAND_SEARCHCTRL_SEARCH, 1)
96 }
97
98 //---------------------------------------------------------------------------
99