]> git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/fontdlg.cpp
e2f20113dc796e67b14895db3b9da0a82c642311
[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 #ifdef __GNUG__
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 #if !USE_SHARED_LIBRARY
41 IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
42 #endif
43
44 #include "wx/mac/private.h"
45
46 // ---------------------------------------------------------------------------
47 // wxFontDialog stub for mac OS's without a native font dialog
48 // ---------------------------------------------------------------------------
49
50 wxFontDialog::wxFontDialog()
51 {
52 m_dialogParent = NULL;
53 }
54
55 wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData& data)
56 {
57 Create(parent, data);
58 }
59
60 wxFontDialog::~wxFontDialog()
61 {
62 // empty
63 }
64
65 void wxFontDialog::SetData(wxFontData& fontdata)
66 {
67 m_fontData = fontdata;
68 }
69
70 bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
71 {
72 m_dialogParent = parent;
73
74 m_fontData = data;
75
76 // TODO: you may need to do dialog creation here, unless it's
77 // done in ShowModal.
78 return TRUE;
79 }
80
81 bool wxFontDialog::IsShown() const
82 {
83 return false;
84 }
85
86 int wxFontDialog::ShowModal()
87 {
88 // TODO: show (maybe create) the dialog
89 return wxID_CANCEL;
90 }
91
92 #endif // 10.2+