X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cfe590ae1d2d65ddc03c13171621cfa1b233ac7b..527343602e91d60c65fb7589a6ddcf4683930c78:/include/wx/mac/carbon/fontdlg.h diff --git a/include/wx/mac/carbon/fontdlg.h b/include/wx/mac/carbon/fontdlg.h index 6eaabc4f73..b9533bea69 100644 --- a/include/wx/mac/carbon/fontdlg.h +++ b/include/wx/mac/carbon/fontdlg.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: fontdlg.h -// Purpose: wxFontDialog class using fonts window services (10.2+). +// Name: wx/mac/carbon/fontdlg.h +// Purpose: wxFontDialog class using fonts window services (10.2+). // Author: Ryan Norton // Modified by: // Created: 2004-09-25 @@ -15,6 +15,42 @@ #include "wx/dialog.h" #include "wx/cmndata.h" +/* + * Font dialog + */ + +#ifndef wxMAC_USE_EXPERIMENTAL_FONTDIALOG +#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 +#define wxMAC_USE_EXPERIMENTAL_FONTDIALOG 0 +#else +#define wxMAC_USE_EXPERIMENTAL_FONTDIALOG 1 +#endif +#endif + +#if wxMAC_USE_EXPERIMENTAL_FONTDIALOG + +class WXDLLEXPORT wxFontDialog : public wxDialog +{ +public: + wxFontDialog(); + wxFontDialog(wxWindow *parent, const wxFontData& data); + virtual ~wxFontDialog(); + + bool Create(wxWindow *parent, const wxFontData& data); + + int ShowModal(); + wxFontData& GetFontData() { return m_fontData; } + +protected: + wxFontData m_fontData; + + DECLARE_DYNAMIC_CLASS_NO_COPY(wxFontDialog) +}; + +extern "C" int RunMixedFontDialog(wxFontDialog* dialog) ; + +#else // wxMAC_USE_EXPERIMENTAL_FONTDIALOG + #if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX /*! @@ -46,10 +82,6 @@ class WXDLLEXPORT wxCheckBox; #endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX -/* - * Font dialog - */ - class WXDLLEXPORT wxFontDialog: public wxDialog { DECLARE_DYNAMIC_CLASS(wxFontDialog) @@ -61,7 +93,7 @@ DECLARE_EVENT_TABLE() public: wxFontDialog(); wxFontDialog(wxWindow *parent, const wxFontData& data); - ~wxFontDialog(); + virtual ~wxFontDialog(); bool Create(wxWindow *parent, const wxFontData& data); @@ -129,9 +161,10 @@ public: protected: wxWindow* m_dialogParent; wxFontData m_fontData; - void* m_pEventHandlerRef; + void* m_pEventHandlerRef; }; #endif - // _WX_FONTDLG_H_ +#endif + // _WX_FONTDLG_H_