]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.cpp
Add an input method subsystem
[libs/gltk.git] / source / widget.cpp
index 38f8e92a67d4db6b97bef640e539b5c367ebbc73..5fc208268d06e117d7b181b6542154fbf47eb450 100644 (file)
@@ -14,7 +14,7 @@ Widget::Widget():
        style(0),
        state(NORMAL),
        visible(true),
-       focusable(true),
+       input_type(INPUT_NONE),
        parent(0)
 { }
 
@@ -162,7 +162,7 @@ void Widget::set_visible(bool v)
 
 void Widget::set_focusable(bool f)
 {
-       focusable = f;
+       input_type = (f ? INPUT_TEXT : INPUT_NONE);
 }
 
 void Widget::set_focus()