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 #include "wx/button.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxColourButton
: public wxButton
,
22 public wxColourPickerWidgetBase
25 wxColourButton() : m_topParent(NULL
) {}
26 wxColourButton(wxWindow
*parent
,
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
)
36 Create(parent
, id
, initial
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
,
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
);
48 virtual ~wxColourButton();
53 public: // used by the GTK callback only
55 void GTKSetColour(const wxColour
& colour
)
56 { m_colour
= colour
; }
58 wxWindow
*m_topParent
;
61 DECLARE_DYNAMIC_CLASS(wxColourButton
)
64 #endif // _WX_GTK_CLRPICKER_H_