1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/fontpicker.h
3 // Purpose: wxFontButton header
4 // Author: Francesco Montorsi
7 // Copyright: (c) Francesco Montorsi
8 // Licence: wxWindows Licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GTK_FONTPICKER_H_
12 #define _WX_GTK_FONTPICKER_H_
14 #include "wx/button.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxFontButton
: public wxButton
,
21 public wxFontPickerWidgetBase
25 wxFontButton(wxWindow
*parent
,
27 const wxFont
& initial
= wxNullFont
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxFONTBTN_DEFAULT_STYLE
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxFontPickerWidgetNameStr
)
34 Create(parent
, id
, initial
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
,
39 const wxFont
& initial
= wxNullFont
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxFONTBTN_DEFAULT_STYLE
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxFontPickerWidgetNameStr
);
46 virtual ~wxFontButton();
52 public: // used by the GTK callback only
54 void SetNativeFontInfo(const char *gtkdescription
)
55 { m_selectedFont
.SetNativeFontInfo(wxString::FromAscii(gtkdescription
)); }
58 DECLARE_DYNAMIC_CLASS(wxFontButton
)
61 #endif // _WX_GTK_FONTPICKER_H_