#pragma once #include #include "modules/hwnd_module.h" #include "all.hpp" #include #include class ToolboxWindow { public: // Konstruktor erhält das Application-Objekt als Parameter explicit ToolboxWindow(std::shared_ptr& app); ~ToolboxWindow(); bool m_bShow = false; // Methode zum Anzeigen des Fensters void show(); void hide(); // Für die Fensterinitialisierung void initialize(); void setupToolboxWindow(); std::atomic_bool isIndex = true; struct ToolboxItem{ std::string id; std::string name; std::string path; std::string icon; std::string lua_script_path_string; std::string description; std::string category; std::string version; std::string author; std::string url; std::string license; }; std::vector m_toolboxItems; saucer::smartview m_webview; private: std::shared_ptr m_app; std::thread m_threadMonitor; std::atomic m_runningMonitor = true; std::string jsonString; #ifdef _WIN32 std::filesystem::path userPath = std::getenv("USERPROFILE"); // Windows #else std::filesystem::path userPath = std::getenv("HOME"); // Unix/Linux/MacOS #endif void startThreadMonitor(); bool serveHtmlFile(const std::string &htmlPath, bool setDecorations); void configureWindow(); void loadResources(); void runLuaScript(); void ExposeToJs(); bool ensureToolboxInUserPath(); void fillToolboxMenu(); void debug_print(); void run_lua(int id); void monitor_focus(); void open_file_system(); void SetJsonItems(); void openEinst(); void openIndex(); void getNewContent(); };