]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Make widgets non-copyable
[libs/gltk.git] / source / widget.h
index dfef4ba7128be3b1a3e099addc5b7720a943ad8e..461cafe232781b1fb490a93bf85e19785ed4e961 100644 (file)
@@ -53,6 +53,9 @@ protected:
        PartCache part_cache;
 
        Widget();
+private:
+       Widget(const Widget &);
+       Widget &operator=(const Widget &);
 public:
        virtual ~Widget();
 
@@ -107,12 +110,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 &);