]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Make the DISABLED state actually do something
[libs/gltk.git] / source / widget.h
index dfef4ba7128be3b1a3e099addc5b7720a943ad8e..6cb3d0654362f60142e4d083561291879713a7c8 100644 (file)
@@ -107,12 +107,17 @@ public:
        void set_focusable(bool);
        bool is_focusable() const { return focusable; }
        void set_focus();
+       void set_enabled(bool);
+       bool is_enabled() const { return !(state&DISABLED); }
 
 protected:
        void set_state(State s) { set_state(s, s); }
        void clear_state(State s) { set_state(s, NORMAL); }
        void set_state(State, State);
+public:
+       State get_state() const { return state; }
 
+protected:
        void rebuild();
        virtual void rebuild_special(const Part &);