00001 #ifndef BCPROGRESSBOX_H 00002 #define BCPROGRESSBOX_H 00003 00004 #include "bcprogress.inc" 00005 #include "bcprogressbox.inc" 00006 #include "bctitle.inc" 00007 #include "bcwindow.h" 00008 #include "thread.h" 00009 00010 class BC_ProgressBox : public Thread 00011 { 00012 public: 00013 BC_ProgressBox(int x, int y, char *text, int64_t length); 00014 virtual ~BC_ProgressBox(); 00015 00016 friend class BC_ProgressWindow; 00017 00018 void run(); 00019 int update(int64_t position, int lock_it); // return 1 if cancelled 00020 int update_title(char *title, int lock_it); 00021 int update_length(int64_t length, int lock_it); 00022 int is_cancelled(); // return 1 if cancelled 00023 int stop_progress(); 00024 void lock_window(); 00025 void unlock_window(); 00026 00027 private: 00028 BC_ProgressWindow *pwindow; 00029 char *display; 00030 char *text; 00031 int cancelled; 00032 int64_t length; 00033 }; 00034 00035 00036 class BC_ProgressWindow : public BC_Window 00037 { 00038 public: 00039 BC_ProgressWindow(int x, int y); 00040 virtual ~BC_ProgressWindow(); 00041 00042 int create_objects(char *text, int64_t length); 00043 00044 char *text; 00045 BC_ProgressBar *bar; 00046 BC_Title *caption; 00047 }; 00048 00049 #endif
1.5.5