]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/clrpicker.h
Fix bug with using invalid date in wxMSW wxCalendarCtrl.
[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 #include "wx/button.h"
16
17 //-----------------------------------------------------------------------------
18 // wxColourButton
19 //-----------------------------------------------------------------------------
20
21 class WXDLLIMPEXP_CORE wxColourButton : public wxButton,
22 public wxColourPickerWidgetBase
23 {
24 public:
25 wxColourButton() : m_topParent(NULL) {}
26 wxColourButton(wxWindow *parent,
27 wxWindowID id,
28 const wxColour& initial = *wxBLACK,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize,
31 long style = wxCLRBTN_DEFAULT_STYLE,
32 const wxValidator& validator = wxDefaultValidator,
33 const wxString& name = wxColourPickerWidgetNameStr)
34 : m_topParent(NULL)
35 {
36 Create(parent, id, initial, pos, size, style, validator, name);
37 }
38
39 bool Create(wxWindow *parent,
40 wxWindowID id,
41 const wxColour& initial = *wxBLACK,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 long style = wxCLRBTN_DEFAULT_STYLE,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxColourPickerWidgetNameStr);
47
48 virtual ~wxColourButton();
49
50 protected:
51 void UpdateColour();
52
53 public: // used by the GTK callback only
54
55 void GTKSetColour(const wxColour& colour)
56 { m_colour = colour; }
57
58 wxWindow *m_topParent;
59
60 private:
61 DECLARE_DYNAMIC_CLASS(wxColourButton)
62 };
63
64 #endif // _WX_GTK_CLRPICKER_H_
65