/* * Copyright 2016 - 2021 gary@drinkingtea.net * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #pragma once #include #include #include "lib/widget.hpp" #include "projecttreemodel.hpp" namespace nostalgia { class ProjectExplorer: public studio::Widget { private: ox::UniquePtr m_treeModel; core::Context *m_ctx = nullptr; public: explicit ProjectExplorer(core::Context *ctx) noexcept; void draw(core::Context *ctx) noexcept override; void setModel(ox::UniquePtr model) noexcept; ox::Error refreshProjectTreeModel(const ox::String& = {}) noexcept; constexpr ox::FileSystem *romFs() noexcept { return m_ctx->rom.get(); } // slots public: ox::Signal fileChosen; }; }