Files
ox/src/nostalgia/studio/projecttreemodel.hpp
T
2022-01-13 02:04:29 -06:00

35 lines
843 B
C++

/*
* Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
*/
#pragma once
#include <ox/std/memory.hpp>
#include <ox/std/string.hpp>
#include <nostalgia/core/context.hpp>
namespace nostalgia {
class ProjectTreeModel {
private:
class ProjectExplorer *m_explorer = nullptr;
ProjectTreeModel *m_parent = nullptr;
ox::String m_name;
ox::Vector<ox::UniquePtr<ProjectTreeModel>> m_children;
public:
explicit ProjectTreeModel(class ProjectExplorer *explorer, const ox::String &name,
ProjectTreeModel *parent = nullptr) noexcept;
ProjectTreeModel(ProjectTreeModel &&other) noexcept;
void draw(core::Context *ctx) noexcept;
void setChildren(ox::Vector<ox::UniquePtr<ProjectTreeModel>> children) noexcept;
private:
[[nodiscard]]
ox::String fullPath() noexcept;
};
}