r370: Heroine Virutal's official release 1.2.1
[cinelerra_cv/mob.git] / hvirtual / cinelerra / preferencesthread.h
blob9dbdbad244585629bab8bb4aac534262d2aaf4bc
1 #ifndef PREFERENCESTHREAD_H
2 #define PREFERENCESTHREAD_H
4 #include "edl.inc"
5 #include "guicast.h"
6 #include "mutex.inc"
7 #include "mwindow.inc"
8 #include "preferences.inc"
9 #include "preferencesthread.inc"
10 #include "thread.h"
12 #define CATEGORIES 5
14 class PreferencesMenuitem : public BC_MenuItem
16 public:
17 PreferencesMenuitem(MWindow *mwindow);
18 ~PreferencesMenuitem();
20 int handle_event();
22 MWindow *mwindow;
23 PreferencesThread *thread;
26 class PreferencesThread : public Thread
28 public:
29 PreferencesThread(MWindow *mwindow);
30 ~PreferencesThread();
31 void run();
33 int update_framerate();
34 int apply_settings();
35 char* category_to_text(int category);
36 int text_to_category(char *category);
38 int current_dialog;
39 int thread_running;
40 int redraw_indexes;
41 int redraw_meters;
42 int redraw_times;
43 int redraw_overlays;
44 int rerender;
45 int close_assets;
46 int reload_plugins;
47 PreferencesWindow *window;
48 Mutex *window_lock;
49 MWindow *mwindow;
50 // Copy of mwindow preferences
51 Preferences *preferences;
52 EDL *edl;
55 class PreferencesDialog : public BC_SubWindow
57 public:
58 PreferencesDialog(MWindow *mwindow, PreferencesWindow *pwindow);
59 virtual ~PreferencesDialog();
61 virtual int create_objects() { return 0; };
62 virtual int draw_framerate() { return 0; };
63 PreferencesWindow *pwindow;
64 MWindow *mwindow;
65 Preferences *preferences;
68 class PreferencesCategory;
70 class PreferencesWindow : public BC_Window
72 public:
73 PreferencesWindow(MWindow *mwindow,
74 PreferencesThread *thread,
75 int x,
76 int y);
77 ~PreferencesWindow();
79 int create_objects();
80 int delete_current_dialog();
81 int set_current_dialog(int number);
82 int update_framerate();
84 MWindow *mwindow;
85 PreferencesThread *thread;
86 ArrayList<BC_ListBoxItem*> categories;
87 PreferencesCategory *category;
89 private:
90 PreferencesDialog *dialog;
93 class PreferencesCategory : public BC_PopupTextBox
95 public:
96 PreferencesCategory(MWindow *mwindow, PreferencesThread *thread, int x, int y);
97 ~PreferencesCategory();
98 int handle_event();
99 MWindow *mwindow;
100 PreferencesThread *thread;
103 class PreferencesApply : public BC_GenericButton
105 public:
106 PreferencesApply(MWindow *mwindow, PreferencesThread *thread, int x, int y);
107 ~PreferencesApply();
109 int handle_event();
110 MWindow *mwindow;
111 PreferencesThread *thread;
114 #endif