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