1 /* 2 Copyright (C) 2010 Andrew Caudwell (acaudwell@gmail.com) 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU General Public License 6 as published by the Free Software Foundation; either version 7 3 of the License, or (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef GOURCE_SETTINGS_H 19 #define GOURCE_SETTINGS_H 20 21 #define GOURCE_VERSION "0.51" 22 23 #include "core/texture.h" 24 #include "core/settings.h" 25 #include "core/regex.h" 26 27 class GourceSettings : public SDLAppSettings { 28 protected: 29 void commandLineOption(const std::string& name, const std::string& value); 30 public: 31 int repo_count; 32 33 bool hide_date; 34 bool hide_users; 35 bool hide_tree; 36 bool hide_files; 37 bool hide_usernames; 38 bool hide_filenames; 39 bool hide_dirnames; 40 bool hide_progress; 41 bool hide_bloom; 42 bool hide_mouse; 43 bool hide_root; 44 45 bool disable_auto_rotate; 46 47 bool disable_input; 48 49 bool show_key; 50 51 std::string load_config; 52 std::string save_config; 53 std::string path; 54 bool default_path; 55 56 std::string logo; 57 vec2 logo_offset; 58 59 std::string start_date; 60 std::string stop_date; 61 time_t start_timestamp; 62 time_t stop_timestamp; 63 64 float start_position; 65 float stop_position; 66 float stop_at_time; 67 68 bool shutdown; 69 bool stop_on_idle; 70 bool stop_at_end; 71 bool dont_stop; 72 bool no_time_travel; 73 74 float auto_skip_seconds; 75 float days_per_second; 76 float file_idle_time; 77 float loop_delay_seconds; 78 79 bool loop; 80 81 bool ffp; 82 83 bool colour_user_images; 84 std::string default_user_image; 85 std::string user_image_dir; 86 std::map<std::string, std::string> user_image_map; 87 88 float camera_zoom_min; 89 float camera_zoom_max; 90 float camera_zoom_default; 91 92 std::string camera_mode; 93 float padding; 94 95 bool crop_vertical; 96 bool crop_horizontal; 97 98 float bloom_multiplier; 99 float bloom_intensity; 100 101 vec3 background_colour; 102 std::string background_image; 103 104 std::string title; 105 106 std::string font_file; 107 int font_size; 108 int filename_font_size; 109 int dirname_font_size; 110 int user_font_size; 111 vec3 font_colour; 112 113 float elasticity; 114 115 std::string git_branch; 116 117 std::string log_format; 118 std::string date_format; 119 120 int max_files; 121 float max_user_speed; 122 float max_file_lag; 123 124 float user_idle_time; 125 float user_friction; 126 float user_scale; 127 float time_scale; 128 129 bool highlight_dirs; 130 bool highlight_all_users; 131 132 vec3 dir_colour; 133 vec3 highlight_colour; 134 vec3 selection_colour; 135 136 int dir_name_depth; 137 float dir_name_position; 138 139 std::vector<std::string> highlight_users; 140 std::vector<std::string> follow_users; 141 std::vector<Regex*> file_filters; 142 std::vector<Regex*> file_show_filters; 143 std::vector<Regex*> user_filters; 144 std::vector<Regex*> user_show_filters; 145 bool file_extensions; 146 bool file_extension_fallback; 147 148 std::string caption_file; 149 vec3 caption_colour; 150 float caption_duration; 151 int caption_size; 152 int caption_offset; 153 154 vec3 filename_colour; 155 float filename_time; 156 157 std::string output_custom_filename; 158 159 TextureResource* file_graphic; 160 161 int log_level; 162 163 GourceSettings(); 164 165 void setGourceDefaults(); 166 167 void importGourceSettings(ConfFile& conf, ConfSection* gource_settings = 0); 168 169 void help(bool extended_help=false); 170 }; 171 172 extern GourceSettings gGourceSettings; 173 174 #endif 175