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