r870: Merge 2.1:
[cinelerra_cv.git] / cinelerra / mainerror.h
blob98e47ff41454bbc92edd0735d4429b36a6ddcda5
1 #ifndef MAINERROR_H
2 #define MAINERROR_H
5 #include "bcdialog.h"
6 #include "mainerror.inc"
7 #include "mutex.inc"
8 #include "mwindow.inc"
10 // This is needed for errors which are too verbose to fit in the
11 // status bar.
13 // Once created, it accumulates errors in a listbox until it's closed.
17 class MainErrorGUI : public BC_Window
19 public:
20 MainErrorGUI(MWindow *mwindow, MainError *thread, int x, int y);
21 ~MainErrorGUI();
23 void create_objects();
24 int resize_event(int w, int h);
26 MWindow *mwindow;
27 MainError *thread;
28 BC_ListBox *list;
29 BC_Title *title;
33 class MainError : public BC_DialogThread
35 public:
36 MainError(MWindow *mwindow);
37 ~MainError();
39 friend class MainErrorGUI;
41 BC_Window* new_gui();
44 // Display error message to command line or GUI, depending on what exists.
45 static void show_error(char *string);
48 private:
49 void show_error_local(char *string);
51 // Split errors into multiple lines based on carriage returns.
52 void append_error(char *string);
55 MWindow *mwindow;
56 ArrayList<BC_ListBoxItem*> errors;
57 Mutex *errors_lock;
59 // Main error dialog. Won't exist if no GUI.
60 static MainError *main_error;
66 #endif