]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_srchctrl.i
Move #include of srchctrl.h to wxPython_int.h
[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 %newgroup
17
18 MAKE_CONST_WXSTRING(SearchCtrlNameStr);
19
20
21 MustHaveApp(wxSearchCtrl);
22
23
24 class wxSearchCtrl : public wxTextCtrl
25 {
26 public:
27 %pythonAppend wxSearchCtrl "self._setOORInfo(self)";
28 %pythonAppend wxSearchCtrl() "";
29
30 wxSearchCtrl(wxWindow *parent, wxWindowID id=-1,
31 const wxString& value = wxEmptyString,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = 0,
35 const wxValidator& validator = wxDefaultValidator,
36 const wxString& name = wxPySearchCtrlNameStr);
37
38 DocCtorStrName(
39 wxSearchCtrl(),
40 "Precreate a wx.SearchCtrl for 2-phase creation.", "",
41 PreSearchCtrl);
42
43 bool Create(wxWindow *parent, wxWindowID id=-1,
44 const wxString& value = wxEmptyString,
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxPySearchCtrlNameStr);
50
51
52 // get/set search button menu
53 // --------------------------
54 virtual void SetMenu( wxMenu* menu );
55 virtual wxMenu* GetMenu();
56
57 // get/set search options
58 // ----------------------
59 virtual void SetSearchButtonVisible( bool show );
60 virtual bool GetSearchButtonVisible() const;
61
62 virtual void SetCancelButtonVisible( bool show );
63 virtual bool GetCancelButtonVisible() const;
64
65 #ifdef __WXMAC__
66 %extend {
67 void SetSearchBitmap( const wxBitmap& ) {}
68 void SetSearchMenuBitmap( const wxBitmap& ) {}
69 void SetCancelBitmap( const wxBitmap& ) {}
70 }
71 #else
72 void SetSearchBitmap( const wxBitmap& bitmap );
73 void SetSearchMenuBitmap( const wxBitmap& bitmap );
74 void SetCancelBitmap( const wxBitmap& bitmap );
75 #endif
76
77
78 %property(Menu, GetMenu, SetMenu);
79 %property(SearchButtonVisible, GetSearchButtonVisible, SetSearchButtonVisible);
80 %property(CancelButtonVisible, GetCancelButtonVisible, SetCancelButtonVisible);
81 };
82
83
84
85
86 %constant wxEventType wxEVT_COMMAND_SEARCHCTRL_CANCEL;
87 %constant wxEventType wxEVT_COMMAND_SEARCHCTRL_SEARCH;
88
89 %pythoncode {
90 EVT_SEARCHCTRL_CANCEL = wx.PyEventBinder( wxEVT_COMMAND_SEARCHCTRL_CANCEL, 1)
91 EVT_SEARCHCTRL_SEARCH = wx.PyEventBinder( wxEVT_COMMAND_SEARCHCTRL_SEARCH, 1)
92 }
93
94 //---------------------------------------------------------------------------
95