#############################################################################
## 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/TextCtrlIface.xsp
INCLUDE_COMMAND: $^X -pe "s/TextCtrlIface/SearchCtrl/g" xspp/TextCtrlIface.h
#undef WXPERL_IN_SEARCHCTRL
#endif
#endif