Added support for changing background colour of LineEdit widget when focus changes

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14385 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-07-24 14:14:35 +00:00
parent cbd2d6e434
commit 23ae292fe2
3 changed files with 29 additions and 7 deletions

View File

@@ -27,12 +27,14 @@ public:
LineEdit(const LineEdit& label, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Node(osgUI, LineEdit);
virtual bool handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event);
void setText(const std::string& text);
const std::string& getText() const { return _text; }
virtual bool handleImplementation(osgGA::EventVisitor* ev, osgGA::Event* event);
virtual void createGraphicsImplementation();
virtual void enterImplementation();
virtual void leaveImplementation();
protected:
virtual ~LineEdit() {}
@@ -40,6 +42,7 @@ protected:
std::string _text;
// implementation detail
osg::ref_ptr<osg::Switch> _backgroundSwitch;
osg::ref_ptr<osgText::Text> _textDrawable;
};