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 #include "wx/button.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxFontButton
: public wxButton
,
22 public wxFontPickerWidgetBase
26 wxFontButton(wxWindow
*parent
,
28 const wxFont
& initial
= wxNullFont
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
,
31 long style
= wxFONTBTN_DEFAULT_STYLE
,
32 const wxValidator
& validator
= wxDefaultValidator
,
33 const wxString
& name
= wxFontPickerWidgetNameStr
)
35 Create(parent
, id
, initial
, pos
, size
, style
, validator
, name
);
38 bool Create(wxWindow
*parent
,
40 const wxFont
& initial
= wxNullFont
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
43 long style
= wxFONTBTN_DEFAULT_STYLE
,
44 const wxValidator
& validator
= wxDefaultValidator
,
45 const wxString
& name
= wxFontPickerWidgetNameStr
);
47 virtual ~wxFontButton();
53 public: // used by the GTK callback only
55 void SetNativeFontInfo(const char *gtkdescription
)
56 { m_selectedFont
.SetNativeFontInfo(wxString::FromAscii(gtkdescription
)); }
59 DECLARE_DYNAMIC_CLASS(wxFontButton
)
62 #endif // _WX_GTK_FONTPICKER_H_