X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5dbe15d0bacde245539f54c4d97af6b4696f01f..a721fd82b7ca8c97048453d4aaff559e8f741d69:/include/wx/fontpicker.h diff --git a/include/wx/fontpicker.h b/include/wx/fontpicker.h index 2f12112fc3..0c5e01e420 100644 --- a/include/wx/fontpicker.h +++ b/include/wx/fontpicker.h @@ -22,8 +22,8 @@ class WXDLLIMPEXP_FWD_CORE wxFontPickerEvent; -extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerWidgetNameStr[]; -extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerCtrlNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFontPickerWidgetNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxFontPickerCtrlNameStr[]; // ---------------------------------------------------------------------------- @@ -66,8 +66,11 @@ protected: // uses the currently selected font to draw the label of the button #define wxFNTP_USEFONT_FOR_LABEL 0x0010 -// since GTK > 2.4, there is GtkFontButton -#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__) +#define wxFONTBTN_DEFAULT_STYLE \ + (wxFNTP_FONTDESC_AS_LABEL | wxFNTP_USEFONT_FOR_LABEL) + +// native version currently only exists in wxGTK2 +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #include "wx/gtk/fontpicker.h" #define wxFontPickerWidget wxFontButton #else @@ -177,9 +180,7 @@ private: // wxFontPickerEvent: used by wxFontPickerCtrl only // ---------------------------------------------------------------------------- -BEGIN_DECLARE_EVENT_TYPES() - DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_FONTPICKER_CHANGED, 1102) -END_DECLARE_EVENT_TYPES() +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FONTPICKER_CHANGED, wxFontPickerEvent ) class WXDLLIMPEXP_CORE wxFontPickerEvent : public wxCommandEvent { @@ -211,7 +212,7 @@ private: typedef void (wxEvtHandler::*wxFontPickerEventFunction)(wxFontPickerEvent&); #define wxFontPickerEventHandler(func) \ - (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFontPickerEventFunction, &func) + wxEVENT_HANDLER_CAST(wxFontPickerEventFunction, func) #define EVT_FONTPICKER_CHANGED(id, fn) \ wx__DECLARE_EVT1(wxEVT_COMMAND_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn))