4 * Copyright (C) 1997-2012 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
23 #ifndef __FINDOBJWINDOW_H__
24 #define __FINDOBJWINDOW_H__
26 #include "dragcheckbox.h"
27 #include "findobj.inc"
32 class FindObjScanFloat;
33 class FindObjScanFloatText;
34 class FindObjDrawSceneBorder;
35 class FindObjDrawKeypoints;
37 class FindObjDrawObjectBorder;
38 class FindObjDrawReplaceBorder;
39 class FindObjDragObject;
40 class FindObjDragScene;
41 class FindObjDragReplace;
42 class FindObjAlgorithm;
46 class FindObjReset : public BC_GenericButton
49 FindObjReset(FindObjMain *plugin, FindObjWindow *gui, int x, int y);
55 class FindObjLayer : public BC_TumbleTextBox
58 FindObjLayer(FindObjMain *plugin, FindObjWindow *gui,
59 int x, int y, int *value);
61 static int calculate_w(FindObjWindow *gui);
67 class FindObjScanFloat : public BC_FPot
70 FindObjScanFloat(FindObjMain *plugin, FindObjWindow *gui, int x, int y,
71 float *value, float min=0., float max=100.);
76 FindObjScanFloatText *center_text;
80 class FindObjScanFloatText : public BC_TextBox
83 FindObjScanFloatText(FindObjMain *plugin, FindObjWindow *gui, int x, int y, float *value);
87 FindObjScanFloat *center;
92 class FindObjDrawSceneBorder : public BC_CheckBox
95 FindObjDrawSceneBorder(FindObjMain *plugin, FindObjWindow *gui, int x, int y);
101 class FindObjDrawObjectBorder : public BC_CheckBox
104 FindObjDrawObjectBorder(FindObjMain *plugin, FindObjWindow *gui, int x, int y);
110 class FindObjDrawReplaceBorder : public BC_CheckBox
113 FindObjDrawReplaceBorder(FindObjMain *plugin, FindObjWindow *gui, int x, int y);
119 class FindObjDrawKeypoints : public BC_CheckBox
122 FindObjDrawKeypoints(FindObjMain *plugin, FindObjWindow *gui, int x, int y);
128 class FindObjReplace : public BC_CheckBox
131 FindObjReplace(FindObjMain *plugin, FindObjWindow *gui, int x, int y);
137 class FindObjDragScene : public DragCheckBox
140 FindObjDragScene(FindObjMain *plugin, FindObjWindow *gui, int x, int y,
141 float drag_x, float drag_y, float drag_w, float drag_h);
144 Track *get_drag_track();
145 int64_t get_drag_position();
153 class FindObjDragObject : public DragCheckBox
156 FindObjDragObject(FindObjMain *plugin, FindObjWindow *gui, int x, int y,
157 float drag_x, float drag_y, float drag_w, float drag_h);
158 ~FindObjDragObject();
161 Track *get_drag_track();
162 int64_t get_drag_position();
169 class FindObjDragReplace : public DragCheckBox
172 FindObjDragReplace(FindObjMain *plugin, FindObjWindow *gui, int x, int y,
173 float drag_x, float drag_y, float drag_w, float drag_h);
174 ~FindObjDragReplace();
177 Track *get_drag_track();
178 int64_t get_drag_position();
185 class FindObjAlgorithm : public BC_PopupMenu
188 FindObjAlgorithm(FindObjMain *plugin, FindObjWindow *gui, int x, int y);
190 void create_objects();
191 void update(int mode);
192 static int calculate_w(FindObjWindow *gui);
193 static int from_text(char *text);
194 static char* to_text(int mode);
199 class FindObjUseFlann : public BC_CheckBox
202 FindObjUseFlann(FindObjMain *plugin, FindObjWindow *gui, int x, int y);
208 class FindObjBlend : public BC_IPot
211 FindObjBlend(FindObjMain *plugin, int x, int y, int *value);
217 class FindObjWindow : public PluginClientWindow
220 FindObjWindow(FindObjMain *plugin);
222 void create_objects();
227 FindObjAlgorithm *algorithm;
228 FindObjUseFlann *use_flann;
229 FindObjScanFloat *object_x, *object_y, *object_w, *object_h;
230 FindObjScanFloatText *object_x_text, *object_y_text, *object_w_text, *object_h_text;
231 FindObjScanFloat *scene_x, *scene_y, *scene_w, *scene_h;
232 FindObjScanFloatText *scene_x_text, *scene_y_text, *scene_w_text, *scene_h_text;
233 FindObjScanFloat *replace_x, *replace_y, *replace_w, *replace_h;
234 FindObjScanFloatText *replace_x_text, *replace_y_text, *replace_w_text, *replace_h_text;
235 FindObjScanFloat *replace_dx, *replace_dy;
236 FindObjScanFloatText *replace_dx_text, *replace_dy_text;
237 FindObjDrawKeypoints *draw_keypoints;
238 FindObjDrawSceneBorder *draw_scene_border;
239 FindObjReplace *replace_object;
240 FindObjDrawObjectBorder *draw_object_border;
241 FindObjDrawReplaceBorder *draw_replace_border;
242 FindObjDragObject *drag_object;
243 FindObjDragScene *drag_scene;
244 FindObjDragReplace *drag_replace;
245 FindObjLayer *object_layer;
246 FindObjLayer *scene_layer;
247 FindObjLayer *replace_layer;