#ifndef CANVAS_MGR_H_
#define CANVAS_MGR_H_
-#include "canvas_fwd.hpp"
-#include "property_based_mgr.hxx"
+#include <simgear/canvas/CanvasMgr.hxx>
+#include <simgear/props/PropertyBasedMgr.hxx>
class CanvasMgr:
- public PropertyBasedMgr
+ public simgear::canvas::CanvasMgr
{
public:
CanvasMgr();
- /**
- * Get ::Canvas by index
- *
- * @param index Index of texture node in /canvas/by-index/
- */
- CanvasPtr getCanvas(size_t index) const;
+ virtual void init();
+ virtual void shutdown();
/**
* Get OpenGL texture name for given canvas
* implementation as PUI can't handle osg::Texture objects.
* Use getCanvas(index)->getTexture() instead.
*
- * @param Index of canvas
* @return OpenGL texture name
*/
- unsigned int getCanvasTexId(size_t index) const;
+ unsigned int getCanvasTexId(const simgear::canvas::CanvasPtr& canvas) const;
+
+ protected:
+
+ osg::observer_ptr<osg::Camera> _gui_camera;
+ SGPropertyChangeCallback<CanvasMgr> _cb_model_reinit;
+
+ void handleModelReinit(SGPropertyNode*);
};
#endif /* CANVAS_MGR_H_ */