]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/clrpicker.h
enabling alpha on msw colour
[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
8// RCS-ID: $Id$
9// Licence: wxWindows Licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_GTK_CLRPICKER_H_
13#define _WX_GTK_CLRPICKER_H_
14
15// since GtkColorButton is available only for GTK+ >= 2.4,
16// we need to use generic version if we detect (at runtime)
17// that GTK+ < 2.4
18#include "wx/generic/clrpickerg.h"
19
20//-----------------------------------------------------------------------------
21// wxColourButton
22//-----------------------------------------------------------------------------
23
24class WXDLLIMPEXP_CORE wxColourButton : public wxGenericColourButton
25{
26public:
27 wxColourButton() : m_topParent(NULL) {}
28 wxColourButton(wxWindow *parent,
29 wxWindowID id,
30 const wxColour& initial = *wxBLACK,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 long style = wxCLRBTN_DEFAULT_STYLE,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxColourPickerWidgetNameStr)
36 : m_topParent(NULL)
37 {
38 Create(parent, id, initial, pos, size, style, validator, name);
39 }
40
41 virtual ~wxColourButton();
42
43
44public: // overrides
45
46 bool Create(wxWindow *parent,
47 wxWindowID id,
48 const wxColour& initial = *wxBLACK,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxCLRBTN_DEFAULT_STYLE,
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxColourPickerWidgetNameStr);
54
c757b5fe 55protected:
ec376c8f
VZ
56 void UpdateColour();
57
ec376c8f
VZ
58public: // used by the GTK callback only
59
c6685317
PC
60 void SetGdkColor(const GdkColor& gdkColor)
61 { m_colour = wxColor(gdkColor); }
ec376c8f
VZ
62
63 wxWindow *m_topParent;
64
65private:
66 DECLARE_DYNAMIC_CLASS(wxColourButton)
67};
68
69#endif // _WX_GTK_CLRPICKER_H_
70