Moved the diaglog title bar widgets into the Widget::GraphicsSubgraph map to avoid them poluting the Dialog's children list and to prevent them from being serialized.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14441 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-09-09 15:14:35 +00:00
parent e93e7ca1f2
commit 57a42aac39
4 changed files with 41 additions and 4 deletions

View File

@@ -18,6 +18,7 @@
#include <osgGA/EventVisitor>
#include <osgUI/Export>
#include <osgUI/Widget>
namespace osgUI
{
@@ -26,14 +27,19 @@ namespace osgUI
class OSGUI_EXPORT CloseCallback : public osg::CallbackObject
{
public:
CloseCallback(const std::string& callbackName=std::string("close"));
CloseCallback(const std::string& callbackName=std::string("close"), osgUI::Widget* closeWidget=0);
CloseCallback(const CloseCallback& hc, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Object(osgUI, CloseCallback);
void setCloseWidget(osgUI::Widget* widget) { _closeWidget = widget; }
osgUI::Widget* getCloseWidget() { return _closeWidget.get(); }
const osgUI::Widget* getCloseWidget() const { return _closeWidget.get(); }
virtual bool run(osg::Object* object, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const;
protected:
virtual ~CloseCallback() {}
osg::observer_ptr<osgUI::Widget> _closeWidget;
};
class OSGUI_EXPORT HandleCallback : public osg::CallbackObject