r136: This commit was manufactured by cvs2svn to create tag 'hv_1_1_8'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / vwindowgui.h
blob44bea486aa3334d3b280380cbb3db6daea977d6d
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 // Update source pulldown with new assets
41 void update_sources(char *title);
42 // Update GUI to reflect new source
43 void change_source(EDL *edl, char *title);
44 void drag_motion();
45 int drag_stop();
46 // void update_labels();
47 // void update_points();
49 MWindow *mwindow;
50 VWindow *vwindow;
52 // Meters are numbered from right to left
53 VWindowCanvas *canvas;
54 VWindowSlider *slider;
55 BC_Title *fps_title;
56 MainClock *clock;
57 VTimeBar *timebar;
58 VWindowZoom *zoom_panel;
59 VWindowTransport *transport;
60 VWindowEditing *edit_panel;
61 // VWindowSource *source;
62 VWindowMeters *meters;
63 ArrayList<BC_ListBoxItem*> sources;
64 ArrayList<LabelGUI*> labels;
65 VWindowInPoint *in_point;
66 VWindowOutPoint *out_point;
68 private:
69 void get_scrollbars(int &canvas_x, int &canvas_y, int &canvas_w, int &canvas_h);
73 class VWindowMeters : public MeterPanel
75 public:
76 VWindowMeters(MWindow *mwindow, VWindowGUI *gui, int x, int y, int h);
77 ~VWindowMeters();
79 int change_status_event();
81 MWindow *mwindow;
82 VWindowGUI *gui;
86 class VWindowCanvas : public Canvas
88 public:
89 VWindowCanvas(MWindow *mwindow, VWindowGUI *gui);
91 void zoom_resize_window(float percentage);
92 void draw_refresh();
93 void draw_overlays();
94 void close_source();
96 MWindow *mwindow;
97 VWindowGUI *gui;
100 class VWindowEditing : public EditPanel
102 public:
103 VWindowEditing(MWindow *mwindow, VWindow *vwindow);
104 ~VWindowEditing();
106 void copy_selection();
107 void splice_selection();
108 void overwrite_selection();
109 void set_inpoint();
110 void set_outpoint();
111 void clear_inpoint();
112 void clear_outpoint();
113 void to_clip();
114 void toggle_label();
115 void prev_label();
116 void next_label();
118 MWindow *mwindow;
119 VWindow *vwindow;
122 class VWindowZoom : public ZoomPanel
124 public:
125 VWindowZoom(MWindow *mwindow, VWindowGUI *gui, int x, int y);
126 ~VWindowZoom();
127 int handle_event();
128 MWindow *mwindow;
129 VWindowGUI *gui;
133 class VWindowSlider : public BC_PercentageSlider
135 public:
136 VWindowSlider(MWindow *mwindow,
137 VWindow *vwindow,
138 VWindowGUI *gui,
139 int x,
140 int y,
141 int pixels);
142 ~VWindowSlider();
144 int handle_event();
145 void set_position();
147 VWindowGUI *gui;
148 MWindow *mwindow;
149 VWindow *vwindow;
152 class VWindowSource : public BC_PopupTextBox
154 public:
155 VWindowSource(MWindow *mwindow, VWindowGUI *vwindow, int x, int y);
156 ~VWindowSource();
157 int handle_event();
158 VWindowGUI *vwindow;
159 MWindow *mwindow;
162 class VWindowTransport : public PlayTransport
164 public:
165 VWindowTransport(MWindow *mwindow,
166 VWindowGUI *gui,
167 int x,
168 int y);
169 EDL* get_edl();
170 void goto_start();
171 void goto_end();
173 VWindowGUI *gui;
176 class VWindowInPoint : public InPointGUI
178 public:
179 VWindowInPoint(MWindow *mwindow,
180 TimeBar *timebar,
181 VWindowGUI *gui,
182 long pixel,
183 double position);
184 int handle_event();
185 VWindowGUI *gui;
189 class VWindowOutPoint : public OutPointGUI
191 public:
192 VWindowOutPoint(MWindow *mwindow,
193 TimeBar *timebar,
194 VWindowGUI *gui,
195 long pixel,
196 double position);
197 int handle_event();
198 VWindowGUI *gui;
201 #endif