1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/clrpicker.h
3 // Purpose: wxColourButton header
4 // Author: Francesco Montorsi
7 // Copyright: (c) Francesco Montorsi
8 // Licence: wxWindows Licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GTK_CLRPICKER_H_
12 #define _WX_GTK_CLRPICKER_H_
14 #include "wx/button.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxColourButton
: public wxButton
,
21 public wxColourPickerWidgetBase
24 wxColourButton() : m_topParent(NULL
) {}
25 wxColourButton(wxWindow
*parent
,
27 const wxColour
& initial
= *wxBLACK
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxCLRBTN_DEFAULT_STYLE
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxColourPickerWidgetNameStr
)
35 Create(parent
, id
, initial
, pos
, size
, style
, validator
, name
);
38 bool Create(wxWindow
*parent
,
40 const wxColour
& initial
= *wxBLACK
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
43 long style
= wxCLRBTN_DEFAULT_STYLE
,
44 const wxValidator
& validator
= wxDefaultValidator
,
45 const wxString
& name
= wxColourPickerWidgetNameStr
);
47 virtual ~wxColourButton();
52 public: // used by the GTK callback only
54 void GTKSetColour(const wxColour
& colour
)
55 { m_colour
= colour
; }
57 wxWindow
*m_topParent
;
60 DECLARE_DYNAMIC_CLASS(wxColourButton
)
63 #endif // _WX_GTK_CLRPICKER_H_