62 std::size_t editor_mru_limit()
64 return std::max(std::size_t(1), lexical_cast_default<std::size_t>(
74 std::vector<std::string> do_read_editor_mru()
78 std::vector<std::string> mru;
85 const std::string& entry = child[
"path"].str();
91 mru.resize(std::min(editor_mru_limit(), mru.size()));
96 void do_commit_editor_mru(
const std::vector<std::string>& mru)
101 for(
const std::string& entry : mru)
108 child[
"path"] = entry;
110 if(++
n >= editor_mru_limit()) {
121 return do_read_editor_mru();
130 std::vector<std::string> mru = do_read_editor_mru();
136 mru.insert(mru.begin(),
path);
137 mru.resize(std::min(editor_mru_limit(), mru.size()));
139 do_commit_editor_mru(mru);
148 std::vector<std::string> mru = do_read_editor_mru();
152 do_commit_editor_mru(mru);
A config object defines a single node in a WML file, with access to child nodes.
child_itors child_range(config_key_type key)
config & add_child(config_key_type key)
New lexcical_cast header.
Manage the empty-palette in the editor.
void remove()
Removes a tip.
void set_draw_num_of_bitmaps(bool value)
std::string default_dir()
bool draw_terrain_codes()
void set_auto_update_transitions(int value)
void add_recent_files_entry(const std::string &path)
Adds an entry to the recent files list.
bool draw_hex_coordinates()
int auto_update_transitions()
void remove_recent_files_entry(const std::string &path)
Removes a single entry from the recent files list.
bool draw_num_of_bitmaps()
void set_draw_hex_coordinates(bool value)
std::vector< std::string > recent_files()
Retrieves the list of recently opened files.
void set_draw_terrain_codes(bool value)
@ TRANSITION_UPDATE_PARTIAL
Modify, read and display user preferences.
void set(const std::string &key, bool value)
optional_const_config get_child(const std::string &key)
void set_child(const std::string &key, const config &val)
std::string get(const std::string &key)
static map_location::DIRECTION n