1 #ifndef __SHBTNPREFS_H__
2 #define __SHBTNPREFS_H__
4 #include "bcwindowbase.h"
8 #include "bclistboxitem.h"
9 #include "preferences.inc"
10 #include "preferencesthread.inc"
12 #include "shbtnprefs.inc"
15 class ShBtnRun : public Thread
20 char commands[BCTEXTLEN];
22 ShBtnRun(const char *name, const char *cmds, int warn=0);
30 char commands[BCTEXTLEN];
34 ShBtnPref(const char *nm, const char *cmds, int warn);
38 class ShBtnEditDialog : public BC_DialogThread
41 PreferencesWindow *pwindow;
43 ShBtnEditWindow *sb_window;
45 void handle_close_event(int result);
47 ShBtnEditDialog(PreferencesWindow *pwindow);
52 class ShBtnAddButton : public BC_GenericButton {
54 ShBtnEditWindow *sb_window;
57 ShBtnAddButton(ShBtnEditWindow *sb_window, int x, int y);
61 class ShBtnDelButton : public BC_GenericButton {
63 ShBtnEditWindow *sb_window;
66 ShBtnDelButton(ShBtnEditWindow *sb_window, int x, int y);
70 class ShBtnEditButton : public BC_GenericButton {
72 ShBtnEditWindow *sb_window;
76 ShBtnEditButton(ShBtnEditWindow *sb_window, int x, int y);
80 class ShBtnTextDialog : public BC_DialogThread
83 ShBtnEditWindow *sb_window;
84 ShBtnTextWindow *st_window;
88 void handle_close_event(int result);
89 int start_edit(ShBtnPref *pref);
91 ShBtnTextDialog(ShBtnEditWindow *sb_window);
95 class ShBtnTextOK : public BC_OKButton
98 ShBtnTextWindow *st_window;
101 ShBtnTextOK(ShBtnTextWindow *st_window, int x, int y);
105 class ShBtnErrWarn : public BC_CheckBox
108 ShBtnErrWarn(ShBtnTextWindow *st_window, int x, int y);
111 ShBtnTextWindow *st_window;
114 class ShBtnTextWindow : public BC_Window
117 BC_TextBox *cmd_name;
118 BC_ScrollTextBox *cmd_text;
119 ShBtnEditWindow *sb_window;
120 ShBtnErrWarn *st_err_warn;
123 void create_objects();
125 ShBtnTextWindow(ShBtnEditWindow *sb_window, int x, int y);
129 class ShBtnPrefItem : public BC_ListBoxItem {
133 ShBtnPrefItem(ShBtnPref *item);
137 class ShBtnPrefList : public BC_ListBox
140 ShBtnEditWindow *sb_window;
143 ShBtnPrefList(ShBtnEditWindow *sb_window, int x, int y);
147 class ShBtnEditWindow : public BC_Window
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;
157 void create_objects();
159 int start_edit(ShBtnPref *pref);
161 ShBtnEditWindow(ShBtnEditDialog *shbtn_edit, int x, int y);
164 ShBtnEditDialog *shbtn_edit;
167 class MainShBtnItem : public BC_MenuItem
170 MainShBtnItem(MainShBtns *shbtns, ShBtnPref *pref);
177 class MainShBtns : public BC_PopupMenu
180 MainShBtns(MWindow *mwindow, int x, int y);
181 int load(Preferences *preferences);