]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Add protected functions for manipulating widget state
[libs/gltk.git] / source / widget.h
index 665ca9d0e7605161ab8e5a3f0648e45d1d55994e..9bdc2c0e13eba4a24eca88e585b577a2a706e996 100644 (file)
@@ -97,6 +97,12 @@ public:
        bool is_focusable() const { return focusable; }
        void set_focus();
 
+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:
        void render() const;
 protected:
        virtual void render_special(const Part &) const { }