add visualizer_sample_multiplier config option
[ncmpcpp.git] / src / settings.h
blobddb812baf2993680d40e19a75bef5d0798f54f71
1 /***************************************************************************
2 * Copyright (C) 2008-2014 by Andrzej Rybczak *
3 * electricityispower@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
21 #ifndef NCMPCPP_SETTINGS_H
22 #define NCMPCPP_SETTINGS_H
24 #include <boost/date_time/posix_time/posix_time_types.hpp>
25 #include <boost/regex.hpp>
26 #include <cassert>
27 #include <vector>
28 #include <mpd/client.h>
30 #include "enums.h"
31 #include "screen_type.h"
32 #include "strbuffer.h"
34 struct Column
36 Column() : stretch_limit(-1), right_alignment(0), display_empty_tag(1) { }
38 std::wstring name;
39 std::string type;
40 int width;
41 int stretch_limit;
42 NC::Color color;
43 bool fixed;
44 bool right_alignment;
45 bool display_empty_tag;
48 struct Configuration
50 Configuration()
51 : playlist_disable_highlight_delay(0), visualizer_sync_interval(0)
52 { }
54 bool read(const std::string &config_path);
56 std::string ncmpcpp_directory;
57 std::string lyrics_directory;
59 std::string mpd_music_dir;
60 std::string visualizer_fifo_path;
61 std::string visualizer_output_name;
62 std::string empty_tag;
63 std::string tags_separator;
64 std::string song_list_format;
65 std::string song_list_format_dollar_free;
66 std::string song_status_format;
67 std::string song_status_format_no_colors;
68 std::string song_window_title_format;
69 std::string song_library_format;
70 std::string tag_editor_album_format;
71 std::string song_in_columns_to_string_format;
72 std::string browser_sort_format;
73 std::string external_editor;
74 std::string system_encoding;
75 std::string execute_on_song_change;
76 std::string new_header_first_line;
77 std::string new_header_second_line;
78 std::string lastfm_preferred_language;
79 std::wstring progressbar;
80 std::wstring visualizer_chars;
82 std::string pattern;
84 std::vector<Column> columns;
86 DisplayMode playlist_display_mode;
87 DisplayMode browser_display_mode;
88 DisplayMode search_engine_display_mode;
89 DisplayMode playlist_editor_display_mode;
91 NC::Buffer browser_playlist_prefix;
92 NC::Buffer selected_item_prefix;
93 NC::Buffer selected_item_suffix;
94 NC::Buffer now_playing_prefix;
95 NC::Buffer now_playing_suffix;
96 NC::Buffer modified_item_prefix;
98 NC::Color color1;
99 NC::Color color2;
100 NC::Color empty_tags_color;
101 NC::Color header_color;
102 NC::Color volume_color;
103 NC::Color state_line_color;
104 NC::Color state_flags_color;
105 NC::Color main_color;
106 NC::Color main_highlight_color;
107 NC::Color progressbar_color;
108 NC::Color progressbar_elapsed_color;
109 NC::Color statusbar_color;
110 NC::Color alternative_ui_separator_color;
111 NC::Color active_column_color;
112 NC::Color visualizer_color;
114 NC::Border window_border;
115 NC::Border active_window_border;
117 Design design;
119 SpaceAddMode space_add_mode;
121 mpd_tag_type media_lib_primary_tag;
123 bool colors_enabled;
124 bool playlist_show_remaining_time;
125 bool playlist_shorten_total_times;
126 bool playlist_separate_albums;
127 bool set_window_title;
128 bool header_visibility;
129 bool header_text_scrolling;
130 bool statusbar_visibility;
131 bool titles_visibility;
132 bool centered_cursor;
133 bool screen_switcher_previous;
134 bool autocenter_mode;
135 bool wrapped_search;
136 bool space_selects;
137 bool incremental_seeking;
138 bool now_playing_lyrics;
139 bool fetch_lyrics_in_background;
140 bool local_browser_show_hidden_files;
141 bool search_in_db;
142 bool jump_to_now_playing_song_at_start;
143 bool clock_display_seconds;
144 bool display_volume_level;
145 bool display_bitrate;
146 bool display_remaining_time;
147 bool ignore_leading_the;
148 bool block_search_constraints_change;
149 bool use_console_editor;
150 bool use_cyclic_scrolling;
151 bool ask_before_clearing_playlists;
152 bool mouse_support;
153 bool mouse_list_scroll_whole_page;
154 bool visualizer_use_wave;
155 bool visualizer_in_stereo;
156 bool media_library_sort_by_mtime;
157 bool tag_editor_extended_numeration;
158 bool discard_colors_if_item_is_selected;
159 bool store_lyrics_in_song_dir;
160 bool generate_win32_compatible_filenames;
161 bool ask_for_locked_screen_width_part;
162 bool allow_for_physical_item_deletion;
163 bool progressbar_boldness;
165 unsigned mpd_connection_timeout;
166 unsigned crossfade_time;
167 unsigned seek_time;
168 unsigned volume_change_step;
169 unsigned message_delay_time;
170 unsigned lyrics_db;
171 unsigned lines_scrolled;
172 unsigned search_engine_default_search_mode;
174 boost::regex::flag_type regex_type;
176 boost::posix_time::seconds playlist_disable_highlight_delay;
177 boost::posix_time::seconds visualizer_sync_interval;
179 double visualizer_sample_multiplier;
180 double locked_screen_width_part;
182 size_t selected_item_prefix_length;
183 size_t selected_item_suffix_length;
184 size_t now_playing_prefix_length;
185 size_t now_playing_suffix_length;
187 ScreenType startup_screen_type;
188 std::list<ScreenType> screen_sequence;
190 SortMode browser_sort_mode;
193 extern Configuration Config;
195 #endif // NCMPCPP_SETTINGS_H