-
Notifications
You must be signed in to change notification settings - Fork 2
/
PColourPicker.h
41 lines (31 loc) · 1.01 KB
/
PColourPicker.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef __PColourPicker_h__
#define __PColourPicker_h__
#include "PImageCanvas.h"
class PColourPicker : public PImageCanvas {
public:
PColourPicker(PImageWindow *owner, Widget canvas=0);
virtual ~PColourPicker();
virtual void DrawSelf();
virtual void AfterDrawing();
virtual void Listen(int message, void *dataPt);
virtual void HandleEvents(XEvent *event);
void ApplyCurrentColours();
int RevertColours();
void SetColourRGB(int *col3);
void GetColourRGB(int *col3);
void SetColourNumber(int colNum);
int GetColourNumber() { return mColourNum; }
private:
void LoadCurrentColours();
void FreeColours(int flags);
int SetCurrentColours();
void GetXY(int colNum, int *x, int *y);
int mColourNum; // current colour number
XColor * mColours;
XColor * mRevertColours; // revert colours for both sets (2 * NUM_COLOURS)
char * mAllocFlags;
int mCurrentSet; // current colour set (0 or 1)
int mAllocErr;
static int sLastColourNum;
};
#endif // __PColourPicker_h__