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