removed all compile- and run-time checks for GTK+ < 2.4; don't include the generic...
[wxWidgets.git] / include / wx / gtk / clrpicker.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/clrpicker.h
3 // Purpose: wxColourButton 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_CLRPICKER_H_
13 #define _WX_GTK_CLRPICKER_H_
14
15 //-----------------------------------------------------------------------------
16 // wxColourButton
17 //-----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_CORE wxColourButton : public wxButton,
20 public wxColourPickerWidgetBase
21 {
22 public:
23 wxColourButton() : m_topParent(NULL) {}
24 wxColourButton(wxWindow *parent,
25 wxWindowID id,
26 const wxColour& initial = *wxBLACK,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxCLRBTN_DEFAULT_STYLE,
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxColourPickerWidgetNameStr)
32 : m_topParent(NULL)
33 {
34 Create(parent, id, initial, pos, size, style, validator, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
39 const wxColour& initial = *wxBLACK,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxCLRBTN_DEFAULT_STYLE,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxColourPickerWidgetNameStr);
45
46 virtual ~wxColourButton();
47
48 protected:
49 void UpdateColour();
50
51 public: // used by the GTK callback only
52
53 void SetGdkColor(const GdkColor& gdkColor)
54 { m_colour = wxColor(gdkColor); }
55
56 wxWindow *m_topParent;
57
58 private:
59 DECLARE_DYNAMIC_CLASS(wxColourButton)
60 };
61
62 #endif // _WX_GTK_CLRPICKER_H_
63