]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/toggle.h
Support exclusive Toggles for implementing option buttons
[libs/gltk.git] / source / toggle.h
index f01f84bd0ba632c8596f80d1fdbce5f66b0c2907..bdb1b31c42808e2a2bb6e4b4bc3b67912a125837 100644 (file)
@@ -33,12 +33,16 @@ private:
        std::string text;
        bool pressed;
        bool value;
+       bool exclusive;
 
 public:
        sigc::signal<void, bool> signal_toggled;
 
        Toggle(const Resources &);
 
+       void set_text(const std::string &);
+       void set_exclusive(bool);
+       bool get_exclusive() const { return exclusive; }
        void set_value(bool);
        bool get_value() const { return value; }
 
@@ -47,6 +51,8 @@ public:
 private:
        virtual const char *get_class() const { return "toggle"; }
        virtual void render_special(const Part &) const;
+
+       void exclude_siblings();
 };
 
 } // namespace GLtk