X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..764e66945ac93bb6c868265106176ac58c0848a0:/src/mac/carbon/fontdlg.cpp diff --git a/src/mac/carbon/fontdlg.cpp b/src/mac/carbon/fontdlg.cpp index 03c894c553..23f99696b1 100644 --- a/src/mac/carbon/fontdlg.cpp +++ b/src/mac/carbon/fontdlg.cpp @@ -1,29 +1,55 @@ ///////////////////////////////////////////////////////////////////////////// // Name: fontdlg.cpp -// Purpose: wxFontDialog class. NOTE: you can use the generic class -// if you wish, instead of implementing this. -// Author: Stefan Csomor +// Purpose: wxFontDialog class for carbon 10.2+. +// Author: Ryan Norton // Modified by: // Created: 1998-01-01 // RCS-ID: $Id$ -// Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Copyright: (c) Ryan Norton +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +// =========================================================================== +// declarations +// =========================================================================== + +// --------------------------------------------------------------------------- +// headers +// --------------------------------------------------------------------------- + +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "fontdlg.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/cmndata.h" +#endif + +#include "wx/fontdlg.h" + + +#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX + +#undef wxFontDialog + #include "wx/mac/fontdlg.h" -#include "wx/cmndata.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) #endif -/* - * wxFontDialog - */ +#include "wx/mac/private.h" + +// --------------------------------------------------------------------------- +// wxFontDialog stub for mac OS's without a native font dialog +// --------------------------------------------------------------------------- wxFontDialog::wxFontDialog() { @@ -35,6 +61,16 @@ wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData& data) Create(parent, data); } +wxFontDialog::~wxFontDialog() +{ + // empty +} + +void wxFontDialog::SetData(wxFontData& fontdata) +{ + m_fontData = fontdata; +} + bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data) { m_dialogParent = parent; @@ -46,9 +82,15 @@ bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data) return TRUE; } +bool wxFontDialog::IsShown() const +{ + return false; +} + int wxFontDialog::ShowModal() { // TODO: show (maybe create) the dialog return wxID_CANCEL; } +#endif // 10.2+