1
0
mirror of synced 2025-02-10 15:52:59 +01:00
ImHex/lib/libimhex/include/hex/api/workspace_manager.hpp
WerWolv 8039ae1b90 build: Make ImHex fully compile with MSVC and Clang CL
This does NOT make ImHex work yet. However it can now be compiled
2025-02-01 15:13:13 +01:00

39 lines
1010 B
C++

#pragma once
#include <wolv/io/fs.hpp>
#include <hex/helpers/auto_reset.hpp>
#include <map>
#include <string>
namespace hex {
class WorkspaceManager {
public:
struct Workspace {
std::string layout;
std::fs::path path;
bool builtin;
};
static void createWorkspace(const std::string &name, const std::string &layout = "");
static void switchWorkspace(const std::string &name);
static void importFromFile(const std::fs::path &path);
static bool exportToFile(std::fs::path path = {}, std::string workspaceName = {}, bool builtin = false);
static void removeWorkspace(const std::string &name);
static const std::map<std::string, Workspace>& getWorkspaces();
static const std::map<std::string, Workspace>::iterator& getCurrentWorkspace();
static void reset();
static void reload();
static void process();
private:
WorkspaceManager() = default;
};
}