new colorspace plugin
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / colorspace / colorspacewindow.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef ColorSpaceWINDOW_H
23 #define ColorSpaceWINDOW_H
24
25 #include "guicast.h"
26
27 class ColorSpaceSpace;
28 class ColorSpaceRange;
29 class ColorSpaceThread;
30 class ColorSpaceWindow;
31
32 #include "filexml.h"
33 #include "mutex.h"
34 #include "colorspace.h"
35
36
37 class ColorSpaceSpace : public BC_PopupMenu
38 {
39         static const char *color_space[3];
40 public:
41         ColorSpaceSpace(ColorSpaceWindow *gui, int x, int y, int *value);
42         ~ColorSpaceSpace();
43         void create_objects();
44         void update();
45         int handle_event();
46
47         ColorSpaceWindow *gui;
48         int *value;
49 };
50
51 class ColorSpaceSpaceItem : public BC_MenuItem
52 {
53 public:
54         ColorSpaceSpaceItem(ColorSpaceSpace *popup, const char *text, int id);
55         int handle_event();
56
57         ColorSpaceSpace *popup;
58         int id;
59 };
60
61 class ColorSpaceRange : public BC_PopupMenu
62 {
63         static const char *color_range[2];
64 public:
65         ColorSpaceRange(ColorSpaceWindow *gui, int x, int y, int *value);
66         ~ColorSpaceRange();
67         void create_objects();
68         void update();
69         int handle_event();
70
71         ColorSpaceWindow *gui;
72         int *value;
73 };
74
75 class ColorSpaceRangeItem : public BC_MenuItem
76 {
77 public:
78         ColorSpaceRangeItem(ColorSpaceRange *popup, const char *text, int id);
79         int handle_event();
80
81         ColorSpaceRange *popup;
82         int id;
83 };
84
85 class ColorSpaceInverse : public BC_CheckBox
86 {
87 public:
88         ColorSpaceInverse(ColorSpaceWindow *gui, int x, int y, int *value);
89         ~ColorSpaceInverse();
90         void update();
91         int handle_event();
92
93         ColorSpaceWindow *gui;
94 };
95
96
97 class ColorSpaceWindow : public PluginClientWindow
98 {
99 public:
100         ColorSpaceWindow(ColorSpaceMain *plugin);
101         ~ColorSpaceWindow();
102
103         void create_objects();
104
105         void update();
106
107         ColorSpaceMain *plugin;
108         ColorSpaceInverse *inverse;
109         ColorSpaceSpace *inp_space, *out_space;
110         ColorSpaceRange *inp_range, *out_range;
111 };
112
113 #endif