Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / SearchCtrl.xsp
1 #############################################################################
2 ## Name:        XS/SearchCtrl.xsp
3 ## Purpose:     XS++ for Wx::SearchCtrl
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     12/08/2007
7 ## RCS-ID:      $Id: SearchCtrl.xsp 2140 2007-08-12 13:35:52Z mbarbon $
8 ## Copyright:   (c) 2007 Mattia Barbon
9 ## Licence:     This program is free software; you can redistribute it and/or
10 ##              modify it under the same terms as Perl itself
11 #############################################################################
12
13 %module{Wx};
14
15 #if WXPERL_W_VERSION_GE( 2, 8, 3 )
16
17 #include <wx/srchctrl.h>
18 #include <wx/menu.h>
19
20 %typemap{wxSearchCtrl*}{simple};
21
22 %name{Wx::SearchCtrl} class wxSearchCtrl
23 {
24
25 %{
26 void
27 new( ... )
28   PPCODE:
29     BEGIN_OVERLOAD()
30         MATCH_VOIDM_REDISP( newDefault )
31         MATCH_ANY_REDISP( newFull )
32     END_OVERLOAD( "Wx::SearchCtrl::new" )
33 %}
34
35     %name{newDefault} wxSearchCtrl()
36         %code{% RETVAL = new wxSearchCtrl();
37                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
38                 %};
39     %name{newFull} wxSearchCtrl( wxWindow *parent,
40                                  wxWindowID id,
41                                  const wxString& label = wxEmptyString,
42                                  const wxPoint& pos = wxDefaultPosition,
43                                  const wxSize& size = wxDefaultSize,
44                                  long style = 0,
45                                  const wxValidator& validator = wxDefaultValidatorPtr,
46                                  const wxString& name = wxSearchCtrlNameStr )
47         %code{% RETVAL = new wxSearchCtrl( parent, id, label, pos, size,
48                                                 style, *validator, name );
49                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
50                 %};
51
52     bool Create( wxWindow *parent,
53                  wxWindowID id, const wxString& value = wxEmptyString,
54                  const wxPoint& pos = wxDefaultPosition,
55                  const wxSize& size = wxDefaultSize,
56                  long style = 0,
57                  const wxValidator& validator = wxDefaultValidatorPtr,
58                  const wxString& name = wxSearchCtrlNameStr );
59
60     void SetMenu( wxMenu *menu );
61     wxMenu *GetMenu();
62     void ShowSearchButton( bool show );
63     bool IsSearchButtonVisible() const;
64
65     void ShowCancelButton( bool show );
66     bool IsCancelButtonVisible() const;
67
68     void SetDescriptiveText( const wxString& text );
69     wxString GetDescriptiveText() const;
70 };
71
72 #endif