r863: Merge 2.1:
[cinelerra_cv/ct.git] / cinelerra / resourcepixmap.h
blob8714e9040b8df8b5cde734858e044bf57e42fde9
1 #ifndef RESOURCEPIXMAP_H
2 #define RESOURCEPIXMAP_H
4 #include "bctimer.inc"
5 #include "edit.inc"
6 #include "guicast.h"
7 #include "mwindow.inc"
8 #include "trackcanvas.inc"
11 // Can't use garbage collection for GUI elements because they need to
12 // lock the window for deletion.
13 class ResourcePixmap : public BC_Pixmap
15 public:
16 ResourcePixmap(MWindow *mwindow,
17 TrackCanvas *canvas,
18 Edit *edit,
19 int w,
20 int h);
21 ~ResourcePixmap();
23 void resize(int w, int h);
24 void draw_data(Edit *edit,
25 int64_t edit_x,
26 int64_t edit_w,
27 int64_t pixmap_x,
28 int64_t pixmap_w,
29 int64_t pixmap_h,
30 int mode,
31 int indexes_only);
32 void draw_audio_resource(Edit *edit,
33 int x,
34 int w);
35 void draw_video_resource(Edit *edit,
36 int64_t edit_x,
37 int64_t edit_w,
38 int64_t pixmap_x,
39 int64_t pixmap_w,
40 int refresh_x,
41 int refresh_w,
42 int mode);
43 void draw_audio_source(Edit *edit, int x, int w);
44 // Called by ResourceThread to update pixmap
45 void draw_wave(int x, double high, double low);
46 void draw_title(Edit *edit, int64_t edit_x, int64_t edit_w, int64_t pixmap_x, int64_t pixmap_w);
47 void reset();
48 // Change to hourglass if timer expired
49 void test_timer();
51 void dump();
53 MWindow *mwindow;
54 TrackCanvas *canvas;
55 // Visible in entire track canvas
56 int visible;
57 // Section drawn
58 int64_t edit_id;
59 int64_t edit_x, pixmap_x, pixmap_w, pixmap_h;
60 int64_t zoom_sample, zoom_track, zoom_y;
61 int64_t startsource;
62 double source_framerate, project_framerate;
63 int64_t source_samplerate, project_samplerate;
64 int data_type;
65 // Timer to cause an hourglass to appear
66 Timer *timer;
69 #endif