bWidgets
Core widget toolkit designed for Blender
ScreenGraph.h
Go to the documentation of this file.
1#pragma once
2
3#include "bwContext.h"
4#include "bwEventDispatcher.h"
5
6namespace bWidgets {
7namespace bwScreenGraph {
8
9class Node;
10class LayoutNode;
11
13 public:
14 template<typename _NodeType>
15 ScreenGraph(std::unique_ptr<_NodeType> _root_node)
16 : event_dispatcher(*this), root_node(std::move(_root_node))
17 {
18 }
19
20 auto Root() const -> LayoutNode&
21 {
22 return *root_node;
23 }
24
28
29 private:
30 std::unique_ptr<LayoutNode> root_node;
31};
32
33} // namespace bwScreenGraph
34} // namespace bWidgets
Mangages sending events to screen-graph nodes based on current state.
Definition: bwEventDispatcher.h:24
Node for aligning children to a specific layout.
Definition: Node.h:92
Definition: ScreenGraph.h:12
ScreenGraph(std::unique_ptr< _NodeType > _root_node)
Definition: ScreenGraph.h:15
auto Root() const -> LayoutNode &
Definition: ScreenGraph.h:20
bwContext context
Definition: ScreenGraph.h:26
bwEventDispatcher event_dispatcher
Definition: ScreenGraph.h:27
Definition: bwContext.h:3
Important state information for the screen-graph.
Definition: bwContext.h:19