]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/clrpicker.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk / clrpicker.h
CommitLineData
ec376c8f
VZ
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
ec376c8f
VZ
8// Licence: wxWindows Licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_GTK_CLRPICKER_H_
12#define _WX_GTK_CLRPICKER_H_
13
c0a1e268
MR
14#include "wx/button.h"
15
ec376c8f
VZ
16//-----------------------------------------------------------------------------
17// wxColourButton
18//-----------------------------------------------------------------------------
19
ff654490
VZ
20class WXDLLIMPEXP_CORE wxColourButton : public wxButton,
21 public wxColourPickerWidgetBase
ec376c8f
VZ
22{
23public:
24 wxColourButton() : m_topParent(NULL) {}
25 wxColourButton(wxWindow *parent,
26 wxWindowID id,
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)
33 : m_topParent(NULL)
34 {
35 Create(parent, id, initial, pos, size, style, validator, name);
36 }
37
ec376c8f
VZ
38 bool Create(wxWindow *parent,
39 wxWindowID id,
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);
46
ff654490
VZ
47 virtual ~wxColourButton();
48
c757b5fe 49protected:
ec376c8f
VZ
50 void UpdateColour();
51
ec376c8f
VZ
52public: // used by the GTK callback only
53
9dc44eff
PC
54 void GTKSetColour(const wxColour& colour)
55 { m_colour = colour; }
ec376c8f
VZ
56
57 wxWindow *m_topParent;
58
59private:
60 DECLARE_DYNAMIC_CLASS(wxColourButton)
61};
62
63#endif // _WX_GTK_CLRPICKER_H_
64