Added Visible and Enalbed properties to Widget

This commit is contained in:
Robert Osfield
2014-05-26 16:15:33 +00:00
parent 5d234ba021
commit b04a4813ba
3 changed files with 20 additions and 2 deletions

View File

@@ -76,6 +76,15 @@ public:
TextSettings* getTextSettings() { return _textSettings.get(); }
const TextSettings* getTextSettings() const { return _textSettings.get(); }
/** set the visibility of the widget.*/
virtual void setVisible(bool visible) { _visible = visible; }
/** get the visibility of the widget.*/
virtual bool getVisible() const { return _visible; }
/** set whether the widget is enabled for user interaction.*/
virtual void setEnabled(bool enabled) { _enabled = enabled; }
/** get whether the widget is enabled for user interaction.*/
virtual bool getEnabled() const { return _enabled; }
enum FocusBehaviour
{
@@ -136,6 +145,9 @@ protected:
osg::ref_ptr<AlignmentSettings> _alignmentSettings;
osg::ref_ptr<FrameSettings> _frameSettings;
osg::ref_ptr<TextSettings> _textSettings;
bool _visible;
bool _enabled;
};
}