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