1 #############################################################################
3 ## Purpose: XS for Wx::Dialog
4 ## Author: Mattia Barbon
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 #############################################################################
15 #include <wx/dialog.h>
17 #include <wx/button.h>
18 #include "cpp/dialog.h"
19 #include "cpp/overload.h"
21 %typemap{wxDialogLayoutAdaptationMode}{simple};
23 %name{Wx::Dialog} class wxDialog {
24 #if WXPERL_W_VERSION_GE( 2, 6, 3 )
25 void SetAffirmativeId( int affirmativeId );
26 int GetAffirmativeId();
28 int GetEscapeId() const;
30 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
31 void SetEscapeId( int escapeId );
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 );
38 #if WXPERL_W_VERSION_GE( 2, 6, 0 )
39 wxSizer* CreateStdDialogButtonSizer( long flags );
41 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
42 void AddMainButtonId( wxWindowID id );
43 bool IsMainButtonId( wxWindowID id ) const;
46 wxDialog::GetMainButtonIds()
49 wxPli_intarray_push( aTHX_ THIS->GetMainButtonIds() );
53 bool CanDoLayoutAdaptation();
55 package_static bool IsLayoutAdaptationEnabled();
56 package_static void EnableLayoutAdaptation( bool enable );
58 wxWindow* GetContentWindow();
60 void SetLayoutAdaptationLevel( int level );
61 int GetLayoutAdaptationLevel() const;
63 void SetLayoutAdaptationMode( wxDialogLayoutAdaptationMode mode );
64 wxDialogLayoutAdaptationMode GetLayoutAdaptationMode() const;
66 void SetLayoutAdaptationDone( bool adaptationDone );
67 bool GetLayoutAdaptationDone() const;
69 #if defined(__WXMSW__) && defined(__POCKETPC__)
70 wxToolBar* GetToolBar() const;
80 MATCH_VOIDM_REDISP( newDefault )
81 MATCH_ANY_REDISP( newFull )
82 END_OVERLOAD( "Wx::Dialog::new" )
88 RETVAL = new wxPliDialog( CLASS );
89 wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
93 newFull( CLASS, parent, id = wxID_ANY, title = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_DIALOG_STYLE, name = wxDialogNameStr )
103 RETVAL = new wxPliDialog( CLASS, parent, id, title, pos,
109 wxDialog::Create( parent, id = wxID_ANY, title = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_DIALOG_STYLE, name = wxDialogNameStr )
119 wxDialog::EndModal( retCode )
123 wxDialog::GetReturnCode()
132 # wxDialog::SetModal( flag )
136 wxDialog::SetIcon( icon )
141 wxDialog::SetIcons( icons )
146 wxDialog::SetReturnCode( retCode )
150 wxDialog::SetTitle( title )
154 wxDialog::ShowModal()
156 #if WXPERL_W_VERSION_GE( 2, 5, 4 )
159 wxDialog::SetFocusIgnoringChildren()
164 wxDialog::TransferDataFromWindow()
166 RETVAL = THIS->wxDialog::TransferDataFromWindow();
171 wxDialog::TransferDataToWindow()
173 RETVAL = THIS->wxDialog::TransferDataToWindow();
180 RETVAL = THIS->wxDialog::Validate();