3 * Copyright (C) 2008-2015 Adam Williams <broadcast at earthling dot net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __TRACERWINDOW_H__
22 #define __TRACERWINDOW_H__
36 class TracerPointList;
45 class TracerNum : public BC_TumbleTextBox
50 TracerNum(TracerWindow *gui, int x, int y, float output);
53 class TracerPointX : public TracerNum
56 TracerPointX(TracerWindow *gui, int x, int y, float output)
57 : TracerNum(gui, x, y, output) {}
62 class TracerPointY : public TracerNum
65 TracerPointY(TracerWindow *gui, int x, int y, float output)
66 : TracerNum(gui, x, y, output) {}
72 class TracerThreshold : public BC_FSlider
75 TracerThreshold(TracerWindow *gui, int x, int y, int w);
77 int wheel_event(int v);
81 class TracerDrag : public BC_CheckBox
84 TracerDrag(TracerWindow *gui, int x, int y);
90 class TracerDraw : public BC_CheckBox
93 TracerDraw(TracerWindow *gui, int x, int y);
99 class TracerFill : public BC_CheckBox
102 TracerFill(TracerWindow *gui, int x, int y);
108 class TracerFeather : public BC_ISlider
111 TracerFeather(TracerWindow *gui, int x, int y, int w);
117 class TracerRadius : public BC_FSlider
120 TracerRadius(TracerWindow *gui, int x, int y, int w);
126 class TracerPointList : public BC_ListBox
129 TracerPointList(TracerWindow *gui, Tracer *plugin, int x, int y);
133 int selection_changed();
134 int column_resize_event();
135 ArrayList<BC_ListBoxItem*> cols[PT_SZ];
137 void new_point(const char *xp, const char *yp);
138 void del_point(int i);
139 void set_point(int i, int c, float v);
140 void set_point(int i, int c, const char *cp);
141 int set_selected(int k);
143 void update_list(int k);
148 const char *titles[PT_SZ];
152 class TracerNewPoint : public BC_GenericButton
155 TracerNewPoint(TracerWindow *gui, Tracer *plugin, int x, int y);
164 class TracerDelPoint : public BC_GenericButton
167 TracerDelPoint(TracerWindow *gui, Tracer *plugin, int x, int y);
176 class TracerPointUp : public BC_GenericButton
179 TracerPointUp(TracerWindow *gui, int x, int y);
187 class TracerPointDn : public BC_GenericButton
190 TracerPointDn(TracerWindow *gui, int x, int y);
198 class TracerReset : public BC_GenericButton
201 TracerReset(TracerWindow *gui, Tracer *plugin, int x, int y);
210 class TracerInvert : public BC_CheckBox
213 TracerInvert(TracerWindow *gui, Tracer *plugin, int x, int y);
223 class TracerWindow : public PluginClientWindow
226 TracerWindow(Tracer *plugin);
229 void create_objects();
231 void start_color_thread();
232 int grab_event(XEvent *event);
233 int do_grab_event(XEvent *event);
234 void done_event(int result);
235 void send_configure_change();
238 BC_Title *title_x, *title_y;
239 TracerPointX *point_x;
240 TracerPointY *point_y;
241 TracerNewPoint *new_point;
242 TracerDelPoint *del_point;
243 TracerPointUp *point_up;
244 TracerPointDn *point_dn;
245 int button_no, pending_config;
246 float last_x, last_y;
250 BC_Title *title_r, *title_s;
251 TracerFeather *feather;
252 TracerRadius *radius;
253 TracerPointList *point_list;
255 TracerInvert *invert;