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
30 class SampleZoomPanel;
37 #include "mwindow.inc"
38 #include "mwindowgui.inc"
39 #include "zoompanel.h"
41 class ZoomBar : public BC_SubWindow
44 ZoomBar(MWindow *mwindow, MWindowGUI *gui);
47 void create_objects();
50 int resize_event(int w, int h);
51 void redraw_time_dependancies();
52 int update(); // redraw the current values
53 void update_autozoom();
55 int update_playback(int64_t new_position); // update the playback position
56 int set_selection(int which_one);
57 void update_formatting(BC_TextBox *dst);
61 SampleZoomPanel *sample_zoom;
62 AmpZoomPanel *amp_zoom;
63 TrackZoomPanel *track_zoom;
65 // BC_Title *auto_zoom_text;
66 AutoZoomPopup *auto_zoom_popup;
68 BC_Title *zoom_value, *playback_value;
69 LengthTextBox *length_value;
70 FromTextBox *from_value;
72 char string[256], string2[256];
76 class SampleZoomPanel : public ZoomPanel
79 SampleZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
80 virtual ~SampleZoomPanel() {}
86 class AmpZoomPanel : public ZoomPanel
89 AmpZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
90 virtual ~AmpZoomPanel() {}
96 class TrackZoomPanel : public ZoomPanel
99 TrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
100 virtual ~TrackZoomPanel() {}
106 class AutoZoom : public BC_Tumbler
109 AutoZoom(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
110 int handle_up_event();
111 int handle_down_event();
116 class AutoZoomPopup : public BC_PopupMenu
119 AutoZoomPopup(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int w);
120 void create_objects();
133 class FromTextBox : public BC_TextBox
136 FromTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
138 int update_position(double new_position);
139 char string[256], string2[256];
145 class LengthTextBox : public BC_TextBox
148 LengthTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
150 int update_position(double new_position);
151 char string[256], string2[256];
156 class ToTextBox : public BC_TextBox
159 ToTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
161 int update_position(double new_position);
162 char string[256], string2[256];