X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/62f864c32c53356b7228591c85b14abc491c46f0..b4446c244775324631b8dd2b588ea35f32e71728:/src/mac/classic/dialog.cpp diff --git a/src/mac/classic/dialog.cpp b/src/mac/classic/dialog.cpp index 2275c0dd7d..f4f2a537fc 100644 --- a/src/mac/classic/dialog.cpp +++ b/src/mac/classic/dialog.cpp @@ -1,23 +1,24 @@ ///////////////////////////////////////////////////////////////////////////// -// 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 ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "dialog.h" -#endif +#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" @@ -58,14 +59,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) @@ -89,8 +90,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 @@ -128,7 +129,7 @@ bool wxDialog::Show(bool show) if ( !wxDialogBase::Show(show) ) { // nothing to do - return FALSE; + return false; } if ( show ) @@ -145,13 +146,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 @@ -186,15 +187,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(); } @@ -202,8 +203,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 @@ -262,4 +263,3 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); Refresh(); } -