]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/fontpicker.h
Added wxPGChoices::Copy(), tweaked related documentation
[wxWidgets.git] / include / wx / gtk / fontpicker.h
... / ...
CommitLineData
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#include "wx/button.h"
16
17//-----------------------------------------------------------------------------
18// wxFontButton
19//-----------------------------------------------------------------------------
20
21class WXDLLIMPEXP_CORE wxFontButton : public wxButton,
22 public wxFontPickerWidgetBase
23{
24public:
25 wxFontButton() {}
26 wxFontButton(wxWindow *parent,
27 wxWindowID id,
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)
34 {
35 Create(parent, id, initial, pos, size, style, validator, name);
36 }
37
38 bool Create(wxWindow *parent,
39 wxWindowID id,
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);
46
47 virtual ~wxFontButton();
48
49protected:
50 void UpdateFont();
51
52
53public: // used by the GTK callback only
54
55 void SetNativeFontInfo(const gchar *gtkdescription)
56 { m_selectedFont.SetNativeFontInfo(wxString::FromAscii(gtkdescription)); }
57
58private:
59 DECLARE_DYNAMIC_CLASS(wxFontButton)
60};
61
62#endif // _WX_GTK_FONTPICKER_H_
63