ef2bc52ccde93a6da7396bc8bd6284812d6ce441
[goodguy/history.git] / cinelerra-5.1 / plugins / findobject / findobjectwindow.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 1997-2012 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22
23 #ifndef __FINDOBJECTWINDOW_H__
24 #define __FINDOBJECTWINDOW_H__
25
26 #include "guicast.h"
27 #include "findobject.inc"
28
29 class FindObjectLayer;
30 class FindObjectScanFloat;
31 class FindObjectScanFloatText;
32 class FindObjectDrawBorder;
33 class FindObjectDrawKeypoints;
34 class FindObjectReplace;
35 class FindObjectDrawObjectBorder;
36 class FindObjectAlgorithm;
37 class FindObjectBlend;
38 class FindObjectWindow;
39
40 class FindObjectLayer : public BC_TumbleTextBox
41 {
42 public:
43         FindObjectLayer(FindObjectMain *plugin, FindObjectWindow *gui,
44                 int x, int y, int *value);
45         int handle_event();
46         static int calculate_w(FindObjectWindow *gui);
47         FindObjectMain *plugin;
48         FindObjectWindow *gui;
49         int *value;
50 };
51
52 class FindObjectScanFloat : public BC_FPot
53 {
54 public:
55         FindObjectScanFloat(FindObjectMain *plugin, FindObjectWindow *gui, int x, int y, float *value);
56         int handle_event();
57         FindObjectMain *plugin;
58         FindObjectWindow *gui;
59         FindObjectScanFloatText *center_text;
60         float *value;
61 };
62
63 class FindObjectScanFloatText : public BC_TextBox
64 {
65 public:
66         FindObjectScanFloatText(FindObjectMain *plugin, FindObjectWindow *gui, int x, int y, float *value);
67         int handle_event();
68         FindObjectWindow *gui;
69         FindObjectMain *plugin;
70         FindObjectScanFloat *center;
71         float *value;
72 };
73
74
75 class FindObjectDrawBorder : public BC_CheckBox
76 {
77 public:
78         FindObjectDrawBorder(FindObjectMain *plugin, FindObjectWindow *gui, int x, int y);
79         int handle_event();
80         FindObjectMain *plugin;
81         FindObjectWindow *gui;
82 };
83
84 class FindObjectDrawKeypoints : public BC_CheckBox
85 {
86 public:
87         FindObjectDrawKeypoints(FindObjectMain *plugin, FindObjectWindow *gui, int x, int y);
88         int handle_event();
89         FindObjectMain *plugin;
90         FindObjectWindow *gui;
91 };
92
93 class FindObjectReplace : public BC_CheckBox
94 {
95 public:
96         FindObjectReplace(FindObjectMain *plugin, FindObjectWindow *gui, int x, int y);
97         int handle_event();
98         FindObjectMain *plugin;
99         FindObjectWindow *gui;
100 };
101
102 class FindObjectDrawObjectBorder : public BC_CheckBox
103 {
104 public:
105         FindObjectDrawObjectBorder(FindObjectMain *plugin, FindObjectWindow *gui, int x, int y);
106         int handle_event();
107         FindObjectMain *plugin;
108         FindObjectWindow *gui;
109 };
110
111 class FindObjectAlgorithm : public BC_PopupMenu
112 {
113 public:
114         FindObjectAlgorithm(FindObjectMain *plugin, FindObjectWindow *gui, int x, int y);
115         int handle_event();
116         void create_objects();
117         static int calculate_w(FindObjectWindow *gui);
118         static int from_text(char *text);
119         static char* to_text(int mode);
120         FindObjectMain *plugin;
121         FindObjectWindow *gui;
122 };
123
124 class FindObjectUseFlann : public BC_CheckBox
125 {
126 public:
127         FindObjectUseFlann(FindObjectMain *plugin, FindObjectWindow *gui, int x, int y);
128         int handle_event();
129         FindObjectMain *plugin;
130         FindObjectWindow *gui;
131 };
132
133 class FindObjectBlend : public BC_IPot
134 {
135 public:
136         FindObjectBlend(FindObjectMain *plugin, int x, int y, int *value);
137         int handle_event();
138         FindObjectMain *plugin;
139         int *value;
140 };
141
142 class FindObjectWindow : public PluginClientWindow
143 {
144 public:
145         FindObjectWindow(FindObjectMain *plugin);
146         ~FindObjectWindow();
147         void create_objects();
148
149         FindObjectAlgorithm *algorithm;
150         FindObjectUseFlann *use_flann;
151         FindObjectScanFloat *object_x, *object_y, *object_w, *object_h;
152         FindObjectScanFloatText *object_x_text, *object_y_text, *object_w_text, *object_h_text;
153         FindObjectScanFloat *scene_x, *scene_y, *scene_w, *scene_h;
154         FindObjectScanFloatText *scene_x_text, *scene_y_text, *scene_w_text, *scene_h_text;
155         FindObjectDrawKeypoints *draw_keypoints;
156         FindObjectDrawBorder *draw_border;
157         FindObjectReplace *replace_object;
158         FindObjectDrawObjectBorder *draw_object_border;
159         FindObjectLayer *object_layer;
160         FindObjectLayer *scene_layer;
161         FindObjectLayer *replace_layer;
162         FindObjectBlend *blend;
163         FindObjectMain *plugin;
164 };
165
166 #endif