36 lines
832 B
C++
36 lines
832 B
C++
/*
|
|
* Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <ox/std/memory.hpp>
|
|
#include <ox/std/string.hpp>
|
|
|
|
#include <turbine/context.hpp>
|
|
|
|
namespace studio {
|
|
|
|
class ProjectTreeModel {
|
|
private:
|
|
class ProjectExplorer &m_explorer;
|
|
ProjectTreeModel *m_parent = nullptr;
|
|
ox::String m_name;
|
|
ox::Vector<ox::UPtr<ProjectTreeModel>> m_children;
|
|
public:
|
|
explicit ProjectTreeModel(class ProjectExplorer &explorer, ox::String name,
|
|
ProjectTreeModel *parent = nullptr) noexcept;
|
|
|
|
ProjectTreeModel(ProjectTreeModel &&other) noexcept;
|
|
|
|
void draw(turbine::Context &ctx) const noexcept;
|
|
|
|
void setChildren(ox::Vector<ox::UPtr<ProjectTreeModel>> children) noexcept;
|
|
|
|
private:
|
|
[[nodiscard]]
|
|
ox::BasicString<255> fullPath() const noexcept;
|
|
};
|
|
|
|
}
|