1 | /*
|
---|
2 | * ----------------------------------------------------------------------
|
---|
3 | * ColorPaletteWindow.h: color palette window class
|
---|
4 | *
|
---|
5 | * ======================================================================
|
---|
6 | * AUTHOR: Wei Qiao <qiaow@purdue.edu>
|
---|
7 | * Purdue Rendering and Perceptualization Lab (PURPL)
|
---|
8 | *
|
---|
9 | * Copyright (c) 2004-2006 Purdue Research Foundation
|
---|
10 | *
|
---|
11 | * See the file "license.terms" for information on usage and
|
---|
12 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
---|
13 | * ======================================================================
|
---|
14 | */
|
---|
15 |
|
---|
16 | #ifndef _COLOR_PALETTE_WINDOW_H_
|
---|
17 | #define _COLOR_PALETTE_WINODW_H_
|
---|
18 |
|
---|
19 | //ColorPalette Window to select color from
|
---|
20 | #include <glui.h>
|
---|
21 |
|
---|
22 | #include "../Color.h"
|
---|
23 | #include "ControlPoint.h"
|
---|
24 |
|
---|
25 | extern int cp_winx, cp_winy; //size of the colorPalette window
|
---|
26 | extern int cp_color_r, cp_color_g, cp_color_b; //color picked
|
---|
27 | extern GLUI* cp_glui; //glui handler
|
---|
28 |
|
---|
29 | class ColorPalette{
|
---|
30 |
|
---|
31 | public:
|
---|
32 | static void cpMouse(int button, int state, int x, int y);
|
---|
33 | static void cpMotion(int x, int y);
|
---|
34 | static void cpIdle();
|
---|
35 | static void cpKeyboard(unsigned char key, int x, int y);
|
---|
36 | static void cpDestroy();
|
---|
37 | static void cpReshape(int x, int y);
|
---|
38 | static void cpDisplay();
|
---|
39 | static void cpInit();
|
---|
40 | static void cpSyncLive();
|
---|
41 |
|
---|
42 | static void createGLUIWidgets();
|
---|
43 | static Color getColor(int x, int y);
|
---|
44 | static void confirm(int arg);
|
---|
45 | static void cmdHandler(int arg);
|
---|
46 | static void openFile();
|
---|
47 |
|
---|
48 | ColorPalette();
|
---|
49 | virtual ~ColorPalette();
|
---|
50 | };
|
---|
51 |
|
---|
52 | #endif
|
---|