1 #############################################################################
2 ## Name: XS/FileCtrl.xsp
3 ## Purpose: XS+++ for Wx::FileCtrl
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: FileCtrl.xsp 2240 2007-10-07 19:18:51Z 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 #############################################################################
15 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
17 %typemap{wxFileCtrl*}{simple};
18 %typemap{wxFileCtrlEvent*}{simple};
20 #include <wx/filectrl.h>
22 %name{Wx::FileCtrl} class wxFileCtrl
29 MATCH_VOIDM_REDISP( newDefault )
30 MATCH_ANY_REDISP( newFull )
31 END_OVERLOAD( "Wx::FileCtrl::new" )
34 %name{newDefault} wxFileCtrl()
35 %code{% RETVAL = new wxFileCtrl();
36 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
39 %name{newFull} wxFileCtrl( wxWindow *parent,
40 wxWindowID id = wxID_ANY,
41 const wxString& defaultDirectory = wxEmptyString,
42 const wxString& defaultFilename = wxEmptyString,
43 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
44 long style = wxFC_DEFAULT_STYLE,
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 const wxString& name = wxFileCtrlNameStr )
48 %code{% RETVAL = new wxFileCtrl( parent, id, defaultDirectory,
49 defaultFilename, wildCard, style,
51 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
54 bool Create( wxWindow *parent,
55 wxWindowID id = wxID_ANY,
56 const wxString& defaultDirectory = wxEmptyString,
57 const wxString& defaultFilename = wxEmptyString,
58 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
59 long style = wxFC_DEFAULT_STYLE,
60 const wxPoint& pos = wxDefaultPosition,
61 const wxSize& size = wxDefaultSize,
62 const wxString& name = wxFileCtrlNameStr );
64 void SetWildcard( const wxString& wildCard );
65 void SetFilterIndex( int filterindex );
66 bool SetDirectory( const wxString& dir );
68 bool SetFilename( const wxString& name );
70 bool SetPath( const wxString& path );
72 wxString GetFilename() const;
73 wxString GetDirectory() const;
74 wxString GetWildcard() const;
75 wxString GetPath() const;
79 wxFileCtrl::GetPaths()
83 THIS->GetPaths( ret );
84 wxPli_stringarray_push( aTHX_ ret );
88 wxFileCtrl::GetFilenames()
92 THIS->GetFilenames( ret );
93 wxPli_stringarray_push( aTHX_ ret );
97 int GetFilterIndex() const;
99 bool HasMultipleFileSelection() const;
100 void ShowHidden(bool show);
103 %name{Wx::FileCtrlEvent} class wxFileCtrlEvent
105 void SetFiles( const wxArrayString &files );
106 void SetDirectory( const wxString &directory );
110 wxFileCtrlEvent::GetFiles()
113 wxPli_stringarray_push( aTHX_ THIS->GetFiles() );
117 wxString GetDirectory() const;
118 wxString GetFile() const;