1 //**************************************************************************************** 2 // 3 // File: Prefs.h 4 // 5 // Written by: Daniel Switkin 6 // 7 // Copyright 1999, Be Incorporated 8 // 9 //**************************************************************************************** 10 11 #ifndef PREFS_H 12 #define PREFS_H 13 14 #include <File.h> 15 #include <Rect.h> 16 17 class Prefs { 18 public: 19 Prefs(); 20 bool Save(); 21 ~Prefs(); 22 23 int window_mode, deskbar_icon_width; 24 BRect normal_window_rect, mini_window_rect, prefs_window_rect; 25 int normal_bar_color, mini_active_color, mini_idle_color, mini_frame_color, 26 deskbar_active_color, deskbar_idle_color, deskbar_frame_color; 27 bool normal_fade_colors; 28 29 private: 30 BFile *fFile; 31 32 bool GetInt(const char *name, int *value, int *defaultvalue); 33 bool GetBool(const char *name, bool *value, bool *defaultvalue); 34 bool GetRect(const char *name, BRect *value, BRect *defaultvalue); 35 bool PutInt(const char *name, int *value); 36 bool PutBool(const char *name, bool *value); 37 bool PutRect(const char *name, BRect *value); 38 39 float GetNormalWindowHeight(); 40 void ComputeNormalWindowSize(); 41 BRect GetNormalWindowRect(); 42 BRect GetMiniWindowRect(); 43 44 bool fFatalError; 45 }; 46 47 #endif // PREFS_H 48