1 #ifndef PREFERENCESTHREAD_H
2 #define PREFERENCESTHREAD_H
8 #include "preferences.inc"
9 #include "preferencesthread.inc"
13 class PreferencesMenuitem
: public BC_MenuItem
16 PreferencesMenuitem(MWindow
*mwindow
);
17 ~PreferencesMenuitem();
22 PreferencesThread
*thread
;
25 class PreferencesThread
: public Thread
28 PreferencesThread(MWindow
*mwindow
);
32 int update_framerate();
34 char* category_to_text(int category
);
35 int text_to_category(char *category
);
46 PreferencesWindow
*window
;
49 // Copy of mwindow preferences
50 Preferences
*preferences
;
65 class PreferencesDialog
: public BC_SubWindow
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
;
75 Preferences
*preferences
;
78 class PreferencesCategory
;
79 class PreferencesButton
;
81 class PreferencesWindow
: public BC_Window
84 PreferencesWindow(MWindow
*mwindow
,
85 PreferencesThread
*thread
,
91 int delete_current_dialog();
92 int set_current_dialog(int number
);
93 int update_framerate();
96 PreferencesThread
*thread
;
97 ArrayList
<BC_ListBoxItem
*> categories
;
98 PreferencesCategory
*category
;
99 PreferencesButton
*category_button
[CATEGORIES
];
102 PreferencesDialog
*dialog
;
105 class PreferencesButton
: public BC_GenericButton
108 PreferencesButton(MWindow
*mwindow
,
109 PreferencesThread
*thread
,
119 PreferencesThread
*thread
;
123 class PreferencesCategory
: public BC_PopupTextBox
126 PreferencesCategory(MWindow
*mwindow
, PreferencesThread
*thread
, int x
, int y
);
127 ~PreferencesCategory();
130 PreferencesThread
*thread
;
133 class PreferencesApply
: public BC_GenericButton
136 PreferencesApply(MWindow
*mwindow
, PreferencesThread
*thread
);
139 PreferencesThread
*thread
;
142 class PreferencesOK
: public BC_GenericButton
145 PreferencesOK(MWindow
*mwindow
, PreferencesThread
*thread
);
146 int keypress_event();
149 PreferencesThread
*thread
;
152 class PreferencesCancel
: public BC_GenericButton
155 PreferencesCancel(MWindow
*mwindow
, PreferencesThread
*thread
);
156 int keypress_event();
159 PreferencesThread
*thread
;