/////////////////////////////////////////////////////////////////////////////
-// 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"
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)
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
if ( !wxDialogBase::Show(show) )
{
// nothing to do
- return FALSE;
+ return false;
}
if ( 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
}
-// 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();
}
// dialogs and should work for both of them
void wxDialog::EndModal(int retCode)
{
- SetReturnCode(retCode);
- Show(FALSE);
+ SetReturnCode(retCode);
+ Show(false);
}
// Standard buttons
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
Refresh();
}
-