4 * Copyright (C) 1997-2011 Adam Williams <broadcast at earthling dot net>
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.
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.
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
22 #ifndef COLOR3WAYWINDOW_H
23 #define COLOR3WAYWINDOW_H
26 class Color3WayThread;
27 class Color3WayWindow;
28 class Color3WaySlider;
29 class Color3WayPreserve;
33 class Color3WaySliderClr;
34 class Color3WayWindow;
41 #include "color3way.h"
42 #include "pluginclient.h"
44 #define CLEAR_BTN_WIDTH 50
48 #define RESET_SATURATION 3
50 class Color3WayPoint : public BC_SubWindow
53 Color3WayPoint(Color3WayMain *plugin,
62 virtual ~Color3WayPoint();
67 int cursor_enter_event();
68 int cursor_leave_event();
69 int cursor_motion_event();
70 int button_release_event();
71 int button_press_event();
72 void draw_face(int flash, int flush);
73 int reposition_window(int x, int y, int radius);
95 Color3WayMain *plugin;
102 BC_Pixmap *fg_images[COLOR_IMAGES];
107 class Color3WaySlider : public BC_FSlider
110 Color3WaySlider(Color3WayMain *plugin,
111 Color3WayWindow *gui,
121 Color3WayMain *plugin;
122 Color3WayWindow *gui;
126 char string[BCTEXTLEN];
130 class Color3WayResetSection : public BC_GenericButton
133 Color3WayResetSection(Color3WayMain *plugin,
134 Color3WayWindow *gui,
139 Color3WayMain *plugin;
140 Color3WayWindow *gui;
145 class Color3WaySliderClrSection : public BC_Button
148 Color3WaySliderClrSection(Color3WayMain *plugin,
149 Color3WayWindow *gui,
155 ~Color3WaySliderClrSection();
157 Color3WayMain *plugin;
158 Color3WayWindow *gui;
164 class Color3WayBalanceSection : public BC_GenericButton
167 Color3WayBalanceSection(Color3WayMain *plugin,
168 Color3WayWindow *gui,
173 Color3WayMain *plugin;
174 Color3WayWindow *gui;
178 class Color3WayCopySection : public BC_CheckBox
181 Color3WayCopySection(Color3WayMain *plugin,
182 Color3WayWindow *gui,
187 Color3WayMain *plugin;
188 Color3WayWindow *gui;
192 class Color3WaySection
195 Color3WaySection(Color3WayMain *plugin,
196 Color3WayWindow *gui,
202 void create_objects();
203 int reposition_window(int x, int y, int w, int h);
207 Color3WayMain *plugin;
208 Color3WayWindow *gui;
211 Color3WayPoint *point;
212 BC_Title *value_title;
213 Color3WaySlider *value;
215 Color3WaySlider *saturation;
216 Color3WayResetSection *reset;
217 Color3WayBalanceSection *balance;
218 Color3WayCopySection *copy;
219 Color3WaySliderClrSection *pointClr, *valueClr, *saturationClr;
223 class Color3WayWindow : public PluginClientWindow
226 Color3WayWindow(Color3WayMain *plugin);
229 void create_objects();
231 int resize_event(int w, int h);
233 Color3WayMain *plugin;
234 Color3WayPoint *active_point;
236 Color3WaySection *sections[SECTIONS];