X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..67193066b2d16ca36529216f70d093690d7e1123:/src/mac/classic/dialog.cpp diff --git a/src/mac/classic/dialog.cpp b/src/mac/classic/dialog.cpp index 4de3a891db..198acc1f4c 100644 --- a/src/mac/classic/dialog.cpp +++ b/src/mac/classic/dialog.cpp @@ -1,27 +1,30 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dialog.cpp +// Name: src/mac/classic/dialog.cpp // Purpose: wxDialog class // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#include "wx/wxprec.h" + #include "wx/dialog.h" -#include "wx/utils.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/settings.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/frame.h" + #include "wx/settings.h" +#endif // WX_PRECOMP #include "wx/mac/uma.h" // Lists to keep track of windows, so we can disable/enable them // for modal dialogs wxList wxModalDialogs; -//wxList wxModelessWindows; // Frames and modeless dialogs -extern wxList wxPendingDelete; IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) @@ -54,14 +57,14 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) - return FALSE; + return false; MacCreateRealWindow( title , pos , size , MacRemoveBordersFromStyle(style) & ~(wxYES|wxOK|wxNO|wxCANCEL) , name ) ; m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; - return TRUE; + return true; } void wxDialog::SetModal(bool flag) @@ -85,8 +88,8 @@ void wxDialog::SetModal(bool flag) wxDialog::~wxDialog() { - m_isBeingDeleted = TRUE; - Show(FALSE); + m_isBeingDeleted = true; + Show(false); } // By default, pressing escape cancels the dialog , on mac command-stop does the same thing @@ -124,7 +127,7 @@ bool wxDialog::Show(bool show) if ( !wxDialogBase::Show(show) ) { // nothing to do - return FALSE; + return false; } if ( show ) @@ -141,13 +144,13 @@ bool wxDialog::Show(bool show) } else // end of modal dialog { - // this will cause IsModalShowing() return FALSE and our local + // this will cause IsModalShowing() return false and our local // message loop will terminate wxModalDialogs.DeleteObject(this); } } - return TRUE; + return true; } #if !TARGET_CARBON @@ -182,15 +185,15 @@ void wxDialog::DoShowModal() } -// Replacement for Show(TRUE) for modal dialogs - returns return code +// Replacement for Show(true) for modal dialogs - returns return code int wxDialog::ShowModal() { if ( !IsModal() ) { - SetModal(TRUE); + SetModal(true); } - Show(TRUE); + Show(true); return GetReturnCode(); } @@ -198,8 +201,8 @@ int wxDialog::ShowModal() // dialogs and should work for both of them void wxDialog::EndModal(int retCode) { - SetReturnCode(retCode); - Show(FALSE); + SetReturnCode(retCode); + Show(false); } // Standard buttons @@ -258,4 +261,3 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); Refresh(); } -