Fixes to Switch so that it defaults to adding children switched on, and adds

a flag to control whether children and added as true or false.
This commit is contained in:
Robert Osfield
2002-10-07 20:17:57 +00:00
parent 525fc2f746
commit 41768f6824
3 changed files with 20 additions and 10 deletions

View File

@@ -28,8 +28,14 @@ class SG_EXPORT Switch : public Group
virtual void traverse(NodeVisitor& nv);
void setNewChildDefaultValue(bool value) { _newChildDefaultValue = value; }
bool getNewChildDefaultValue() const { return _newChildDefaultValue; }
virtual bool addChild( Node *child );
virtual bool addChild( Node *child, bool value );
virtual bool removeChild( Node *child );
void setValue(unsigned int pos,bool value);
@@ -73,7 +79,8 @@ class SG_EXPORT Switch : public Group
virtual ~Switch() {}
// this is effectively a bit mask.
ValueList _values;
bool _newChildDefaultValue;
ValueList _values;
};
}