r956: README.BUILD - add more library recommendations
[cinelerra_cv/ct.git] / cinelerra / zoombar.h
blob3a7bea02c54d7abd9ce923009f7b9dc12358d4b6
1 #ifndef ZOOMBAR_H
2 #define ZOOMBAR_H
4 class FromTextBox;
5 class LengthTextBox;
6 class ToTextBox;
9 class SampleZoomPanel;
10 class AmpZoomPanel;
11 class TrackZoomPanel;
12 class AutoZoom;
13 class AutoTypeMenu;
14 class ZoomTextBox;
16 #include "guicast.h"
17 #include "mwindow.inc"
18 #include "mwindowgui.inc"
19 #include "zoompanel.h"
21 class ZoomBar : public BC_SubWindow
23 public:
24 ZoomBar(MWindow *mwindow, MWindowGUI *gui);
25 ~ZoomBar();
27 int create_objects();
28 void resize_event();
29 int draw();
30 int resize_event(int w, int h);
31 void redraw_time_dependancies();
32 int update(); // redraw the current values
33 void update_autozoom();
34 int update_clocks();
35 int update_playback(int64_t new_position); // update the playback position
36 int set_selection(int which_one);
37 void update_formatting(BC_TextBox *dst);
39 MWindow *mwindow;
40 MWindowGUI *gui;
41 SampleZoomPanel *sample_zoom;
42 AmpZoomPanel *amp_zoom;
43 TrackZoomPanel *track_zoom;
44 AutoZoom *auto_zoom;
45 AutoTypeMenu *auto_type;
46 ZoomTextBox *auto_zoom_text;
48 BC_Title *zoom_value, *playback_value;
49 LengthTextBox *length_value;
50 FromTextBox *from_value;
51 ToTextBox *to_value;
52 char string[256], string2[256];
53 int64_t old_position;
56 class SampleZoomPanel : public ZoomPanel
58 public:
59 SampleZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
60 int handle_event();
61 MWindow *mwindow;
62 ZoomBar *zoombar;
65 class AmpZoomPanel : public ZoomPanel
67 public:
68 AmpZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
69 int handle_event();
70 MWindow *mwindow;
71 ZoomBar *zoombar;
74 class TrackZoomPanel : public ZoomPanel
76 public:
77 TrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
78 int handle_event();
79 MWindow *mwindow;
80 ZoomBar *zoombar;
83 class AutoZoom : public BC_Tumbler
85 public:
86 AutoZoom(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int changemax);
87 int handle_up_event();
88 int handle_down_event();
89 MWindow *mwindow;
90 ZoomBar *zoombar;
91 int changemax;
95 class AutoTypeMenu : public BC_PopupMenu
97 public:
98 AutoTypeMenu(MWindow *mwindow,
99 ZoomBar *zoombar,
100 int x,
101 int y);
102 void create_objects();
103 static char* to_text(int shape);
104 static int from_text(char *text);
105 int handle_event();
106 MWindow *mwindow;
107 ZoomBar *zoombar;
111 class ZoomTextBox : public BC_TextBox
113 public:
114 ZoomTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y, char *text);
115 int button_press_event();
116 int handle_event();
117 MWindow *mwindow;
118 ZoomBar *zoombar;
128 class FromTextBox : public BC_TextBox
130 public:
131 FromTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
132 int handle_event();
133 int update_position(double new_position);
134 char string[256], string2[256];
135 MWindow *mwindow;
136 ZoomBar *zoombar;
140 class LengthTextBox : public BC_TextBox
142 public:
143 LengthTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
144 int handle_event();
145 int update_position(double new_position);
146 char string[256], string2[256];
147 MWindow *mwindow;
148 ZoomBar *zoombar;
151 class ToTextBox : public BC_TextBox
153 public:
154 ToTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y);
155 int handle_event();
156 int update_position(double new_position);
157 char string[256], string2[256];
158 MWindow *mwindow;
159 ZoomBar *zoombar;
165 #endif