1 /***************************************************************************
2                           colorselect.h  -  A Color Selection tool
3                              -------------------
4     begin                : di sep 05 2006
5     copyright            : (C) 2006 by CJP
6     email                : cornware-cjp@users.sourceforge.net
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17 
18 #ifndef COLORSELECT_H
19 #define COLORSELECT_H
20 
21 #include <vector>
22 namespace std {}
23 using namespace std;
24 
25 #include "widget.h"
26 #include "cstring.h"
27 #include "vector.h"
28 /**
29   *@author CJP
30   */
31 
32 class CColorSelect : public CWidget  {
33 public:
34 	CColorSelect();
35 	virtual ~CColorSelect();
36 
37 	virtual int onKeyPress(int key);
38 	virtual int onRedraw();
39 	virtual int onMouseMove(int x, int y, unsigned int buttons);
40 	virtual int onMouseClick(int x, int y, unsigned int buttons);
41 
42 	void setTitle(const CString &title);
43 
44 	CVector m_Color;
45 
46 	bool m_Cancelled;
47 
48 protected:
49 	CString m_Title; //the total text
50 
51 	enum {eOK, eCancel, eNone} m_Selected;
52 };
53 
54 #endif
55