fullscreen segv fix, popup for 4opts preview, renderfarm print fix, pan widget upgrad...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / shbtnprefs.h
1 #ifndef __SHBTNPREFS_H__
2 #define __SHBTNPREFS_H__
3
4 #include "bcwindowbase.h"
5 #include "bcbutton.h"
6 #include "bcdialog.h"
7 #include "bclistbox.h"
8 #include "bclistboxitem.h"
9 #include "preferences.inc"
10 #include "preferencesthread.inc"
11 #include "thread.h"
12 #include "shbtnprefs.inc"
13
14
15 class ShBtnRun : public Thread
16 {
17 public:
18         int warn;
19         char name[BCSTRLEN];
20         char commands[BCTEXTLEN];
21
22         ShBtnRun(const char *name, const char *cmds, int warn=0);
23         void run();
24 };
25
26 class ShBtnPref
27 {
28 public:
29         char name[BCSTRLEN];
30         char commands[BCTEXTLEN];
31         int warn;
32         void execute();
33
34         ShBtnPref(const char *nm, const char *cmds, int warn);
35         ~ShBtnPref();
36 };
37
38 class ShBtnEditDialog : public BC_DialogThread
39 {
40 public:
41         PreferencesWindow *pwindow;
42
43         ShBtnEditWindow *sb_window;
44         BC_Window* new_gui();
45         void handle_close_event(int result);
46
47         ShBtnEditDialog(PreferencesWindow *pwindow);
48         ~ShBtnEditDialog();
49 };
50
51
52 class ShBtnAddButton : public BC_GenericButton {
53 public:
54         ShBtnEditWindow *sb_window;
55         int handle_event();
56
57         ShBtnAddButton(ShBtnEditWindow *sb_window, int x, int y);
58         ~ShBtnAddButton();
59 };
60
61 class ShBtnDelButton : public BC_GenericButton {
62 public:
63         ShBtnEditWindow *sb_window;
64         int handle_event();
65
66         ShBtnDelButton(ShBtnEditWindow *sb_window, int x, int y);
67         ~ShBtnDelButton();
68 };
69
70 class ShBtnEditButton : public BC_GenericButton {
71 public:
72         ShBtnEditWindow *sb_window;
73
74         int handle_event();
75
76         ShBtnEditButton(ShBtnEditWindow *sb_window, int x, int y);
77         ~ShBtnEditButton();
78 };
79
80 class ShBtnTextDialog : public BC_DialogThread
81 {
82 public:
83         ShBtnEditWindow *sb_window;
84         ShBtnTextWindow *st_window;
85         ShBtnPref *pref;
86
87         BC_Window* new_gui();
88         void handle_close_event(int result);
89         int start_edit(ShBtnPref *pref);
90
91         ShBtnTextDialog(ShBtnEditWindow *sb_window);
92         ~ShBtnTextDialog();
93 };
94
95 class ShBtnTextOK : public BC_OKButton
96 {
97 public:
98         ShBtnTextWindow *st_window;
99         int handle_event();
100
101         ShBtnTextOK(ShBtnTextWindow *st_window, int x, int y);
102         ~ShBtnTextOK();
103 };
104
105 class ShBtnErrWarn : public BC_CheckBox
106 {
107 public:
108         ShBtnErrWarn(ShBtnTextWindow *st_window, int x, int y);
109         ~ShBtnErrWarn();
110
111         ShBtnTextWindow *st_window;
112 };
113
114 class ShBtnTextWindow : public BC_Window
115 {
116 public:
117         BC_TextBox *cmd_name;
118         BC_ScrollTextBox *cmd_text;
119         ShBtnEditWindow *sb_window;
120         ShBtnErrWarn *st_err_warn;
121         int warn;
122
123         void create_objects();
124
125         ShBtnTextWindow(ShBtnEditWindow *sb_window, int x, int y);
126         ~ShBtnTextWindow();
127 };
128
129 class ShBtnPrefItem : public BC_ListBoxItem {
130 public:
131         ShBtnPref *pref;
132
133         ShBtnPrefItem(ShBtnPref *item);
134         ~ShBtnPrefItem();
135 };
136
137 class ShBtnPrefList : public BC_ListBox
138 {
139 public:
140         ShBtnEditWindow *sb_window;
141         int handle_event();
142
143         ShBtnPrefList(ShBtnEditWindow *sb_window, int x, int y);
144         ~ShBtnPrefList();
145 };
146
147 class ShBtnEditWindow : public BC_Window
148 {
149 public:
150         ShBtnAddButton *add_button;
151         ShBtnDelButton *del_button;
152         ShBtnEditButton *edit_button;
153         ShBtnTextDialog *sb_dialog;
154         ArrayList<BC_ListBoxItem *> shbtn_items;
155         ShBtnPrefList *op_list;
156
157         void create_objects();
158         int list_update();
159         int start_edit(ShBtnPref *pref);
160
161         ShBtnEditWindow(ShBtnEditDialog *shbtn_edit, int x, int y);
162         ~ShBtnEditWindow();
163
164         ShBtnEditDialog *shbtn_edit;
165 };
166
167 class MainShBtnItem : public BC_MenuItem
168 {
169 public:
170         MainShBtnItem(MainShBtns *shbtns, ShBtnPref *pref);
171         int handle_event();
172
173         MainShBtns *shbtns;
174         ShBtnPref *pref;
175 };
176
177 class MainShBtns : public BC_PopupMenu
178 {
179 public:
180         MainShBtns(MWindow *mwindow, int x, int y);
181         int load(Preferences *preferences);
182         int handle_event();
183
184         MWindow *mwindow;
185 };
186
187 #endif