1 #ifndef PREFERENCESTHREAD_H
2 #define PREFERENCESTHREAD_H
8 #include "preferences.inc"
9 #include "preferencesthread.inc"
14 class PreferencesMenuitem
: public BC_MenuItem
17 PreferencesMenuitem(MWindow
*mwindow
);
18 ~PreferencesMenuitem();
23 PreferencesThread
*thread
;
26 class PreferencesThread
: public Thread
29 PreferencesThread(MWindow
*mwindow
);
33 int update_framerate();
35 char* category_to_text(int category
);
36 int text_to_category(char *category
);
47 PreferencesWindow
*window
;
50 // Copy of mwindow preferences
51 Preferences
*preferences
;
55 class PreferencesDialog
: public BC_SubWindow
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
;
65 Preferences
*preferences
;
68 class PreferencesCategory
;
70 class PreferencesWindow
: public BC_Window
73 PreferencesWindow(MWindow
*mwindow
,
74 PreferencesThread
*thread
,
80 int delete_current_dialog();
81 int set_current_dialog(int number
);
82 int update_framerate();
85 PreferencesThread
*thread
;
86 ArrayList
<BC_ListBoxItem
*> categories
;
87 PreferencesCategory
*category
;
90 PreferencesDialog
*dialog
;
93 class PreferencesCategory
: public BC_PopupTextBox
96 PreferencesCategory(MWindow
*mwindow
, PreferencesThread
*thread
, int x
, int y
);
97 ~PreferencesCategory();
100 PreferencesThread
*thread
;
103 class PreferencesApply
: public BC_GenericButton
106 PreferencesApply(MWindow
*mwindow
, PreferencesThread
*thread
);
109 PreferencesThread
*thread
;
112 class PreferencesOK
: public BC_GenericButton
115 PreferencesOK(MWindow
*mwindow
, PreferencesThread
*thread
);
116 int keypress_event();
119 PreferencesThread
*thread
;
122 class PreferencesCancel
: public BC_GenericButton
125 PreferencesCancel(MWindow
*mwindow
, PreferencesThread
*thread
);
126 int keypress_event();
129 PreferencesThread
*thread
;