]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/fontpicker.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / gtk / fontpicker.h
CommitLineData
ec376c8f
VZ
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
ec376c8f
VZ
8// Licence: wxWindows Licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_GTK_FONTPICKER_H_
12#define _WX_GTK_FONTPICKER_H_
13
c0a1e268
MR
14#include "wx/button.h"
15
ec376c8f
VZ
16//-----------------------------------------------------------------------------
17// wxFontButton
18//-----------------------------------------------------------------------------
19
ff654490
VZ
20class WXDLLIMPEXP_CORE wxFontButton : public wxButton,
21 public wxFontPickerWidgetBase
ec376c8f
VZ
22{
23public:
24 wxFontButton() {}
25 wxFontButton(wxWindow *parent,
26 wxWindowID id,
305329c2 27 const wxFont& initial = wxNullFont,
ec376c8f
VZ
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)
33 {
34 Create(parent, id, initial, pos, size, style, validator, name);
35 }
36
ec376c8f
VZ
37 bool Create(wxWindow *parent,
38 wxWindowID id,
305329c2 39 const wxFont& initial = wxNullFont,
ec376c8f
VZ
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);
45
ff654490
VZ
46 virtual ~wxFontButton();
47
c757b5fe 48protected:
ec376c8f
VZ
49 void UpdateFont();
50
51
52public: // used by the GTK callback only
53
29e461a2 54 void SetNativeFontInfo(const char *gtkdescription)
ec376c8f
VZ
55 { m_selectedFont.SetNativeFontInfo(wxString::FromAscii(gtkdescription)); }
56
ec376c8f
VZ
57private:
58 DECLARE_DYNAMIC_CLASS(wxFontButton)
59};
60
61#endif // _WX_GTK_FONTPICKER_H_
62