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;
38 #include "mwindow.inc"
39 #include "mwindowgui.inc"
40 #include "zoompanel.h"
42 class ZoomBar : public BC_SubWindow
45 ZoomBar(MWindow *mwindow, MWindowGUI *gui);
48 void create_objects();
51 int resize_event(int w, int h);
52 void redraw_time_dependancies();
53 int update(); // redraw the current values
54 void update_autozoom();
56 int update_playback(int64_t new_position); // update the playback position
57 int set_selection(int which_one);
58 void update_formatting(BC_TextBox *dst);
62 SampleZoomPanel *sample_zoom;
63 AmpZoomPanel *amp_zoom;
64 TrackZoomPanel *track_zoom;
66 AutoTypeMenu *auto_type;
67 ZoomTextBox *auto_zoom_text;
69 BC_Title *zoom_value, *playback_value;
70 LengthTextBox *length_value;
71 FromTextBox *from_value;
73 char string[256], string2[256];
77 class SampleZoomPanel : public ZoomPanel
80 SampleZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
86 class AmpZoomPanel : public ZoomPanel
89 AmpZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
95 class TrackZoomPanel : public ZoomPanel
98 TrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
104 class AutoZoom : public BC_Tumbler
107 AutoZoom(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int changemax);
108 int handle_up_event();
109 int handle_down_event();
116 class AutoTypeMenu : public BC_PopupMenu
119 AutoTypeMenu(MWindow *mwindow, ZoomBar *zoombar,
120 int x, int y, int wid);
121 void create_objects();
122 static const char* to_text(int shape);
123 static int from_text(char *text);
130 class ZoomTextBox : public BC_TextBox
133 ZoomTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y, const char *text);
134 int button_press_event();
147 class FromTextBox : public BC_TextBox
150 FromTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
152 int update_position(double new_position);
153 char string[256], string2[256];
159 class LengthTextBox : public BC_TextBox
162 LengthTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
164 int update_position(double new_position);
165 char string[256], string2[256];
170 class ToTextBox : public BC_TextBox
173 ToTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
175 int update_position(double new_position);
176 char string[256], string2[256];