edit group selection and cut/copy/paste/del shortcuts, interview mode tweaks
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / resourcepixmap.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #ifndef RESOURCEPIXMAP_H
23 #define RESOURCEPIXMAP_H
24
25 #include "bctimer.inc"
26 #include "edit.inc"
27 #include "guicast.h"
28 #include "mwindow.inc"
29 #include "trackcanvas.inc"
30
31
32 // Can't use garbage collection for GUI elements because they need to
33 // lock the window for deletion.
34 class ResourcePixmap : public BC_Pixmap
35 {
36 public:
37         ResourcePixmap(MWindow *mwindow, MWindowGUI *gui, Edit *edit,
38                 int pane_number, int w, int h);
39         ~ResourcePixmap();
40
41         void resize(int w, int h);
42         void update_settings(Edit *edit,
43                 int64_t edit_x, int64_t edit_w,
44                 int64_t pixmap_x, int64_t pixmap_w, int64_t pixmap_h);
45         void draw_data(TrackCanvas *canvas,
46                 Edit *edit, int64_t edit_x, int64_t edit_w,
47                 int64_t pixmap_x, int64_t pixmap_w, int64_t pixmap_h,
48                 int mode, int indexes_only);
49         void draw_audio_resource(TrackCanvas *canvas,
50                 Edit *edit, int x, int w);
51         void draw_video_resource(TrackCanvas *canvas,
52                 Edit *edit, int64_t edit_x, int64_t edit_w,
53                 int64_t pixmap_x, int64_t pixmap_w,
54                 int refresh_x, int refresh_w,
55                 int mode);
56         void draw_audio_source(TrackCanvas *canvas,
57                 Edit *edit, int x, int w);
58         void draw_subttl_resource(TrackCanvas *canvas,
59                 Edit *edit, int x, int w);
60 // Called by ResourceThread to update pixmap
61         void draw_wave(TrackCanvas *canvas,
62                 int x, double high, double low);
63         void draw_title(TrackCanvas *canvas,
64                 Edit *edit, int64_t edit_x, int64_t edit_w,
65                 int64_t pixmap_x, int64_t pixmap_w);
66         void reset();
67 // Change to hourglass if timer expired
68         void test_timer();
69
70         void dump();
71
72         MWindow *mwindow;
73         MWindowGUI *gui;
74 // Visible in entire track canvas
75         int visible;
76 // Section drawn
77         int64_t edit_id;
78         int pane_number;
79         int64_t edit_x, pixmap_x, pixmap_w, pixmap_h;
80         int64_t zoom_sample, zoom_track, zoom_y;
81         int64_t startsource;
82         double source_framerate, project_framerate;
83         int64_t source_samplerate, project_samplerate;
84         int data_type;
85 // Timer to cause an hourglass to appear
86         Timer *timer;
87 };
88
89 #endif