4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5 * Copyright (C) 2003-2016 Cinelerra CV contributors
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.
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.
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
27 #include "mwindow.inc"
28 #include "mwindowgui.inc"
29 #include "zoombar.inc"
30 #include "zoompanel.h"
33 class ZoomBar : public BC_SubWindow
36 ZoomBar(MWindow *mwindow, MWindowGUI *gui);
39 void create_objects();
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);
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);
55 SampleZoomPanel *sample_zoom;
56 AmpZoomPanel *amp_zoom;
57 ATrackZoomPanel *atrack_zoom;
58 VTrackZoomPanel *vtrack_zoom;
60 AutoTypeMenu *auto_type;
61 ZoomTextBox *auto_zoom_text;
63 LengthTextBox *length_value;
64 FromTextBox *from_value;
66 TitleAlphaBar *title_alpha_bar;
67 TitleAlphaText *title_alpha_text;
68 char string[256], string2[256];
71 class SampleZoomPanel : public ZoomPanel
74 SampleZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
80 class AmpZoomPanel : public ZoomPanel
83 AmpZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
89 class ATrackZoomPanel : public ZoomPanel
92 ATrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
98 class VTrackZoomPanel : public ZoomPanel
101 VTrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
107 class AutoZoom : public BC_Tumbler
110 AutoZoom(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int changemax);
111 int handle_up_event();
112 int handle_down_event();
119 class AutoTypeMenu : public BC_PopupMenu
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);
134 class ZoomTextBox : public BC_TextBox
137 ZoomTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y, const char *text);
138 int button_press_event();
145 class FromTextBox : public BC_TextBox
148 FromTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
150 int update_position(double new_position);
151 char string[256], string2[256];
157 class LengthTextBox : public BC_TextBox
160 LengthTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
162 int update_position(double new_position);
163 char string[256], string2[256];
168 class ToTextBox : public BC_TextBox
171 ToTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
173 int update_position(double new_position);
174 char string[256], string2[256];
179 class TitleAlphaBar : public BC_FSlider
182 TitleAlphaBar(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
188 class TitleAlphaText : public BC_TextBox
191 TitleAlphaText(MWindow *mwindow, ZoomBar *zoombar, int x, int y);