4 * Copyright (C) 2008 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
26 #include "mwindow.inc"
27 #include "mwindowgui.inc"
28 #include "zoombar.inc"
29 #include "zoompanel.h"
32 class ZoomBar : public BC_SubWindow
35 ZoomBar(MWindow *mwindow, MWindowGUI *gui);
38 void create_objects();
41 int resize_event(int w, int h);
42 void redraw_time_dependancies();
43 int update(); // redraw the current values
44 void update_autozoom();
45 void update_autozoom(int grouptype, int color);
46 void update_autozoom(int color);
48 int update_playback(int64_t new_position); // update the playback position
49 int set_selection(int which_one);
50 void update_formatting(BC_TextBox *dst);
54 SampleZoomPanel *sample_zoom;
55 AmpZoomPanel *amp_zoom;
56 TrackZoomPanel *track_zoom;
58 AutoTypeMenu *auto_type;
59 ZoomTextBox *auto_zoom_text;
61 LengthTextBox *length_value;
62 FromTextBox *from_value;
64 TitleAlphaBar *title_alpha_bar;
65 TitleAlphaText *title_alpha_text;
66 char string[256], string2[256];
69 class SampleZoomPanel : public ZoomPanel
72 SampleZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
78 class AmpZoomPanel : public ZoomPanel
81 AmpZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
87 class TrackZoomPanel : public ZoomPanel
90 TrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
96 class AutoZoom : public BC_Tumbler
99 AutoZoom(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int changemax);
100 int handle_up_event();
101 int handle_down_event();
108 class AutoTypeMenu : public BC_PopupMenu
111 AutoTypeMenu(MWindow *mwindow, ZoomBar *zoombar,
112 int x, int y, int wid);
113 void create_objects();
114 static const char* to_text(int shape);
115 static int from_text(char *text);
116 int draw_face(int dx, int color);
123 class ZoomTextBox : public BC_TextBox
126 ZoomTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y, const char *text);
127 int button_press_event();
134 class FromTextBox : public BC_TextBox
137 FromTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
139 int update_position(double new_position);
140 char string[256], string2[256];
146 class LengthTextBox : public BC_TextBox
149 LengthTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
151 int update_position(double new_position);
152 char string[256], string2[256];
157 class ToTextBox : public BC_TextBox
160 ToTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
162 int update_position(double new_position);
163 char string[256], string2[256];
168 class TitleAlphaBar : public BC_FSlider
171 TitleAlphaBar(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
177 class TitleAlphaText : public BC_TextBox
180 TitleAlphaText(MWindow *mwindow, ZoomBar *zoombar, int x, int y);