ALBA
albaGUIColorSwatch.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIColorSwatch
5 Authors: Silvano Imboden
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaGUIColorSwatch_H__
18#define __albaGUIColorSwatch_H__
19
20#include "albaColor.h"
21//----------------------------------------------------------------------------
22
28class ALBA_EXPORT albaGUIColorSwatch: public wxPanel
29{
30public:
31 albaGUIColorSwatch(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxSize(100,50), long style = wxTAB_TRAVERSAL);
33
35 albaColor GetColor () {return m_Color;};
36
37protected:
38
39 wxBitmap m_Bmp;
40 void OnEraseBackground(wxEraseEvent& event) {}; // overrided to prevent flickering
41 void OnPaint(wxPaintEvent &event);
42
44 DECLARE_EVENT_TABLE()
45};
46#endif
albaColor is a class representing an RGBA color:
Definition: albaColor.h:44
albaGUIColorSwatch : small widget representing an RGBA color.
void OnPaint(wxPaintEvent &event)
albaGUIColorSwatch(wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(100, 50), long style=wxTAB_TRAVERSAL)
void OnEraseBackground(wxEraseEvent &event)
void SetColor(albaColor c)