r1009: Move the dependencies to newer package names
[cinelerra_cv/mob.git] / cinelerra / vwindowgui.h
blobdf1ce95dba025659a6022c0941c213cf9f7ffd5a
1 #ifndef VWINDOWGUI_H
2 #define VWINDOWGUI_H
4 #include "asset.inc"
5 #include "canvas.h"
6 #include "editpanel.h"
7 #include "guicast.h"
8 #include "mainclock.inc"
9 #include "meterpanel.h"
10 #include "mwindow.inc"
11 #include "playtransport.h"
13 #include "timebar.h"
15 #include "vtimebar.inc"
16 #include "vwindow.inc"
17 #include "zoompanel.h"
19 class VWindowSlider;
20 class VWindowZoom;
21 class VWindowSource;
22 class VWindowTransport;
23 class VWindowEditing;
24 class VWindowCanvas;
25 class VWindowMeters;
26 class VWindowInPoint;
27 class VWindowOutPoint;
29 class VWindowGUI : public BC_Window
31 public:
32 VWindowGUI(MWindow *mwindow, VWindow *vwindow);
33 ~VWindowGUI();
35 int create_objects();
36 int resize_event(int w, int h);
37 int translation_event();
38 int close_event();
39 int keypress_event();
40 int button_press_event();
41 int cursor_leave_event();
42 int cursor_enter_event();
43 int button_release_event();
44 int cursor_motion_event();
45 // Update source pulldown with new assets
46 void update_sources(char *title);
47 // Update GUI to reflect new source
48 void change_source(EDL *edl, char *title);
49 void drag_motion();
50 int drag_stop();
51 // void update_labels();
52 // void update_points();
54 MWindow *mwindow;
55 VWindow *vwindow;
57 // Meters are numbered from right to left
58 VWindowCanvas *canvas;
59 VWindowSlider *slider;
60 BC_Title *fps_title;
61 MainClock *clock;
62 VTimeBar *timebar;
63 VWindowZoom *zoom_panel;
64 VWindowTransport *transport;
65 VWindowEditing *edit_panel;
66 // VWindowSource *source;
67 VWindowMeters *meters;
68 ArrayList<BC_ListBoxItem*> sources;
69 ArrayList<LabelGUI*> labels;
70 VWindowInPoint *in_point;
71 VWindowOutPoint *out_point;
72 char loaded_title[BCTEXTLEN];
73 private:
74 void get_scrollbars(int &canvas_x, int &canvas_y, int &canvas_w, int &canvas_h);
78 class VWindowMeters : public MeterPanel
80 public:
81 VWindowMeters(MWindow *mwindow, VWindowGUI *gui, int x, int y, int h);
82 ~VWindowMeters();
84 int change_status_event();
86 MWindow *mwindow;
87 VWindowGUI *gui;
91 class VWindowCanvas : public Canvas
93 public:
94 VWindowCanvas(MWindow *mwindow, VWindowGUI *gui);
96 void zoom_resize_window(float percentage);
97 void draw_refresh();
98 void draw_overlays();
99 void close_source();
100 int get_fullscreen();
101 void set_fullscreen(int value);
103 MWindow *mwindow;
104 VWindowGUI *gui;
107 class VWindowEditing : public EditPanel
109 public:
110 VWindowEditing(MWindow *mwindow, VWindow *vwindow);
111 ~VWindowEditing();
113 void copy_selection();
114 void splice_selection();
115 void overwrite_selection();
116 void set_inpoint();
117 void set_outpoint();
118 void clear_inpoint();
119 void clear_outpoint();
120 void to_clip();
121 void toggle_label();
122 void prev_label();
123 void next_label();
125 MWindow *mwindow;
126 VWindow *vwindow;
129 class VWindowZoom : public ZoomPanel
131 public:
132 VWindowZoom(MWindow *mwindow, VWindowGUI *gui, int x, int y);
133 ~VWindowZoom();
134 int handle_event();
135 MWindow *mwindow;
136 VWindowGUI *gui;
140 class VWindowSlider : public BC_PercentageSlider
142 public:
143 VWindowSlider(MWindow *mwindow,
144 VWindow *vwindow,
145 VWindowGUI *gui,
146 int x,
147 int y,
148 int pixels);
149 ~VWindowSlider();
151 int handle_event();
152 void set_position();
154 VWindowGUI *gui;
155 MWindow *mwindow;
156 VWindow *vwindow;
159 class VWindowSource : public BC_PopupTextBox
161 public:
162 VWindowSource(MWindow *mwindow, VWindowGUI *vwindow, int x, int y);
163 ~VWindowSource();
164 int handle_event();
165 VWindowGUI *vwindow;
166 MWindow *mwindow;
169 class VWindowTransport : public PlayTransport
171 public:
172 VWindowTransport(MWindow *mwindow,
173 VWindowGUI *gui,
174 int x,
175 int y);
176 EDL* get_edl();
177 void goto_start();
178 void goto_end();
180 VWindowGUI *gui;
183 class VWindowInPoint : public InPointGUI
185 public:
186 VWindowInPoint(MWindow *mwindow,
187 TimeBar *timebar,
188 VWindowGUI *gui,
189 long pixel,
190 double position);
191 int handle_event();
192 VWindowGUI *gui;
196 class VWindowOutPoint : public OutPointGUI
198 public:
199 VWindowOutPoint(MWindow *mwindow,
200 TimeBar *timebar,
201 VWindowGUI *gui,
202 long pixel,
203 double position);
204 int handle_event();
205 VWindowGUI *gui;
208 #endif