r1006: configure: Use libx264_pic instead of libx264 if available.
[cinelerra_cv/mob.git] / cinelerra / preferencesthread.h
blobf0c3f3c0bec87ad5e9f123be9736a66d75637677
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"
13 class PreferencesMenuitem : public BC_MenuItem
15 public:
16 PreferencesMenuitem(MWindow *mwindow);
17 ~PreferencesMenuitem();
19 int handle_event();
21 MWindow *mwindow;
22 PreferencesThread *thread;
25 class PreferencesThread : public Thread
27 public:
28 PreferencesThread(MWindow *mwindow);
29 ~PreferencesThread();
30 void run();
32 int update_framerate();
33 int apply_settings();
34 char* category_to_text(int category);
35 int text_to_category(char *category);
37 int current_dialog;
38 int thread_running;
39 int redraw_indexes;
40 int redraw_meters;
41 int redraw_times;
42 int redraw_overlays;
43 int rerender;
44 int close_assets;
45 int reload_plugins;
46 PreferencesWindow *window;
47 Mutex *window_lock;
48 MWindow *mwindow;
49 // Copy of mwindow preferences
50 Preferences *preferences;
51 EDL *edl;
53 // Categories
54 #define CATEGORIES 5
55 enum
57 PLAYBACK,
58 RECORD,
59 PERFORMANCE,
60 INTERFACE,
61 ABOUT
65 class PreferencesDialog : public BC_SubWindow
67 public:
68 PreferencesDialog(MWindow *mwindow, PreferencesWindow *pwindow);
69 virtual ~PreferencesDialog();
71 virtual int create_objects() { return 0; };
72 virtual int draw_framerate() { return 0; };
73 PreferencesWindow *pwindow;
74 MWindow *mwindow;
75 Preferences *preferences;
78 class PreferencesCategory;
79 class PreferencesButton;
81 class PreferencesWindow : public BC_Window
83 public:
84 PreferencesWindow(MWindow *mwindow,
85 PreferencesThread *thread,
86 int x,
87 int y);
88 ~PreferencesWindow();
90 int create_objects();
91 int delete_current_dialog();
92 int set_current_dialog(int number);
93 int update_framerate();
95 MWindow *mwindow;
96 PreferencesThread *thread;
97 ArrayList<BC_ListBoxItem*> categories;
98 PreferencesCategory *category;
99 PreferencesButton *category_button[CATEGORIES];
101 private:
102 PreferencesDialog *dialog;
105 class PreferencesButton : public BC_GenericButton
107 public:
108 PreferencesButton(MWindow *mwindow,
109 PreferencesThread *thread,
110 int x,
111 int y,
112 int category,
113 char *text,
114 VFrame **images);
116 int handle_event();
118 MWindow *mwindow;
119 PreferencesThread *thread;
120 int category;
123 class PreferencesCategory : public BC_PopupTextBox
125 public:
126 PreferencesCategory(MWindow *mwindow, PreferencesThread *thread, int x, int y);
127 ~PreferencesCategory();
128 int handle_event();
129 MWindow *mwindow;
130 PreferencesThread *thread;
133 class PreferencesApply : public BC_GenericButton
135 public:
136 PreferencesApply(MWindow *mwindow, PreferencesThread *thread);
137 int handle_event();
138 MWindow *mwindow;
139 PreferencesThread *thread;
142 class PreferencesOK : public BC_GenericButton
144 public:
145 PreferencesOK(MWindow *mwindow, PreferencesThread *thread);
146 int keypress_event();
147 int handle_event();
148 MWindow *mwindow;
149 PreferencesThread *thread;
152 class PreferencesCancel : public BC_GenericButton
154 public:
155 PreferencesCancel(MWindow *mwindow, PreferencesThread *thread);
156 int keypress_event();
157 int handle_event();
158 MWindow *mwindow;
159 PreferencesThread *thread;
163 #endif