Removed Dialog/Popup::open/close() methods as they are replaced by the setVisible() method

This commit is contained in:
Robert Osfield 2014-05-26 16:32:20 +00:00
parent 5d635287c0
commit faced0a896
6 changed files with 3 additions and 33 deletions

View File

@ -31,9 +31,6 @@ public:
std::string& getTitle() { return _title; }
const std::string& getTitle() const { return _title; }
void close();
void open();
bool handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event);
virtual void createGraphicsImplementation();

View File

@ -28,9 +28,6 @@ public:
Popup(const Popup& dialog, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Node(osgUI, Popup);
void close();
void open();
virtual void leaveImplementation();
bool handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event);

View File

@ -43,7 +43,7 @@ bool Dialog::handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event)
if (ea->getKey()=='c')
{
close();
setVisible(false);
ea->setHandled(true);
return true;
@ -57,16 +57,6 @@ bool Dialog::handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event)
return false;
}
void Dialog::close()
{
setVisible(false);
}
void Dialog::open()
{
setVisible(true);
}
void Dialog::createGraphicsImplementation()
{
_group = new osg::Group;

View File

@ -45,7 +45,7 @@ bool Popup::handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event)
if (ea->getKey()=='c')
{
close();
setVisible(false);
ea->setHandled(true);
return true;
@ -59,19 +59,9 @@ bool Popup::handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event)
return false;
}
void Popup::close()
{
setVisible(false);
}
void Popup::open()
{
setVisible(true);
}
void Popup::leaveImplementation()
{
close();
setVisible(false);
}
void Popup::createGraphicsImplementation()

View File

@ -11,6 +11,4 @@ REGISTER_OBJECT_WRAPPER( Dialog,
"osg::Object osg::Node osg::Group osgUI::Widget osgUI::Dialog" )
{
ADD_STRING_SERIALIZER( Title, std::string());
ADD_METHOD( open );
ADD_METHOD( close );
}

View File

@ -10,6 +10,4 @@ REGISTER_OBJECT_WRAPPER( Popup,
osgUI::Popup,
"osg::Object osg::Node osg::Group osgUI::Widget osgUI::Popup" )
{
ADD_METHOD( open );
ADD_METHOD( close );
}