DART  6.7.3
dart::gui::osg::ImGuiHandler Class Reference

#include <ImGuiHandler.hpp>

Inheritance diagram for dart::gui::osg::ImGuiHandler:

Public Member Functions

 ImGuiHandler ()
 Constructor. More...
 
void init ()
 
void newFrame (::osg::RenderInfo &renderInfo)
 
void render (::osg::RenderInfo &renderInfo)
 
void setCameraCallbacks (::osg::Camera *camera)
 
bool handle (const osgGA::GUIEventAdapter &eventAdapter, osgGA::GUIActionAdapter &actionAdapter, ::osg::Object *object, ::osg::NodeVisitor *nodeVisitor) override
 
Widget management
bool hasWidget (const std::shared_ptr< ImGuiWidget > &widget) const
 Returns true if this Viewer contains given widget. More...
 
void addWidget (const std::shared_ptr< ImGuiWidget > &widget, bool visible=true)
 Adds given Widget to this Viewer. More...
 
void removeWidget (const std::shared_ptr< ImGuiWidget > &widget)
 Removes given Widget from this Viewer. More...
 
void removeAllWidget ()
 Removes all the widgets in this Viewer. More...
 

Protected Attributes

double mTime
 
std::array< bool, 3 > mMousePressed
 Mouse buttons: left, right, middle. More...
 
float mMouseWheel
 
GLuint mFontTexture
 
std::vector< std::shared_ptr< ImGuiWidget > > mWidgets
 

Constructor & Destructor Documentation

◆ ImGuiHandler()

dart::gui::osg::ImGuiHandler::ImGuiHandler ( )

Constructor.

Member Function Documentation

◆ addWidget()

void dart::gui::osg::ImGuiHandler::addWidget ( const std::shared_ptr< ImGuiWidget > &  widget,
bool  visible = true 
)

Adds given Widget to this Viewer.

◆ handle()

bool dart::gui::osg::ImGuiHandler::handle ( const osgGA::GUIEventAdapter &  eventAdapter,
osgGA::GUIActionAdapter &  actionAdapter,
::osg::Object *  object,
::osg::NodeVisitor *  nodeVisitor 
)
override

◆ hasWidget()

bool dart::gui::osg::ImGuiHandler::hasWidget ( const std::shared_ptr< ImGuiWidget > &  widget) const

Returns true if this Viewer contains given widget.

◆ init()

void dart::gui::osg::ImGuiHandler::init ( )

◆ newFrame()

void dart::gui::osg::ImGuiHandler::newFrame ( ::osg::RenderInfo &  renderInfo)

◆ removeAllWidget()

void dart::gui::osg::ImGuiHandler::removeAllWidget ( )

Removes all the widgets in this Viewer.

◆ removeWidget()

void dart::gui::osg::ImGuiHandler::removeWidget ( const std::shared_ptr< ImGuiWidget > &  widget)

Removes given Widget from this Viewer.

◆ render()

void dart::gui::osg::ImGuiHandler::render ( ::osg::RenderInfo &  renderInfo)

◆ setCameraCallbacks()

void dart::gui::osg::ImGuiHandler::setCameraCallbacks ( ::osg::Camera *  camera)

Member Data Documentation

◆ mFontTexture

GLuint dart::gui::osg::ImGuiHandler::mFontTexture
protected

◆ mMousePressed

std::array<bool, 3> dart::gui::osg::ImGuiHandler::mMousePressed
protected

Mouse buttons: left, right, middle.

◆ mMouseWheel

float dart::gui::osg::ImGuiHandler::mMouseWheel
protected

◆ mTime

double dart::gui::osg::ImGuiHandler::mTime
protected

◆ mWidgets

std::vector<std::shared_ptr<ImGuiWidget> > dart::gui::osg::ImGuiHandler::mWidgets
protected