Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / Dialog.xs
1 #############################################################################
2 ## Name:        XS/Dialog.xs
3 ## Purpose:     XS for Wx::Dialog
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     29/10/2000
7 ## RCS-ID:      $Id: Dialog.xs 2382 2008-04-27 16:51:03Z mbarbon $
8 ## Copyright:   (c) 2000-2001, 2003-2004, 2006-2008 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 #include <wx/dialog.h>
16 #include <wx/sizer.h>
17 #include <wx/button.h>
18 #include "cpp/dialog.h"
19 #include "cpp/overload.h"
20
21 %typemap{wxDialogLayoutAdaptationMode}{simple};
22
23 %name{Wx::Dialog} class wxDialog {
24 #if WXPERL_W_VERSION_GE( 2, 6, 3 )
25     void SetAffirmativeId( int affirmativeId );
26     int GetAffirmativeId();
27
28     int GetEscapeId() const;
29 #endif
30 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
31     void SetEscapeId( int escapeId );
32 #endif
33     wxSizer* CreateTextSizer( const wxString &message );
34     wxSizer* CreateButtonSizer( long flags );
35 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
36     wxSizer* CreateSeparatedButtonSizer( long flags );
37 #endif
38 #if WXPERL_W_VERSION_GE( 2, 6, 0 )
39     wxSizer* CreateStdDialogButtonSizer( long flags );
40 #endif
41 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
42     void AddMainButtonId( wxWindowID id );
43     bool IsMainButtonId( wxWindowID id ) const;
44 %{
45 void
46 wxDialog::GetMainButtonIds()
47   PPCODE:
48     PUTBACK;
49     wxPli_intarray_push( aTHX_ THIS->GetMainButtonIds() );
50     SPAGAIN;
51 %}
52
53     bool CanDoLayoutAdaptation();
54
55     package_static bool IsLayoutAdaptationEnabled();
56     package_static void EnableLayoutAdaptation( bool enable );
57
58     wxWindow* GetContentWindow();
59
60     void SetLayoutAdaptationLevel( int level );
61     int GetLayoutAdaptationLevel() const;
62
63     void SetLayoutAdaptationMode( wxDialogLayoutAdaptationMode mode );
64     wxDialogLayoutAdaptationMode GetLayoutAdaptationMode() const;
65
66     void SetLayoutAdaptationDone( bool adaptationDone );
67     bool GetLayoutAdaptationDone() const;
68
69 #if defined(__WXMSW__) && defined(__POCKETPC__)
70     wxToolBar* GetToolBar() const;
71 #endif
72 #endif
73 };
74
75 %{
76 void
77 new( ... )
78   PPCODE:
79     BEGIN_OVERLOAD()
80         MATCH_VOIDM_REDISP( newDefault )
81         MATCH_ANY_REDISP( newFull )
82     END_OVERLOAD( "Wx::Dialog::new" )
83
84 wxDialog*
85 newDefault( CLASS )
86     PlClassName CLASS
87   CODE:
88     RETVAL = new wxPliDialog( CLASS );
89     wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
90   OUTPUT: RETVAL
91
92 wxDialog*
93 newFull( CLASS, parent, id = wxID_ANY, title = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_DIALOG_STYLE, name = wxDialogNameStr )
94       PlClassName CLASS
95       wxWindow* parent
96       wxWindowID id
97       wxString title
98       wxPoint pos
99       wxSize size
100       long style
101       wxString name
102     CODE:
103       RETVAL = new wxPliDialog( CLASS, parent, id, title, pos,
104           size, style, name );
105     OUTPUT:
106       RETVAL
107
108 bool
109 wxDialog::Create( parent, id = wxID_ANY, title = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_DIALOG_STYLE, name = wxDialogNameStr )
110     wxWindow* parent
111     wxWindowID id
112     wxString title
113     wxPoint pos
114     wxSize size
115     long style
116     wxString name
117
118 void
119 wxDialog::EndModal( retCode )
120     int retCode
121
122 int
123 wxDialog::GetReturnCode()
124
125 wxString
126 wxDialog::GetTitle()
127
128 bool
129 wxDialog::IsModal()
130
131 # void
132 # wxDialog::SetModal( flag )
133 #    bool flag
134
135 void
136 wxDialog::SetIcon( icon )
137     wxIcon* icon
138   C_ARGS: *icon
139
140 void
141 wxDialog::SetIcons( icons )
142     wxIconBundle* icons
143   C_ARGS: *icons
144
145 void
146 wxDialog::SetReturnCode( retCode )
147     int retCode
148
149 void
150 wxDialog::SetTitle( title )
151     wxString title
152
153 int
154 wxDialog::ShowModal()
155
156 #if WXPERL_W_VERSION_GE( 2, 5, 4 )
157
158 void
159 wxDialog::SetFocusIgnoringChildren()
160
161 #endif
162
163 bool
164 wxDialog::TransferDataFromWindow()
165   CODE:
166     RETVAL = THIS->wxDialog::TransferDataFromWindow();
167   OUTPUT:
168     RETVAL
169
170 bool
171 wxDialog::TransferDataToWindow()
172   CODE:
173     RETVAL = THIS->wxDialog::TransferDataToWindow();
174   OUTPUT:
175     RETVAL
176
177 bool
178 wxDialog::Validate()
179   CODE:
180     RETVAL = THIS->wxDialog::Validate();
181   OUTPUT:
182     RETVAL
183
184 %}