]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/fontpicker.h
more wxVector<T> tests
[wxWidgets.git] / include / wx / fontpicker.h
index 4175ba3f05ac35549d1d2a5c2f7842d5683681ab..2f12112fc3b9e85b3aafd96f72e6408a23043456 100644 (file)
@@ -20,7 +20,7 @@
 #include "wx/pickerbase.h"
 
 
 #include "wx/pickerbase.h"
 
 
-class WXDLLIMPEXP_CORE wxFontPickerEvent;
+class WXDLLIMPEXP_FWD_CORE wxFontPickerEvent;
 
 extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerWidgetNameStr[];
 extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerCtrlNameStr[];
 
 extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerWidgetNameStr[];
 extern WXDLLEXPORT_DATA(const wxChar) wxFontPickerCtrlNameStr[];
@@ -66,7 +66,8 @@ protected:
 // uses the currently selected font to draw the label of the button
 #define wxFNTP_USEFONT_FOR_LABEL      0x0010
 
 // uses the currently selected font to draw the label of the button
 #define wxFNTP_USEFONT_FOR_LABEL      0x0010
 
-#if defined(__WXGTK24__)        // since GTK > 2.4, there is GtkFontButton
+// since GTK > 2.4, there is GtkFontButton
+#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
     #include "wx/gtk/fontpicker.h"
     #define wxFontPickerWidget      wxFontButton
 #else
     #include "wx/gtk/fontpicker.h"
     #define wxFontPickerWidget      wxFontButton
 #else
@@ -106,7 +107,7 @@ public:
 
     wxFontPickerCtrl(wxWindow *parent,
                      wxWindowID id,
 
     wxFontPickerCtrl(wxWindow *parent,
                      wxWindowID id,
-                     const wxFont& initial = *wxNORMAL_FONT,
+                     const wxFont& initial = wxNullFont,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
                      long style = wxFNTP_DEFAULT_STYLE,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
                      long style = wxFNTP_DEFAULT_STYLE,
@@ -120,7 +121,7 @@ public:
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
-                const wxFont& initial = *wxNORMAL_FONT,
+                const wxFont& initial = wxNullFont,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = wxFNTP_DEFAULT_STYLE,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = wxFNTP_DEFAULT_STYLE,
@@ -194,10 +195,13 @@ public:
     wxFont GetFont() const { return m_font; }
     void SetFont(const wxFont &c) { m_font = c; }
 
     wxFont GetFont() const { return m_font; }
     void SetFont(const wxFont &c) { m_font = c; }
 
+    // default copy ctor, assignment operator and dtor are ok
+    virtual wxEvent *Clone() const { return new wxFontPickerEvent(*this); }
+
 private:
     wxFont m_font;
 
 private:
     wxFont m_font;
 
-    DECLARE_DYNAMIC_CLASS_NO_COPY(wxFontPickerEvent)
+    DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFontPickerEvent)
 };
 
 // ----------------------------------------------------------------------------
 };
 
 // ----------------------------------------------------------------------------
@@ -212,13 +216,6 @@ typedef void (wxEvtHandler::*wxFontPickerEventFunction)(wxFontPickerEvent&);
 #define EVT_FONTPICKER_CHANGED(id, fn) \
     wx__DECLARE_EVT1(wxEVT_COMMAND_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn))
 
 #define EVT_FONTPICKER_CHANGED(id, fn) \
     wx__DECLARE_EVT1(wxEVT_COMMAND_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn))
 
-#ifdef _WX_DEFINE_DATE_EVENTS_
-    DEFINE_EVENT_TYPE(wxEVT_COMMAND_FONTPICKER_CHANGED)
-
-    IMPLEMENT_DYNAMIC_CLASS(wxFontPickerEvent, wxCommandEvent)
-#endif
-
-
 
 #endif // wxUSE_FONTPICKERCTRL
 
 
 #endif // wxUSE_FONTPICKERCTRL