OpenWalnut  1.5.0dev
Classes | Public Member Functions | Protected Attributes | Friends | List of all members
WGEBorderLayout Class Reference

This class contains a label layout for positioning labels at the side of the screen. More...

#include <WGEBorderLayout.h>

+ Inheritance diagram for WGEBorderLayout:
+ Collaboration diagram for WGEBorderLayout:

Classes

class  SafeUpdateCallback
 Node callback to actually layout the objects. More...
 

Public Member Functions

 WGEBorderLayout ()
 Default constructor. More...
 
virtual ~WGEBorderLayout ()
 Destructor. More...
 
virtual void addLayoutable (osg::ref_ptr< WGELabel > obj)
 Adds the specified object to the list of layouted objects. More...
 
- Public Member Functions inherited from WGEGroupNode
 WGEGroupNode ()
 Default constructor. More...
 
void insert (osg::ref_ptr< osg::Node > node)
 Adds the specified node to the child list of this node in a safe manner. More...
 
void remove (osg::ref_ptr< osg::Node > node)
 Removes the specified node from this group in a thread safe manner. More...
 
void remove_if (std::shared_ptr< WGEGroupNode::NodePredicate > predicate)
 Removes a node if the specified predicate evaluates to true. More...
 
void clear ()
 Removes all children from this node. More...
 

Protected Attributes

osg::ref_ptr< osg::Geode > m_geode
 The geode containing all drawables. More...
 
osg::ref_ptr< osg::Geode > m_lineGeode
 Contains all lead lines. More...
 
osg::ref_ptr< osg::Projection > m_screen
 The projection to the screen. More...
 
- Protected Attributes inherited from WGEGroupNode
osg::ref_ptr< SafeUpdaterCallbackm_nodeUpdater
 Node callback used to update this root node. More...
 
std::queue< std::shared_ptr< ChildOperation > > m_childOperationQueue
 Queue of childs that need to be added/removed during the next update cycle. More...
 
std::shared_mutex m_childOperationQueueLock
 Lock used for inserting and removing childs into the child insertion/removal queue. More...
 
bool m_childOperationQueueDirty
 Flag denoting whether the m_childOperationQueue should be considered during the next update of the node. More...
 
bool m_removeAll
 True whenever all child nodes should be removed. More...
 

Friends

class SafeUpdateCallback
 Grant access for its inner class. More...
 

Additional Inherited Members

- Public Types inherited from WGEGroupNode
typedef WPredicateHelper::ArbitraryPredicateBase< osg::ref_ptr< osg::Node > const > NodePredicate
 The base type of predicate. More...
 
- Protected Types inherited from WGEGroupNode
enum  ChildOperationType { INSERT = 0 , REMOVE , REMOVE_IF , CLEAR }
 The type of operation to perform. More...
 
- Protected Member Functions inherited from WGEGroupNode
virtual ~WGEGroupNode ()
 Destructor. More...
 

Detailed Description

This class contains a label layout for positioning labels at the side of the screen.

There is a line from the point of interest to the label on the side of the screen.

Definition at line 40 of file WGEBorderLayout.h.

Constructor & Destructor Documentation

◆ WGEBorderLayout()

WGEBorderLayout::WGEBorderLayout ( )

Default constructor.

Definition at line 34 of file WGEBorderLayout.cpp.

References WGEGroupNode::insert(), m_geode, m_lineGeode, m_screen, and SafeUpdateCallback.

+ Here is the call graph for this function:

◆ ~WGEBorderLayout()

WGEBorderLayout::~WGEBorderLayout ( )
virtual

Destructor.

Definition at line 64 of file WGEBorderLayout.cpp.

Member Function Documentation

◆ addLayoutable()

void WGEBorderLayout::addLayoutable ( osg::ref_ptr< WGELabel obj)
virtual

Adds the specified object to the list of layouted objects.

Parameters
objthe layoutable object.
Todo:
All:(ebaum): this is ugly, use a common baseclass instead

Definition at line 69 of file WGEBorderLayout.cpp.

References m_geode.

Friends And Related Function Documentation

◆ SafeUpdateCallback

friend class SafeUpdateCallback
friend

Grant access for its inner class.

Definition at line 42 of file WGEBorderLayout.h.

Referenced by WGEBorderLayout().

Member Data Documentation

◆ m_geode

osg::ref_ptr< osg::Geode > WGEBorderLayout::m_geode
protected

The geode containing all drawables.

Definition at line 66 of file WGEBorderLayout.h.

Referenced by addLayoutable(), and WGEBorderLayout().

◆ m_lineGeode

osg::ref_ptr< osg::Geode > WGEBorderLayout::m_lineGeode
protected

Contains all lead lines.

Definition at line 71 of file WGEBorderLayout.h.

Referenced by WGEBorderLayout().

◆ m_screen

osg::ref_ptr< osg::Projection > WGEBorderLayout::m_screen
protected

The projection to the screen.

Definition at line 76 of file WGEBorderLayout.h.

Referenced by WGEBorderLayout().


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