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 HISTOGRAMWINDOW_H
23 #define HISTOGRAMWINDOW_H
27 #include "histogram.inc"
28 #include "histogramwindow.inc"
29 #include "pluginvclient.h"
33 class HistogramSlider : public BC_SubWindow
36 HistogramSlider(HistogramMain *plugin,
45 int input_to_pixel(float input);
56 HistogramMain *plugin;
60 class HistogramParade : public BC_Toggle
63 HistogramParade(HistogramMain *plugin,
69 HistogramMain *plugin;
74 class HistogramCarrot : public BC_Toggle
77 HistogramCarrot(HistogramMain *plugin,
81 virtual ~HistogramCarrot();
85 int cursor_motion_event();
86 int button_release_event();
87 int button_press_event();
93 HistogramMain *plugin;
98 class HistogramAuto : public BC_CheckBox
101 HistogramAuto(HistogramMain *plugin,
105 HistogramMain *plugin;
108 class HistogramPlot : public BC_CheckBox
111 HistogramPlot(HistogramMain *plugin,
115 HistogramMain *plugin;
118 class HistogramSplit : public BC_CheckBox
121 HistogramSplit(HistogramMain *plugin,
125 HistogramMain *plugin;
128 class HistogramMode : public BC_Radial
131 HistogramMode(HistogramMain *plugin,
137 HistogramMain *plugin;
141 class HistogramReset : public BC_GenericButton
144 HistogramReset(HistogramMain *plugin,
148 HistogramMain *plugin;
151 class HistogramText : public BC_TumbleTextBox
154 HistogramText(HistogramMain *plugin,
155 HistogramWindow *gui,
163 HistogramMain *plugin;
164 HistogramWindow *gui;
167 class HistogramCanvas : public BC_SubWindow
170 HistogramCanvas(HistogramMain *plugin,
171 HistogramWindow *gui,
176 int button_press_event();
177 int cursor_motion_event();
178 int button_release_event();
179 HistogramMain *plugin;
180 HistogramWindow *gui;
183 class HistogramWindow : public PluginClientWindow
186 HistogramWindow(HistogramMain *plugin);
189 void create_objects();
190 void update(int do_canvases,
194 void draw_canvas_mode(int mode, int color, int y, int h);
195 void update_canvas();
196 int keypress_event();
197 int resize_event(int w, int h);
199 void get_point_extents(HistogramPoint *current,
207 HistogramSlider *output;
208 HistogramAuto *automatic;
209 HistogramMode *mode_v, *mode_r, *mode_g, *mode_b /*, *mode_a */;
210 HistogramParade *parade_on, *parade_off;
211 HistogramText *low_output;
212 HistogramText *high_output;
213 HistogramText *threshold;
214 HistogramText *low_input;
215 HistogramText *high_input;
216 HistogramText *gamma;
217 HistogramCanvas *canvas;
218 HistogramCarrot *low_input_carrot;
219 HistogramCarrot *gamma_carrot;
220 HistogramCarrot *high_input_carrot;
221 HistogramCarrot *low_output_carrot;
222 HistogramCarrot *high_output_carrot;
223 HistogramReset *reset;
224 BC_Title *canvas_title1;
225 BC_Title *canvas_title2;
226 BC_Title *threshold_title;
229 // Value to change with keypresses
231 HistogramMain *plugin;
239 HistogramSplit *split;