2015-12-10 03:16:29 +00:00
|
|
|
#ifndef RUDE_RESOURCE_OUTLINER_HPP
|
|
|
|
#define RUDE_RESOURCE_OUTLINER_HPP
|
|
|
|
|
2015-12-11 02:37:54 +00:00
|
|
|
#include "Space.hpp"
|
2016-01-05 00:01:02 +00:00
|
|
|
#include "ViewManager.hpp"
|
2015-12-10 03:16:29 +00:00
|
|
|
|
|
|
|
namespace RUDE
|
|
|
|
{
|
|
|
|
|
2015-12-11 02:37:54 +00:00
|
|
|
class ResourceOutliner : public Space
|
|
|
|
{
|
2016-01-04 05:31:02 +00:00
|
|
|
struct State : Space::State
|
2015-12-12 00:37:32 +00:00
|
|
|
{
|
|
|
|
DECL_YAML
|
|
|
|
} m_state;
|
2016-01-05 00:01:02 +00:00
|
|
|
const Space::State& spaceState() const {return m_state;}
|
|
|
|
|
|
|
|
struct View : public Specter::View
|
|
|
|
{
|
|
|
|
ResourceOutliner& m_ro;
|
|
|
|
View(ResourceOutliner& ro, Specter::ViewResources& res)
|
|
|
|
: Specter::View(res, ro.m_vm.rootView()), m_ro(ro)
|
|
|
|
{
|
|
|
|
commitResources(res);
|
|
|
|
setBackground(Zeus::CColor::skBlue);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
std::unique_ptr<View> m_view;
|
2016-01-04 05:31:02 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
ResourceOutliner(ViewManager& vm) : Space(vm, Class::ResourceOutliner) {}
|
2016-01-05 00:01:02 +00:00
|
|
|
ResourceOutliner(ViewManager& vm, ConfigReader& r)
|
2016-01-04 05:31:02 +00:00
|
|
|
: ResourceOutliner(vm)
|
|
|
|
{
|
|
|
|
m_state.read(r);
|
|
|
|
}
|
|
|
|
|
2016-01-05 00:01:02 +00:00
|
|
|
Specter::View* buildContentView(Specter::ViewResources& res)
|
|
|
|
{
|
|
|
|
m_view.reset(new View(*this, res));
|
|
|
|
return m_view.get();
|
|
|
|
}
|
2015-12-10 03:16:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // RUDE_RESOURCE_OUTLINER_HPP
|