]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk1/fontdlg.h
add an assert indicating that old code overriding OnExecute() must be updated with 2.9
[wxWidgets.git] / include / wx / gtk1 / fontdlg.h
index d6f157bc71cb7bae20ae71a6a50ff55db3434cf1..aebdeb52d3312a6b4df73434529f6dca0e706f45 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        fontdlgg.h
+// Name:        wx/gtk1/fontdlgg.h
 // Purpose:     wxFontDialog
 // Author:      Robert Roebling
 // Created:
 #ifndef __GTK_FONTDLGH__
 #define __GTK_FONTDLGH__
 
-#ifdef __GNUG__
-#pragma interface "fontdlg.h"
-#endif
-
-#include "wx/setup.h"
-#include "wx/gdicmn.h"
-#include "wx/font.h"
-#include "wx/dialog.h"
-#include "wx/cmndata.h"
-
-//-----------------------------------------------------------------------------
-// classes
-//-----------------------------------------------------------------------------
-
-class wxFontDialog;
-
 //-----------------------------------------------------------------------------
 // wxFontDialog
 //-----------------------------------------------------------------------------
 
-class wxFontDialog: public wxDialog
+class WXDLLIMPEXP_CORE wxFontDialog : public wxFontDialogBase
 {
 public:
-    wxFontDialog() {}
-    wxFontDialog( wxWindow *parent, wxFontData *data = (wxFontData *) NULL );
-    ~wxFontDialog();
+    wxFontDialog() : wxFontDialogBase() { /* must be Create()d later */ }
+    wxFontDialog(wxWindow *parent)
+        : wxFontDialogBase(parent) { Create(parent); }
+    wxFontDialog(wxWindow *parent, const wxFontData& data)
+        : wxFontDialogBase(parent, data) { Create(parent, data); }
+
+    virtual ~wxFontDialog();
 
-    wxFontData& GetFontData() { return m_fontData; }
+    // implementation only
+    void SetChosenFont(const char *name);
 
-//protected:
-    wxFontData m_fontData;
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated interface, don't use
+    wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+protected:
+    // create the GTK dialog
+    virtual bool DoCreate(wxWindow *parent);
 
 private:
     DECLARE_DYNAMIC_CLASS(wxFontDialog)
 };
 
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated interface, don't use
+inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data)
+        : wxFontDialogBase(parent) { InitFontData(data); Create(parent); }
+#endif // WXWIN_COMPATIBILITY_2_6
+
 #endif