]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.cpp
Change State into a bitmask to allow more fine-grained control of styles
[libs/gltk.git] / source / widget.cpp
index 0128367c2b32a6a6c54ae458b3d3a994b38cdf2e..be1f0a0cc90fb981bc0ea1a121e3f3f92d95030e 100644 (file)
@@ -115,6 +115,26 @@ void Widget::render_text(const Part &part, const string &text) const
        GL::pop_matrix();
 }
 
+void Widget::pointer_enter()
+{
+       state|=HOVER;
+}
+
+void Widget::pointer_leave()
+{
+       state&=~HOVER;
+}
+
+void Widget::focus_in()
+{
+       state|=FOCUS;
+}
+
+void Widget::focus_out()
+{
+       state&=~FOCUS;
+}
+
 void Widget::update_style()
 {
        string sname=get_class();