save state
This commit is contained in:
34
designer/src/desktop_file_interface.h
Normal file
34
designer/src/desktop_file_interface.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// D:\Dev\Mosis\MosisService\designer\src\desktop_file_interface.h
|
||||
#pragma once
|
||||
|
||||
#include <RmlUi/Core/FileInterface.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
namespace mosis {
|
||||
|
||||
class DesktopFileInterface : public Rml::FileInterface {
|
||||
public:
|
||||
DesktopFileInterface() = default;
|
||||
~DesktopFileInterface() override = default;
|
||||
|
||||
// Asset path management
|
||||
void SetAssetsPath(const std::string& path);
|
||||
std::string GetAssetsPath() const { return m_assets_path; }
|
||||
|
||||
// RmlUi FileInterface
|
||||
Rml::FileHandle Open(const Rml::String& path) override;
|
||||
void Close(Rml::FileHandle file) override;
|
||||
size_t Read(void* buffer, size_t size, Rml::FileHandle file) override;
|
||||
bool Seek(Rml::FileHandle file, long offset, int origin) override;
|
||||
size_t Tell(Rml::FileHandle file) override;
|
||||
size_t Length(Rml::FileHandle file) override;
|
||||
|
||||
private:
|
||||
std::string ResolvePath(const std::string& path) const;
|
||||
|
||||
std::string m_assets_path;
|
||||
};
|
||||
|
||||
} // namespace mosis
|
||||
Reference in New Issue
Block a user