// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "univdialog.h"
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+ #pragma implementation "univdialog.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+ #include "wx/dialog.h"
+ #include "wx/utils.h"
+ #include "wx/app.h"
#endif
-#include "wx/dialog.h"
-#include "wx/utils.h"
#include "wx/evtloop.h"
-#include "wx/app.h"
//-----------------------------------------------------------------------------
// wxDialog
m_returnCode = 0;
m_windowDisabler = NULL;
m_eventLoop = NULL;
- m_isShowingModal = FALSE;
+ m_isShowingModal = false;
}
wxDialog::~wxDialog()
const wxPoint &pos, const wxSize &size,
long style, const wxString &name)
{
- SetExtraStyle(GetExtraStyle() | wxTLW_EX_DIALOG);
+ SetExtraStyle(GetExtraStyle() | wxTOPLEVEL_EX_DIALOG);
// all dialogs should have tab traversal enabled
style |= wxTAB_TRAVERSAL;
else
{
SetReturnCode(wxID_CANCEL);
- Show(FALSE);
+ Show(false);
}
}
else
{
SetReturnCode(wxID_OK);
- Show(FALSE);
+ Show(false);
}
}
}
return m_isShowingModal;
}
-void wxDialog::SetModal(bool WXUNUSED(flag))
-{
- wxFAIL_MSG( wxT("wxDialog:SetModal obsolete now") );
-}
-
int wxDialog::ShowModal()
{
if ( IsModal() )
}
}
- wxBusyCursorSuspender cs; // temporarily suppress the busy cursor
+ Show(true);
- Show(TRUE);
-
- m_isShowingModal = TRUE;
+ m_isShowingModal = true;
wxASSERT_MSG( !m_windowDisabler, _T("disabling windows twice?") );
+#if defined(__WXGTK__) || defined(__WXMGL__)
+ wxBusyCursorSuspender suspender;
+ // FIXME (FIXME_MGL) - make sure busy cursor disappears under MSW too
+#endif
+
m_windowDisabler = new wxWindowDisabler(this);
if ( !m_eventLoop )
m_eventLoop = new wxEventLoop;
return;
}
- m_isShowingModal = FALSE;
+ m_isShowingModal = false;
m_eventLoop->Exit();
- Show(FALSE);
+ Show(false);
}