bWidgets
Core widget toolkit designed for Blender
bWidgets::bwScreenGraph::Node Class Referenceabstract

The base data-structure for a screen-graph node. More...

#include <Node.h>

+ Inheritance diagram for bWidgets::bwScreenGraph::Node:

Public Types

using ChildList = std::list< std::unique_ptr< Node > >
 
using ChildIterator = ChildList::iterator
 

Public Member Functions

 Node ()=default
 
virtual ~Node ()=default
 
virtual auto Children () const -> const ChildList *
 
virtual auto Children () -> ChildList *
 
virtual auto childrenVisible () const -> bool
 
virtual auto Layout () const -> bwLayoutInterface *
 
virtual auto Widget () const -> bwWidget *
 
auto Parent () const -> Node *
 
auto eventHandler () const -> EventHandler *
 
virtual auto Rectangle () const -> bwRectanglePixel=0
 
virtual auto MaskRectangle () const -> std::optional< bwRectanglePixel >=0
 
virtual auto isVisible () const -> bool=0
 

Friends

class Builder
 

Detailed Description

The base data-structure for a screen-graph node.

Screen-graph nodes are the atomical components of a screen-graph, which is key for the bWidgets design. If you're not familiar with our screen-graph concept, you should really have a look at the bWidgets design overview.

There are three kinds of screen-graph elements/nodes:

  • Widget nodes (node representing a simple widget)
  • Layout nodes (node with children aligned in specified layout)
  • Container nodes (combination of both, widget with children aligned in layout - i.e. panel)

To ensure separation of concerns, the screen-graph node must not have any functionality of its own (no non-trivial member functions). Any functionality must be implemented using friend classes and functions. For example to build a screen-graph and the necessary nodes, a screen-graph builder class should be used and be declared as friend of the Node class. Having to declare those helpers as friends may turn out to an annoyance with small benefits. In that case we should just make data public.

Member Typedef Documentation

◆ ChildIterator

using bWidgets::bwScreenGraph::Node::ChildIterator = ChildList::iterator

◆ ChildList

using bWidgets::bwScreenGraph::Node::ChildList = std::list<std::unique_ptr<Node> >

Constructor & Destructor Documentation

◆ Node()

bWidgets::bwScreenGraph::Node::Node ( )
default

◆ ~Node()

virtual bWidgets::bwScreenGraph::Node::~Node ( )
virtualdefault

Member Function Documentation

◆ Children() [1/2]

virtual auto bWidgets::bwScreenGraph::Node::Children ( ) -> ChildList*
inlinevirtual

◆ Children() [2/2]

virtual auto bWidgets::bwScreenGraph::Node::Children ( ) const -> const ChildList*
inlinevirtual

◆ childrenVisible()

virtual auto bWidgets::bwScreenGraph::Node::childrenVisible ( ) const -> bool
inlinevirtual

◆ eventHandler()

auto bWidgets::bwScreenGraph::Node::eventHandler ( ) const -> EventHandler*
inline

◆ isVisible()

virtual auto bWidgets::bwScreenGraph::Node::isVisible ( ) const -> bool
pure virtual

◆ Layout()

virtual auto bWidgets::bwScreenGraph::Node::Layout ( ) const -> bwLayoutInterface*
inlinevirtual

◆ MaskRectangle()

virtual auto bWidgets::bwScreenGraph::Node::MaskRectangle ( ) const -> std::optional< bwRectanglePixel >
pure virtual

◆ Parent()

auto bWidgets::bwScreenGraph::Node::Parent ( ) const -> Node*
inline

◆ Rectangle()

virtual auto bWidgets::bwScreenGraph::Node::Rectangle ( ) const -> bwRectanglePixel
pure virtual

◆ Widget()

virtual auto bWidgets::bwScreenGraph::Node::Widget ( ) const -> bwWidget*
inlinevirtual

Friends And Related Function Documentation

◆ Builder

friend class Builder
friend

The documentation for this class was generated from the following file: