14 #ifndef OSGUI_COMBOBOX
15 #define OSGUI_COMBOBOX
17 #include <osgUI/Popup>
19 #include <osgText/Text>
29 Tab(
const std::string& str) : _text(str) {}
35 void setText(
const std::string& text) { _text = text; }
37 const std::string&
getText()
const {
return _text; }
57 void addTab(
Tab* item) { _tabs.push_back(item); dirty(); }
59 void setTab(
unsigned int i,
Tab* item) { _tabs[i] = item; dirty(); }
60 Tab*
getTab(
unsigned int i) {
return _tabs[i].get(); }
61 const Tab*
getTab(
unsigned int i)
const {
return _tabs[i].get(); }
63 void clear() { _tabs.clear(); dirty(); }
64 void removeTab(
unsigned int i) { _tabs.erase(_tabs.begin()+i); dirty(); }
65 unsigned int getNumTabs() {
return static_cast<unsigned int>(_tabs.size()); }
67 typedef std::vector< osg::ref_ptr<Tab> >
Tabs;
69 void setTabs(
const Tabs& items) { _tabs = items; }
71 const Tabs&
getTabs()
const {
return _tabs; }
73 void setCurrentIndex(
unsigned int i);
76 virtual void currrentIndexChanged(
unsigned int i);
77 virtual void currentIndexChangedImplementation(
unsigned int i);
81 virtual void createGraphicsImplementation();
82 virtual void enterImplementation();
83 virtual void leaveImplementation();
88 void _activateWidgets();
osgUI::Widget * getWidget()
#define META_Node(library, name)
void setText(const std::string &text)
Tab(const std::string &str)
#define META_Object(library, name)
const std::string & getText() const
osg::ref_ptr< osgUI::Widget > _widget
Tab(const Tab &item, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
void setWidget(osgUI::Widget *widget)
const osgUI::Widget * getWidget() const