1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/dialog.cpp
3 // Purpose: wxDialog class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
27 #include "wx/dialog.h"
33 #include "wx/settings.h"
38 #include "wx/evtloop.h"
39 #include "wx/scopedptr.h"
41 // ----------------------------------------------------------------------------
43 // ----------------------------------------------------------------------------
45 // ----------------------------------------------------------------------------
47 // ----------------------------------------------------------------------------
49 // this is simply a container for any data we need to implement modality which
50 // allows us to avoid changing wxDialog each time the implementation changes
51 class wxDialogModalData
54 wxDialogModalData(wxDialog
*dialog
) : m_evtLoop(dialog
) { }
67 wxModalEventLoop m_evtLoop
;
70 wxDEFINE_TIED_SCOPED_PTR_TYPE(wxDialogModalData
);
72 // ============================================================================
74 // ============================================================================
76 // ----------------------------------------------------------------------------
77 // wxDialog construction
78 // ----------------------------------------------------------------------------
84 bool wxDialog::Create(wxWindow
*parent
,
86 const wxString
& title
,
92 if ( !wxTopLevelWindow::Create(parent
, id
, title
, pos
, size
, style
, name
) )
102 // ----------------------------------------------------------------------------
103 // showing the dialogs
104 // ----------------------------------------------------------------------------
106 bool wxDialog::Show(bool show
)
108 if (show
&& CanDoLayoutAdaptation())
109 DoLayoutAdaptation();
111 return wxTopLevelWindowPalm::Show (show
);
114 void wxDialog::Raise()
118 // show dialog modally
119 int wxDialog::ShowModal()
123 if (errNone
== FrmDoDialog ((FormType
*)wxTopLevelWindow::GetForm())) {
129 void wxDialog::EndModal(int retCode
)