Introduced Widget::WidgetStateSet to help localize the StateSet set up by Widget implementations from being serialized or
affecting what end users apply via the standard Node::s/getStateSet(). Further work on TabWidget. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14440 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -58,6 +58,14 @@ public:
|
||||
GraphicsSubgraphMap& getGraphicsSubgraphMap() { return _graphicsSubgraphMap; }
|
||||
const GraphicsSubgraphMap& getGraphicsSubgraphMap() const { return _graphicsSubgraphMap; }
|
||||
|
||||
/** Set the WidgetStateSet is used internally by Widgets to manage state that decorates the subgraph.
|
||||
* WidgetStateSet is not serialized and is typically populated by teh Widget::createGraphics() implementation,
|
||||
* end users will not normally touoch the WidgetStateSet, use the normal Node::setStateSet() if you want to apply
|
||||
* your own state to the Widget and it's subgraphs.*/
|
||||
void setWidgetStateSet(osg::StateSet* stateset) { _widgetStateSet = stateset; }
|
||||
osg::StateSet* getWidgetStateSet() { return _widgetStateSet.get(); }
|
||||
const osg::StateSet* getWidgetStateSet() const { return _widgetStateSet.get(); }
|
||||
osg::StateSet* getOrCreateWidgetStateSet() { if (!_widgetStateSet) _widgetStateSet = new osg::StateSet; return _widgetStateSet.get(); }
|
||||
|
||||
|
||||
/** createGraphics entry method, calls either callback object named "createGraphics" or the createGraphicsImplementation() method.*/
|
||||
@@ -152,6 +160,7 @@ protected:
|
||||
bool _graphicsInitialized;
|
||||
|
||||
GraphicsSubgraphMap _graphicsSubgraphMap;
|
||||
osg::ref_ptr<osg::StateSet> _widgetStateSet;
|
||||
|
||||
osg::BoundingBoxf _extents;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user