Unravel Engine C++ Reference
Loading...
Searching...
No Matches
layout_manager.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <map>
6#include <string>
7#include <vector>
8
9namespace unravel
10{
11
13{
14public:
15 void init(const fs::path& layouts_directory);
16
17 void save_preset(const std::string& name);
18 void load_preset(const std::string& name);
19 void delete_preset(const std::string& name);
20 void reset_to_default();
21
22 auto get_preset_names() const -> std::vector<std::string>;
23 auto has_preset(const std::string& name) const -> bool;
24 auto get_layouts_directory() const -> const fs::path&;
25
26private:
27 void load_presets_from_disk();
28 void save_preset_to_disk(const std::string& name, const std::string& ini_data);
29 void delete_preset_from_disk(const std::string& name);
30 auto get_preset_path(const std::string& name) const -> fs::path;
31
32 fs::path layouts_directory_;
33 std::map<std::string, std::string> presets_;
34};
35
36} // namespace unravel
void save_preset(const std::string &name)
auto has_preset(const std::string &name) const -> bool
void init(const fs::path &layouts_directory)
auto get_preset_names() const -> std::vector< std::string >
void load_preset(const std::string &name)
void delete_preset(const std::string &name)
auto get_layouts_directory() const -> const fs::path &
std::string name
Definition hub.cpp:33