Added support for ComboBox::currentIndexChanged*(uint) callback API.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14409 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-08-14 19:00:37 +00:00
parent 5f74fdc326
commit f28d460caa
3 changed files with 68 additions and 15 deletions

View File

@@ -72,8 +72,12 @@ public:
Items& getItems() { return _items; }
const Items& getItems() const { return _items; }
void setCurrentItem(unsigned int i);
unsigned int getCurrentItem() const { return _currentItem; }
void setCurrentIndex(unsigned int i);
unsigned int getCurrentIndex() const { return _currentIndex; }
virtual void currrentIndexChanged(unsigned int i);
virtual void currentIndexChangedImplementation(unsigned int i);
virtual bool handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event);
virtual void createGraphicsImplementation();
@@ -84,7 +88,7 @@ protected:
virtual ~ComboBox() {}
Items _items;
unsigned int _currentItem;
unsigned int _currentIndex;
osg::ref_ptr<osg::Switch> _buttonSwitch;
osg::ref_ptr<osg::Switch> _backgroundSwitch;