r1014: Enable horizontal scrolling with the mouse wheel by pressing Ctrl.
[cinelerra_cv/ct.git] / cinelerra / indexfile.h
blob77c5c7875db53a8c5ecc475a52073ad43b8cc50b
1 #ifndef INDEXFILE_H
2 #define INDEXFILE_H
4 #include "asset.inc"
5 #include "edit.inc"
6 #include "file.inc"
7 #include "guicast.h"
8 #include "indexthread.inc"
9 #include "mainprogress.inc"
10 #include "mwindow.inc"
11 #include "preferences.inc"
12 #include "resourcepixmap.inc"
13 #include "bctimer.inc"
14 #include "tracks.inc"
16 class IndexFile
18 public:
19 IndexFile(MWindow *mwindow);
20 IndexFile(MWindow *mwindow, Asset *asset);
21 ~IndexFile();
23 int open_index(Asset *asset);
24 int open_index(MWindow *mwindow, Asset *asset);
25 int create_index(Asset *asset, MainProgressBar *progress);
26 int create_index(MWindow *mwindow, Asset *asset, MainProgressBar *progress);
27 int interrupt_index();
28 static void delete_index(Preferences *preferences, Asset *asset);
29 static int get_index_filename(char *source_filename,
30 char *index_directory,
31 char *index_filename,
32 char *input_filename);
33 void update_edl_asset();
34 int redraw_edits(int force);
35 int draw_index(ResourcePixmap *pixmap, Edit *edit, int x, int w);
36 int close_index();
37 int remove_index();
38 int read_info(Asset *test_asset = 0);
39 int write_info();
41 MWindow *mwindow;
42 char index_filename[BCTEXTLEN], source_filename[BCTEXTLEN];
43 Asset *asset;
44 Timer *redraw_timer;
46 private:
47 void update_mainasset();
49 int open_file();
50 int open_source(File *source);
51 int64_t get_required_scale(File *source);
52 FILE *file;
53 int64_t file_length; // Length of index file in bytes
54 int interrupt_flag; // Flag set when index building is interrupted
57 #endif