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 static char* to_text(int shape);
41 static int from_text(char *text);
43 HistogramMain *plugin;
47 class HistogramSlider : public BC_SubWindow
50 HistogramSlider(HistogramMain *plugin,
59 int button_press_event();
60 int button_release_event();
61 int cursor_motion_event();
62 int input_to_pixel(float input);
73 HistogramMain *plugin;
77 class HistogramAuto : public BC_CheckBox
80 HistogramAuto(HistogramMain *plugin,
84 HistogramMain *plugin;
87 class HistogramSplit : public BC_CheckBox
90 HistogramSplit(HistogramMain *plugin,
94 HistogramMain *plugin;
97 class HistogramMode : public BC_Radial
100 HistogramMode(HistogramMain *plugin,
106 HistogramMain *plugin;
110 class HistogramReset : public BC_GenericButton
113 HistogramReset(HistogramMain *plugin,
117 HistogramMain *plugin;
121 class HistogramOutputText : public BC_TumbleTextBox
124 HistogramOutputText(HistogramMain *plugin,
125 HistogramWindow *gui,
130 HistogramMain *plugin;
134 class HistogramInputText : public BC_TumbleTextBox
137 HistogramInputText(HistogramMain *plugin,
138 HistogramWindow *gui,
146 HistogramMain *plugin;
147 HistogramWindow *gui;
151 class HistogramCanvas : public BC_SubWindow
154 HistogramCanvas(HistogramMain *plugin,
155 HistogramWindow *gui,
160 int button_press_event();
161 int cursor_motion_event();
162 int button_release_event();
163 HistogramMain *plugin;
164 HistogramWindow *gui;
167 class HistogramWindow : public PluginClientWindow
170 HistogramWindow(HistogramMain *plugin);
173 void create_objects();
174 void update(int do_input);
176 void update_canvas();
177 void draw_canvas_overlay();
179 void update_output();
180 int keypress_event();
182 HistogramSlider *output;
183 HistogramAuto *automatic;
184 HistogramSplit *split;
185 HistogramSmoothMode *smoothModeChoser;
186 HistogramMode *mode_v, *mode_r, *mode_g, *mode_b /*, *mode_a */;
187 HistogramOutputText *output_min;
188 HistogramOutputText *output_max;
189 HistogramOutputText *threshold;
190 HistogramInputText *input_x;
191 HistogramInputText *input_y;
192 HistogramCanvas *canvas;
193 HistogramMain *plugin;
200 BC_Pixmap *max_picon, *mid_picon, *min_picon;