]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/fontdlg.cpp
fixed (harmless) unused variable warning in release build
[wxWidgets.git] / src / mac / carbon / fontdlg.cpp
index 9a0843d64bc0aba3ca60e6ea408328178ee18bfd..14f02f419044743d5dab354f8938c081bc8cca2e 100644 (file)
@@ -1,53 +1,94 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        fontdlg.cpp
-// Purpose:     wxFontDialog class. NOTE: you can use the generic class
-//              if you wish, instead of implementing this.
-// Author:      AUTHOR
+// Purpose:     wxFontDialog class for carbon 10.2+.
+// Author:      Ryan Norton
 // Modified by:
-// Created:     ??/??/98
+// Created:     1998-01-01
 // RCS-ID:      $Id$
-// Copyright:   (c) AUTHOR
-// 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"
 
 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
 
-/*
- * wxFontDialog
- */
+#include "wx/mac/private.h"
+
+// ---------------------------------------------------------------------------
+// wxFontDialog stub for mac OS's without a native font dialog
+// ---------------------------------------------------------------------------
 
 wxFontDialog::wxFontDialog()
 {
     m_dialogParent = NULL;
 }
 
-wxFontDialog::wxFontDialog(wxWindow *parent, wxFontData *data)
+wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData&  data)
 {
     Create(parent, data);
 }
 
-bool wxFontDialog::Create(wxWindow *parent, wxFontData *data)
+wxFontDialog::~wxFontDialog()
+{
+    // empty
+}
+
+void wxFontDialog::SetData(wxFontData& fontdata)
+{
+    m_fontData = fontdata;
+}
+
+bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
 {
     m_dialogParent = parent;
 
-    if (data)
-        m_fontData = *data;
+    m_fontData = data;
 
     // TODO: you may need to do dialog creation here, unless it's
     // done in ShowModal.
     return TRUE;
 }
 
+bool wxFontDialog::IsShown() const
+{
+    return false;
+}
+
 int wxFontDialog::ShowModal()
 {
     // TODO: show (maybe create) the dialog
     return wxID_CANCEL;
 }
 
+#endif // 10.2+