no longer need ffmpeg patch0 which was for Termux
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / zoombar.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * Copyright (C) 2003-2016 Cinelerra CV contributors
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  *
21  */
22
23 #ifndef ZOOMBAR_H
24 #define ZOOMBAR_H
25
26 #include "guicast.h"
27 #include "mwindow.inc"
28 #include "mwindowgui.inc"
29 #include "zoombar.inc"
30 #include "zoompanel.h"
31
32
33 class ZoomBar : public BC_SubWindow
34 {
35 public:
36         ZoomBar(MWindow *mwindow, MWindowGUI *gui);
37         ~ZoomBar();
38
39         void create_objects();
40         void resize_event();
41         int draw();
42         int resize_event(int w, int h);
43         void redraw_time_dependancies();
44         int update();          // redraw the current values
45         void update_autozoom();
46         void update_autozoom(int grouptype, int color);
47         void update_autozoom(int color);
48         int update_clocks();
49         int update_playback(int64_t new_position);       // update the playback position
50         int set_selection(int which_one);
51         void update_formatting(BC_TextBox *dst);
52
53         MWindow *mwindow;
54         MWindowGUI *gui;
55         SampleZoomPanel *sample_zoom;
56         AmpZoomPanel *amp_zoom;
57         ATrackZoomPanel *atrack_zoom;
58         VTrackZoomPanel *vtrack_zoom;
59         AutoZoom *auto_zoom;
60         AutoTypeMenu *auto_type;
61         ZoomTextBox *auto_zoom_text;
62
63         LengthTextBox *length_value;
64         FromTextBox *from_value;
65         ToTextBox *to_value;
66         TitleAlphaBar *title_alpha_bar;
67         TitleAlphaText *title_alpha_text;
68         char string[256], string2[256];
69 };
70
71 class SampleZoomPanel : public ZoomPanel
72 {
73 public:
74         SampleZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
75         int handle_event();
76         MWindow *mwindow;
77         ZoomBar *zoombar;
78 };
79
80 class AmpZoomPanel : public ZoomPanel
81 {
82 public:
83         AmpZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
84         int handle_event();
85         MWindow *mwindow;
86         ZoomBar *zoombar;
87 };
88
89 class ATrackZoomPanel : public ZoomPanel
90 {
91 public:
92         ATrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
93         int handle_event();
94         MWindow *mwindow;
95         ZoomBar *zoombar;
96 };
97
98 class VTrackZoomPanel : public ZoomPanel
99 {
100 public:
101         VTrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
102         int handle_event();
103         MWindow *mwindow;
104         ZoomBar *zoombar;
105 };
106
107 class AutoZoom : public BC_Tumbler
108 {
109 public:
110         AutoZoom(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int changemax);
111         int handle_up_event();
112         int handle_down_event();
113         MWindow *mwindow;
114         ZoomBar *zoombar;
115         int changemax;
116 };
117
118
119 class AutoTypeMenu : public BC_PopupMenu
120 {
121 public:
122         AutoTypeMenu(MWindow *mwindow, ZoomBar *zoombar,
123                      int x, int y, int wid);
124         void create_objects();
125         static const char* to_text(int shape);
126         static int from_text(char *text);
127         int draw_face(int dx, int color);
128         int handle_event();
129         MWindow *mwindow;
130         ZoomBar *zoombar;
131 };
132
133
134 class ZoomTextBox : public BC_TextBox
135 {
136 public:
137         ZoomTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y, const char *text);
138         int button_press_event();
139         int handle_event();
140         MWindow *mwindow;
141         ZoomBar *zoombar;
142 };
143
144
145 class FromTextBox : public BC_TextBox
146 {
147 public:
148         FromTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
149         int handle_event();
150         int update_position(double new_position);
151         char string[256], string2[256];
152         MWindow *mwindow;
153         ZoomBar *zoombar;
154 };
155
156
157 class LengthTextBox : public BC_TextBox
158 {
159 public:
160         LengthTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
161         int handle_event();
162         int update_position(double new_position);
163         char string[256], string2[256];
164         MWindow *mwindow;
165         ZoomBar *zoombar;
166 };
167
168 class ToTextBox : public BC_TextBox
169 {
170 public:
171         ToTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
172         int handle_event();
173         int update_position(double new_position);
174         char string[256], string2[256];
175         MWindow *mwindow;
176         ZoomBar *zoombar;
177 };
178
179 class TitleAlphaBar : public BC_FSlider
180 {
181 public:
182         TitleAlphaBar(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
183         int handle_event();
184         MWindow *mwindow;
185         ZoomBar *zoombar;
186 };
187
188 class TitleAlphaText : public BC_TextBox
189 {
190 public:
191         TitleAlphaText(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
192         int handle_event();
193         MWindow *mwindow;
194         ZoomBar *zoombar;
195 };
196
197 #endif