r136: This commit was manufactured by cvs2svn to create tag 'hv_1_1_8'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / mainprogress.h
bloba8fe87233bb11d1ee88aca4e36506061907b8ce1
1 #ifndef MAINPROGRESS_H
2 #define MAINPROGRESS_H
4 #include "arraylist.h"
5 #include "bcprogressbox.inc"
6 #include "guicast.h"
7 #include "mainprogress.inc"
8 #include "mwindow.inc"
9 #include "mwindowgui.inc"
10 #include "timer.inc"
12 // Generic progress bar for the MainProgress
13 class MainProgress;
15 class MainProgressBar
17 public:
18 MainProgressBar(MWindow *mwindow, MainProgress *mainprogress);
19 ~MainProgressBar();
21 friend class MainProgress;
23 void stop_progress();
24 int is_cancelled();
25 void update_title(char *string, int default_ = 1);
26 void update_length(long length);
27 int update(long value);
28 void get_time(char *text);
29 double get_time();
31 // Only defined if this is a separate window;
32 BC_ProgressBox *progress_box;
33 // Only defined if this is the main progress bar
34 BC_ProgressBar *progress_bar;
35 MWindow *mwindow;
36 MainProgress *mainprogress;
37 // Title assigned by user
38 char default_title[BCTEXTLEN];
39 Timer *eta_timer;
40 // Last time eta was updated
41 long last_eta;
42 long length;
44 private:
45 void start();
48 // Controls all progressbars and locations
50 class MainProgress
52 public:
53 MainProgress(MWindow *mwindow, MWindowGUI *gui);
54 ~MainProgress();
56 // Start a progress sequence and return the bar
57 MainProgressBar* start_progress(char *text, long total_length);
58 void end_progress(MainProgressBar* progress_bar);
60 ArrayList<MainProgressBar*> progress_bars;
61 MainProgressBar *mwindow_progress;
63 MWindow *mwindow;
64 MWindowGUI *gui;
65 // For mwindow progress
66 int cancelled;
70 #endif