1
0
mirror of synced 2024-12-04 12:07:57 +01:00
ImHex/lib/libimhex/include/hex/api/layout_manager.hpp

39 lines
846 B
C++
Raw Normal View History

#pragma once
#include <hex.hpp>
#include <hex/helpers/fs.hpp>
#include <string>
#include <variant>
#include <nlohmann/json_fwd.hpp>
#include <imgui.h>
namespace hex {
class LayoutManager {
public:
struct Layout {
std::string name;
std::fs::path path;
};
static void save(const std::string &name);
static void load(const std::fs::path &path);
static void loadString(const std::string &content);
static std::vector<Layout> getLayouts();
static void process();
static void reload();
2023-05-11 23:21:52 +02:00
static void reset();
private:
LayoutManager() = default;
static std::optional<std::fs::path> s_layoutPathToLoad;
static std::optional<std::string> s_layoutStringToLoad;
static std::vector<Layout> s_layouts;
};
}