+void Widget::set_tooltip(const string &t)
+{
+ tooltip = t;
+}
+
+void Widget::set_visible(bool v)
+{
+ if(v==visible)
+ return;
+
+ visible = v;
+
+ signal_visibility_changed.emit(visible);
+}
+
+void Widget::set_focusable(bool f)
+{
+ focusable = f;
+}
+
+void Widget::set_focus()
+{
+ if(!parent)
+ throw InvalidState("No parent");
+ if(!visible)
+ throw InvalidState("Can't set focus on invisible widget");
+
+ signal_request_focus.emit();
+}
+