1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/fontpicker.h
3 // Purpose: wxFontButton header
4 // Author: Francesco Montorsi
7 // Copyright: (c) Francesco Montorsi
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GTK_FONTPICKER_H_
13 #define _WX_GTK_FONTPICKER_H_
15 // since GtkFontButton is available only for GTK+ >= 2.4,
16 // we need to use generic version if we detect (at runtime)
18 #include "wx/generic/fontpickerg.h"
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
24 class WXDLLIMPEXP_CORE wxFontButton
: public wxGenericFontButton
28 wxFontButton(wxWindow
*parent
,
30 const wxFont
& initial
= *wxNORMAL_FONT
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
33 long style
= wxFONTBTN_DEFAULT_STYLE
,
34 const wxValidator
& validator
= wxDefaultValidator
,
35 const wxString
& name
= wxFontPickerWidgetNameStr
)
37 Create(parent
, id
, initial
, pos
, size
, style
, validator
, name
);
40 virtual ~wxFontButton();
45 bool Create(wxWindow
*parent
,
47 const wxFont
& initial
= *wxNORMAL_FONT
,
48 const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& size
= wxDefaultSize
,
50 long style
= wxFONTBTN_DEFAULT_STYLE
,
51 const wxValidator
& validator
= wxDefaultValidator
,
52 const wxString
& name
= wxFontPickerWidgetNameStr
);
58 public: // used by the GTK callback only
60 void SetNativeFontInfo(const gchar
*gtkdescription
)
61 { m_selectedFont
.SetNativeFontInfo(wxString::FromAscii(gtkdescription
)); }
64 DECLARE_DYNAMIC_CLASS(wxFontButton
)
67 #endif // _WX_GTK_FONTPICKER_H_