]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/fontpicker.h
2bb9c8e1037328cba6e4ca0ec3981b9c0a01d8ef
[wxWidgets.git] / include / wx / gtk / fontpicker.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/fontpicker.h
3 // Purpose: wxFontButton header
4 // Author: Francesco Montorsi
5 // Modified by:
6 // Created: 14/4/2006
7 // Copyright: (c) Francesco Montorsi
8 // RCS-ID: $Id$
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GTK_FONTPICKER_H_
13 #define _WX_GTK_FONTPICKER_H_
14
15 //-----------------------------------------------------------------------------
16 // wxFontButton
17 //-----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_CORE wxFontButton : public wxButton,
20 public wxFontPickerWidgetBase
21 {
22 public:
23 wxFontButton() {}
24 wxFontButton(wxWindow *parent,
25 wxWindowID id,
26 const wxFont& initial = wxNullFont,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxFONTBTN_DEFAULT_STYLE,
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxFontPickerWidgetNameStr)
32 {
33 Create(parent, id, initial, pos, size, style, validator, name);
34 }
35
36 bool Create(wxWindow *parent,
37 wxWindowID id,
38 const wxFont& initial = wxNullFont,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxFONTBTN_DEFAULT_STYLE,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxFontPickerWidgetNameStr);
44
45 virtual ~wxFontButton();
46
47 protected:
48 void UpdateFont();
49
50
51 public: // used by the GTK callback only
52
53 void SetNativeFontInfo(const gchar *gtkdescription)
54 { m_selectedFont.SetNativeFontInfo(wxString::FromAscii(gtkdescription)); }
55
56 private:
57 DECLARE_DYNAMIC_CLASS(wxFontButton)
58 };
59
60 #endif // _WX_GTK_FONTPICKER_H_
61