A class for having text elements with reference counting.
const agx::String & getText() const
Get the current text.
virtual ~ReferencedText()
void setText(const agx::String &text)
Set the new text.
ReferencedText(const agx::String &text)
Creates a referenced text given a string.
HudTextManager is a class that inherits from agxSDK::StepEventListener and makes it easier to manipul...
void addConstantText(const agx::String &text)
Add text which should be shown all time steps (until removed).
virtual ~HudTextManager()
void addReferencedText(ReferencedText *text)
Adds referenced text.
HudTextManager(agxOSG::SceneDecorator *sceneDecorator)
void addText(const agx::String &text)
Add text which should be shown only this time step.
agx::Vector< ReferencedTextObserver > m_referencedTexts
agx::String m_constantText
virtual void last(const agx::TimeStamp &t) override
Inherited from agxSDK::StepEventListener.
void updateHud()
Updates the HUD given constant text, referenced text and text, without clearing text.
osg::observer_ptr< agxOSG::SceneDecorator > m_sceneDecorator
void clearText()
Clear text which should be shown only this time step.