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;
44 class TracerNum : public BC_TumbleTextBox
49 TracerNum(TracerWindow *gui, int x, int y, float output);
52 class TracerPointX : public TracerNum
55 TracerPointX(TracerWindow *gui, int x, int y, float output)
56 : TracerNum(gui, x, y, output) {}
61 class TracerPointY : public TracerNum
64 TracerPointY(TracerWindow *gui, int x, int y, float output)
65 : TracerNum(gui, x, y, output) {}
71 class TracerThreshold : public BC_FSlider
74 TracerThreshold(TracerWindow *gui, int x, int y, int w);
76 int wheel_event(int v);
80 class TracerDrag : public BC_CheckBox
83 TracerDrag(TracerWindow *gui, int x, int y);
89 class TracerDraw : public BC_CheckBox
92 TracerDraw(TracerWindow *gui, int x, int y);
98 class TracerFill : public BC_CheckBox
101 TracerFill(TracerWindow *gui, int x, int y);
107 class TracerRadius : public BC_ISlider
110 TracerRadius(TracerWindow *gui, int x, int y, int w);
116 class TracerScale : public BC_FSlider
119 TracerScale(TracerWindow *gui, int x, int y, int w);
125 class TracerPointList : public BC_ListBox
128 TracerPointList(TracerWindow *gui, Tracer *plugin, int x, int y);
132 int selection_changed();
133 int column_resize_event();
134 ArrayList<BC_ListBoxItem*> cols[PT_SZ];
136 void new_point(const char *xp, const char *yp);
137 void del_point(int i);
138 void set_point(int i, int c, float v);
139 void set_point(int i, int c, const char *cp);
140 int set_selected(int k);
142 void update_list(int k);
147 const char *titles[PT_SZ];
151 class TracerNewPoint : public BC_GenericButton
154 TracerNewPoint(TracerWindow *gui, Tracer *plugin, int x, int y);
163 class TracerDelPoint : public BC_GenericButton
166 TracerDelPoint(TracerWindow *gui, Tracer *plugin, int x, int y);
175 class TracerPointUp : public BC_GenericButton
178 TracerPointUp(TracerWindow *gui, int x, int y);
186 class TracerPointDn : public BC_GenericButton
189 TracerPointDn(TracerWindow *gui, int x, int y);
197 class TracerReset : public BC_GenericButton
200 TracerReset(TracerWindow *gui, Tracer *plugin, int x, int y);
210 class TracerWindow : public PluginClientWindow
213 TracerWindow(Tracer *plugin);
216 void create_objects();
218 void start_color_thread();
219 int grab_event(XEvent *event);
220 int do_grab_event(XEvent *event);
221 void done_event(int result);
222 void send_configure_change();
225 BC_Title *title_x, *title_y;
226 TracerPointX *point_x;
227 TracerPointY *point_y;
228 TracerNewPoint *new_point;
229 TracerDelPoint *del_point;
230 TracerPointUp *point_up;
231 TracerPointDn *point_dn;
232 int dragging, pending_config;
233 float last_x, last_y;
237 BC_Title *title_r, *title_s;
238 TracerRadius *radius;
240 TracerPointList *point_list;