4 * Copyright (C) 2008 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 "bistogram.inc"
28 #include "bistogramwindow.inc"
29 #include "pluginvclient.h"
32 class HistogramSmoothMode : public BC_PopupMenu
35 HistogramSmoothMode(HistogramMain *client,
36 HistogramWindow *window,
39 void create_objects();
40 int set_mode(int mode);
42 static char* to_text(int shape);
43 static int from_text(char *text);
45 HistogramMain *plugin;
49 class HistogramSlider : public BC_SubWindow
52 HistogramSlider(HistogramMain *plugin,
61 int button_press_event();
62 int button_release_event();
63 int cursor_motion_event();
64 int input_to_pixel(float input);
75 HistogramMain *plugin;
79 class HistogramAuto : public BC_CheckBox
82 HistogramAuto(HistogramMain *plugin,
86 HistogramMain *plugin;
89 class HistogramSplit : public BC_CheckBox
92 HistogramSplit(HistogramMain *plugin,
96 HistogramMain *plugin;
99 class HistogramMode : public BC_Radial
102 HistogramMode(HistogramMain *plugin, int x, int y,
103 int value, const char *text);
106 HistogramMain *plugin;
110 class HistogramClear : public BC_GenericButton
113 HistogramClear(HistogramMain *plugin, int x, int y, const char *text);
116 HistogramMain *plugin;
119 class HistogramReset : public BC_GenericButton
122 HistogramReset(HistogramMain *plugin,
126 HistogramMain *plugin;
130 class HistogramOutputText : public BC_TumbleTextBox
133 HistogramOutputText(HistogramMain *plugin,
134 HistogramWindow *gui,
139 HistogramMain *plugin;
143 class HistogramInputText : public BC_TumbleTextBox
146 HistogramInputText(HistogramMain *plugin,
147 HistogramWindow *gui,
155 HistogramMain *plugin;
156 HistogramWindow *gui;
160 class HistogramCanvas : public BC_SubWindow
163 HistogramCanvas(HistogramMain *plugin,
164 HistogramWindow *gui,
169 int button_press_event();
170 int cursor_motion_event();
171 int button_release_event();
172 HistogramMain *plugin;
173 HistogramWindow *gui;
176 class HistogramWindow : public PluginClientWindow
179 HistogramWindow(HistogramMain *plugin);
182 void create_objects();
183 void update(int do_input);
185 void update_canvas();
186 void draw_canvas_overlay();
188 void update_output();
189 int delete_current_point();
190 int keypress_event();
192 HistogramSlider *output;
193 HistogramAuto *automatic;
194 HistogramSplit *split;
195 HistogramSmoothMode *smoothModeChoser;
196 HistogramMode *mode_v, *mode_r, *mode_g, *mode_b /*, *mode_a */;
197 HistogramClear *clear;
198 HistogramOutputText *output_min;
199 HistogramOutputText *output_max;
200 HistogramOutputText *threshold;
201 HistogramInputText *input_x;
202 HistogramInputText *input_y;
203 HistogramCanvas *canvas;
204 HistogramMain *plugin;
211 BC_Pixmap *max_picon, *mid_picon, *min_picon;