Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / FileDialog.xs
1 #############################################################################
2 ## Name:        XS/FileDialog.xs
3 ## Purpose:     XS for Wx::FileDialog
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     27/11/2000
7 ## RCS-ID:      $Id: FileDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright:   (c) 2000-2002, 2004, 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 #include <wx/filedlg.h>
14
15 MODULE=Wx PACKAGE=Wx::FileDialog
16
17 wxFileDialog*
18 wxFileDialog::new( parent, message = wxFileSelectorPromptStr, defaultDir = wxEmptyString, defaultFile = wxEmptyString, wildcard = wxFileSelectorDefaultWildcardStr, style = 0, pos = wxDefaultPosition )
19     wxWindow* parent
20     wxString message
21     wxString defaultDir
22     wxString defaultFile
23     wxString wildcard
24     long style
25     wxPoint pos
26
27 wxString
28 wxFileDialog::GetDirectory()
29
30 wxString
31 wxFileDialog::GetFilename()
32
33 void
34 wxFileDialog::GetFilenames()
35   PREINIT:
36     wxArrayString filenames;
37     int i, max;
38   PPCODE:
39     THIS->GetFilenames( filenames );
40     max = filenames.GetCount();
41     EXTEND( SP, max );
42     for( i = 0; i < max; ++i ) {
43 #if wxUSE_UNICODE
44       SV* tmp = sv_2mortal( newSVpv( filenames[i].mb_str(wxConvUTF8), 0 ) );
45       SvUTF8_on( tmp );
46       PUSHs( tmp );
47 #else
48       PUSHs( sv_2mortal( newSVpv( CHAR_P filenames[i].c_str(), 0 ) ) );
49 #endif
50     }
51
52 int
53 wxFileDialog::GetFilterIndex()
54
55 wxString
56 wxFileDialog::GetMessage()
57
58 wxString
59 wxFileDialog::GetPath()
60
61 void
62 wxFileDialog::GetPaths()
63   PREINIT:
64     wxArrayString filenames;
65     int i, max;
66   PPCODE:
67     THIS->GetPaths( filenames );
68     max = filenames.GetCount();
69     EXTEND( SP, max );
70     for( i = 0; i < max; ++i ) {
71 #if wxUSE_UNICODE
72       SV* tmp = sv_2mortal( newSVpv( filenames[i].mb_str(wxConvUTF8), 0 ) );
73       SvUTF8_on( tmp );
74       PUSHs( tmp );
75 #else
76       PUSHs( sv_2mortal( newSVpv( CHAR_P filenames[i].c_str(), 0 ) ) );
77 #endif
78     }
79
80 #if WXPERL_W_VERSION_LT( 2, 7, 0 )
81
82 long
83 wxFileDialog::GetStyle()
84
85 #endif
86
87 wxString
88 wxFileDialog::GetWildcard()
89
90 void
91 wxFileDialog::SetDirectory( directory )
92     wxString directory
93
94 void
95 wxFileDialog::SetFilename( name )
96     wxString name
97
98 void
99 wxFileDialog::SetFilterIndex( index )
100     int index
101
102 void
103 wxFileDialog::SetMessage( message )
104     wxString message
105
106 void
107 wxFileDialog::SetPath( path )
108     wxString path
109
110 #if WXPERL_W_VERSION_LT( 2, 7, 0 )
111
112 void
113 wxFileDialog::SetStyle( style )
114     long style
115
116 #endif
117
118 void
119 wxFileDialog::SetWildcard( wildcard )
120     wxString wildcard
121
122 int
123 wxFileDialog::ShowModal()
124
125 MODULE=Wx PACKAGE=Wx PREFIX=wx
126
127 wxString
128 wxFileSelector( message, default_path = wxEmptyString, default_filename = wxEmptyString, default_extension = wxEmptyString, wildcard = wxT("*.*"), flags = 0, parent = 0, x = -1, y = -1 )
129     wxString message
130     wxString default_path
131     wxString default_filename
132     wxString default_extension
133     wxString wildcard
134     int flags
135     wxWindow* parent
136     int x
137     int y