From Jeremy Moles, updates to osgwidget examples.

Merged by Robert Osfield from OpenSceneGraph-osgWidget-dev
This commit is contained in:
Robert Osfield
2008-11-28 14:36:39 +00:00
parent 16bae8830e
commit 9b1841d009
18 changed files with 1116 additions and 230 deletions

View File

@@ -65,13 +65,13 @@ public:
// Take special note here! Not only do the Button objects have their
// own overridden methods for changing the color, but they have attached
// callbacks for doing the work with local data.
getByName("Widget_1")->addCallback(osgWidget::Callback(
getByName("Widget_1")->addCallback(new osgWidget::Callback(
&AddRemove::handlePressAdd,
this,
osgWidget::EVENT_MOUSE_PUSH
));
getByName("Widget_2")->addCallback(osgWidget::Callback(
getByName("Widget_2")->addCallback(new osgWidget::Callback(
&AddRemove::handlePressRemove,
this,
osgWidget::EVENT_MOUSE_PUSH
@@ -94,7 +94,6 @@ public:
ss << "a random widget " << num;
_win1->addWidget(new ABCWidget(ss.str()));
_win1->resize();
num++;
@@ -110,7 +109,6 @@ public:
osgWidget::Widget* w = _win1->getObjects()[v.size() - 1].get();
_win1->removeWidget(w);
_win1->resize();
return true;
}