]> git.saurik.com Git - wxWidgets.git/blame - src/mac/carbon/fontdlg.cpp
added test for wxScopeGuard
[wxWidgets.git] / src / mac / carbon / fontdlg.cpp
CommitLineData
e9576ca5
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: fontdlg.cpp
72fcdc75
RN
3// Purpose: wxFontDialog class for carbon 10.2+.
4// Author: Ryan Norton
e9576ca5 5// Modified by:
a31a5f85 6// Created: 1998-01-01
e9576ca5 7// RCS-ID: $Id$
72fcdc75
RN
8// Copyright: (c) Ryan Norton
9// Licence: wxWindows licence
e9576ca5
SC
10/////////////////////////////////////////////////////////////////////////////
11
1553abf4
RN
12// ===========================================================================
13// declarations
14// ===========================================================================
15
16// ---------------------------------------------------------------------------
17// headers
18// ---------------------------------------------------------------------------
19
3d1a4878 20#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
e9576ca5
SC
21#pragma implementation "fontdlg.h"
22#endif
23
1553abf4
RN
24// For compilers that support precompilation, includes "wx.h".
25#include "wx/wxprec.h"
26
27#ifdef __BORLANDC__
28 #pragma hdrstop
29#endif
30
31#ifndef WX_PRECOMP
1553abf4
RN
32 #include "wx/cmndata.h"
33#endif
e9576ca5 34
356c775f 35#include "wx/fontdlg.h"
154ad28b 36
356c775f
RN
37
38#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
39
551caf8b
RN
40#undef wxFontDialog
41
42#include "wx/mac/fontdlg.h"
43
e9576ca5 44IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
e9576ca5 45
72fcdc75
RN
46#include "wx/mac/private.h"
47
1553abf4
RN
48// ---------------------------------------------------------------------------
49// wxFontDialog stub for mac OS's without a native font dialog
50// ---------------------------------------------------------------------------
e9576ca5
SC
51
52wxFontDialog::wxFontDialog()
53{
54 m_dialogParent = NULL;
55}
56
baaae89f 57wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData& data)
e9576ca5
SC
58{
59 Create(parent, data);
60}
61
b9242cc7
DS
62wxFontDialog::~wxFontDialog()
63{
64 // empty
65}
66
72fcdc75
RN
67void wxFontDialog::SetData(wxFontData& fontdata)
68{
69 m_fontData = fontdata;
70}
71
baaae89f 72bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
e9576ca5
SC
73{
74 m_dialogParent = parent;
75
baaae89f 76 m_fontData = data;
e9576ca5
SC
77
78 // TODO: you may need to do dialog creation here, unless it's
79 // done in ShowModal.
80 return TRUE;
81}
82
72fcdc75
RN
83bool wxFontDialog::IsShown() const
84{
85 return false;
86}
87
e9576ca5
SC
88int wxFontDialog::ShowModal()
89{
90 // TODO: show (maybe create) the dialog
91 return wxID_CANCEL;
92}
93
3d1a4878 94#endif // 10.2+