From 4197cd69dc53c1bae95160584c5a4b35fe7e8d5a Mon Sep 17 00:00:00 2001 From: Zero-One101 Date: Fri, 26 Feb 2016 20:25:34 +0000 Subject: [PATCH] Move Node to Outliner class --- specter/include/Specter/Outliner.hpp | 61 +++++++++++++++------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/specter/include/Specter/Outliner.hpp b/specter/include/Specter/Outliner.hpp index 621e37431..4e914afad 100644 --- a/specter/include/Specter/Outliner.hpp +++ b/specter/include/Specter/Outliner.hpp @@ -3,38 +3,41 @@ namespace Specter { -class Node : public View +class Outliner { - struct INodeController + class Node : public View { - virtual boo::ITexture* icon() const { return nullptr; } - virtual const std::string* text() const { return nullptr; } - virtual size_t subNodeCount() const { return 0; } - virtual INodeController* subNode(size_t idx) { return nullptr; } - virtual void activated(const boo::SWindowCoord& coord) {} + struct INodeController + { + virtual boo::ITexture* icon() const { return nullptr; } + virtual const std::string* text() const { return nullptr; } + virtual size_t subNodeCount() const { return 0; } + virtual INodeController* subNode(size_t idx) { return nullptr; } + virtual void activated(const boo::SWindowCoord& coord) {} + }; + + std::string m_description; + std::vector> m_children; + bool m_collapsible; + bool m_collapsed; + + public: + class Resources + { + friend class ViewResources; + + void init(boo::IGraphicsDataFactory* factory, const IThemeData& theme); + }; + + Node(ViewResources& res, View& parentView, const std::string& description); + void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey); + void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey); + void mouseEnter(const boo::SWindowCoord&); + void mouseLeave(const boo::SWindowCoord&); + void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub); + void draw(boo::IGraphicsCommandQueue* gfxQ); + void think(); }; - - std::string m_description; - std::vector> m_children; - bool m_collapsible; - bool m_collapsed; - -public: - class Resources - { - friend class ViewResources; - - void init(boo::IGraphicsDataFactory* factory, const IThemeData& theme); - }; - - Node(ViewResources& res, View& parentView, const std::string& description); - void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey); - void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey); - void mouseEnter(const boo::SWindowCoord&); - void mouseLeave(const boo::SWindowCoord&); - void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub); - void draw(boo::IGraphicsCommandQueue* gfxQ); - void think(); }; }