1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/clrpicker.h
3 // Purpose: wxColourButton header
4 // Author: Francesco Montorsi
7 // Copyright: (c) Francesco Montorsi
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GTK_CLRPICKER_H_
13 #define _WX_GTK_CLRPICKER_H_
15 //-----------------------------------------------------------------------------
17 //-----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxColourButton
: public wxButton
,
20 public wxColourPickerWidgetBase
23 wxColourButton() : m_topParent(NULL
) {}
24 wxColourButton(wxWindow
*parent
,
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
)
34 Create(parent
, id
, initial
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
,
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
);
46 virtual ~wxColourButton();
51 public: // used by the GTK callback only
53 void SetGdkColor(const GdkColor
& gdkColor
)
54 { m_colour
= wxColor(gdkColor
); }
56 wxWindow
*m_topParent
;
59 DECLARE_DYNAMIC_CLASS(wxColourButton
)
62 #endif // _WX_GTK_CLRPICKER_H_