r858: Merge 2.1:
[cinelerra_cv.git] / cinelerra / resourcepixmap.h
blob92c3773898c76906b476184eafe947b25e179a76
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 force,
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 void draw_audio_source(Edit *edit, int x, int w);
43 void draw_title(Edit *edit, int64_t edit_x, int64_t edit_w, int64_t pixmap_x, int64_t pixmap_w);
44 void reset();
45 // Change to hourglass if timer expired
46 void test_timer();
48 void dump();
50 MWindow *mwindow;
51 TrackCanvas *canvas;
52 // Visible in entire track canvas
53 int visible;
54 // Section drawn
55 int64_t edit_id;
56 int64_t edit_x, pixmap_x, pixmap_w, pixmap_h;
57 int64_t zoom_sample, zoom_track, zoom_y;
58 int64_t startsource;
59 double source_framerate, project_framerate;
60 int64_t source_samplerate, project_samplerate;
61 int data_type;
62 // Timer to cause an hourglass to appear
63 Timer *timer;
66 #endif