Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / FilePickerCtrl.xsp
1 #############################################################################
2 ## Name:        XS/FilePickerCtrl.xsp
3 ## Purpose:     XS+++ for Wx::File/DirPickerCtrl
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     01/11/2006
7 ## RCS-ID:      $Id: FilePickerCtrl.xsp 2079 2007-07-08 21:18:04Z mbarbon $
8 ## Copyright:   (c) 2006 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 %{
16 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
17
18 #include <wx/filepicker.h>
19 %}
20
21 %typemap{wxFilePickerCtrl*}{simple};
22 %typemap{wxDirPickerCtrl*}{simple};
23 %typemap{wxFileDirPickerEvent *}{simple};
24
25 %name{Wx::FilePickerCtrl} class wxFilePickerCtrl
26 {
27     %name{newDefault} wxFilePickerCtrl()
28         %code{% RETVAL = new wxFilePickerCtrl;
29                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
30                 %};
31     %name{newFull} wxFilePickerCtrl( wxWindow *parent,
32                                      wxWindowID id = wxID_ANY,
33                                      const wxString& path = wxEmptyString,
34                                      const wxString& message = wxFileSelectorPromptStr,
35                                      const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
36                                      const wxPoint& pos = wxDefaultPosition,
37                                      const wxSize& size = wxDefaultSize,
38                                      long style = wxCLRP_DEFAULT_STYLE,
39                                      const wxValidator& validator = wxDefaultValidatorPtr,
40                                      const wxString& name = wxFilePickerCtrlNameStr )
41         %code{% RETVAL = new wxFilePickerCtrl( parent, id, path, message,
42                                                wildcard, pos, size,
43                                                style, *validator, name );
44                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
45                 %};
46     bool Create( wxWindow *parent,
47                  wxWindowID id = wxID_ANY,
48                  const wxString& path = wxEmptyString,
49                  const wxString& message = wxFileSelectorPromptStr,
50                  const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
51                  const wxPoint& pos = wxDefaultPosition,
52                  const wxSize& size = wxDefaultSize,
53                  long style = wxCLRP_DEFAULT_STYLE,
54                  const wxValidator& validator = wxDefaultValidatorPtr,
55                  const wxString& name = wxFilePickerCtrlNameStr );
56
57     wxString GetPath() const;
58     void SetPath( const wxString &str );
59 };
60
61 %{
62
63 void
64 new( ... )
65   PPCODE:
66     BEGIN_OVERLOAD()
67         MATCH_VOIDM_REDISP( newDefault )
68         MATCH_ANY_REDISP( newFull )
69     END_OVERLOAD( "Wx::FilePickerCtrl::new" )
70
71 %}
72
73 %name{Wx::DirPickerCtrl} class wxDirPickerCtrl
74 {
75     %name{newDefault} wxDirPickerCtrl()
76         %code{% RETVAL = new wxDirPickerCtrl;
77                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
78                 %};
79     %name{newFull} wxDirPickerCtrl( wxWindow *parent,
80                                     wxWindowID id = wxID_ANY,
81                                     const wxString& path = wxEmptyString,
82                                     const wxString& message = wxDirSelectorPromptStr,
83                                     const wxPoint& pos = wxDefaultPosition,
84                                     const wxSize& size = wxDefaultSize,
85                                     long style = wxCLRP_DEFAULT_STYLE,
86                                     const wxValidator& validator = wxDefaultValidatorPtr,
87                                     const wxString& name = wxDirPickerCtrlNameStr )
88         %code{% RETVAL = new wxDirPickerCtrl( parent, id, path, message,
89                                               pos, size,
90                                               style, *validator, name );
91                 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
92                 %};
93     bool Create( wxWindow *parent,
94                  wxWindowID id = wxID_ANY,
95                  const wxString& path = wxEmptyString,
96                  const wxString& message = wxDirSelectorPromptStr,
97                  const wxPoint& pos = wxDefaultPosition,
98                  const wxSize& size = wxDefaultSize,
99                  long style = wxCLRP_DEFAULT_STYLE,
100                  const wxValidator& validator = wxDefaultValidatorPtr,
101                  const wxString& name = wxDirPickerCtrlNameStr );
102
103     wxString GetPath() const;
104     void SetPath( const wxString &str );
105 };
106
107 %{
108
109 void
110 new( ... )
111   PPCODE:
112     BEGIN_OVERLOAD()
113         MATCH_VOIDM_REDISP( newDefault )
114         MATCH_ANY_REDISP( newFull )
115     END_OVERLOAD( "Wx::DirPickerCtrl::new" )
116
117 %}
118
119 %name{Wx::FileDirPickerEvent} class wxFileDirPickerEvent {
120     wxString GetPath() const;
121     void SetPath( const wxString &p );
122 };
123
124 %{
125 #endif
126 %}