File: SearchCtrl.xsp

package info (click to toggle)
libwx-perl 1%3A0.9932-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,300 kB
  • sloc: cpp: 11,064; perl: 8,603; ansic: 711; makefile: 53
file content (85 lines) | stat: -rw-r--r-- 2,861 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#############################################################################
## Name:        XS/SearchCtrl.xsp
## Purpose:     XS++ for Wx::SearchCtrl
## Author:      Mattia Barbon
## Modified by:
## Created:     12/08/2007
## RCS-ID:      $Id: SearchCtrl.xsp 3131 2011-11-22 05:28:54Z mdootson $
## Copyright:   (c) 2007 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

%module{Wx};

#if WXPERL_W_VERSION_GE( 2, 8, 3 )

#include <wx/srchctrl.h>
#include <wx/menu.h>

%typemap{wxSearchCtrl*}{simple};
%typemap{const wxTextAttr&}{reference};

%name{Wx::SearchCtrl} class wxSearchCtrl
{

%{
void
new( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_VOIDM_REDISP( newDefault )
        MATCH_ANY_REDISP( newFull )
    END_OVERLOAD( "Wx::SearchCtrl::new" )
%}

    %name{newDefault} wxSearchCtrl()
        %code{% RETVAL = new wxSearchCtrl();
                wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
                %};
    %name{newFull} wxSearchCtrl( wxWindow *parent,
                                 wxWindowID id,
                                 const wxString& label = wxEmptyString,
                                 const wxPoint& pos = wxDefaultPosition,
                                 const wxSize& size = wxDefaultSize,
                                 long style = 0,
                                 const wxValidator& validator = wxDefaultValidatorPtr,
                                 const wxString& name = wxSearchCtrlNameStr )
        %code{% RETVAL = new wxSearchCtrl( parent, id, label, pos, size,
                                                style, *validator, name );
                wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
                %};

    bool Create( wxWindow *parent,
                 wxWindowID id, const wxString& value = wxEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidatorPtr,
                 const wxString& name = wxSearchCtrlNameStr );

    void SetMenu( wxMenu *menu );
    wxMenu *GetMenu();
    void ShowSearchButton( bool show );
    bool IsSearchButtonVisible() const;

    void ShowCancelButton( bool show );
    bool IsCancelButtonVisible() const;

    void SetDescriptiveText( const wxString& text );
    wxString GetDescriptiveText() const;
};

#if WXPERL_W_VERSION_GE( 2, 9, 2 ) && !defined(__WXMAC__)

#define WXPERL_IN_SEARCHCTRL

INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/TextEntry.xsp
INCLUDE_COMMAND: $^X -pe "s/TextEntry/SearchCtrl/g" xspp/TextEntry.h

#undef WXPERL_IN_SEARCHCTRL

#endif


#endif