X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FRadioButtonGroup.h;h=3be3c0ad6182c064d8b2e0fc325d343f151efb3e;hb=d5443737342903de489d527802cd2cdd38987d74;hp=b05cc063e8fb159f95cce27a68b27458998e3b9c;hpb=0be0fcfd5907d448cd51addf83ed7032719a0692;p=lyx.git diff --git a/src/frontends/xforms/RadioButtonGroup.h b/src/frontends/xforms/RadioButtonGroup.h index b05cc063e8..3be3c0ad61 100644 --- a/src/frontends/xforms/RadioButtonGroup.h +++ b/src/frontends/xforms/RadioButtonGroup.h @@ -14,12 +14,14 @@ #ifndef RADIOBUTTONGROUP_H #define RADIOBUTTONGROUP_H - #include "support/types.h" #include #include #include "forms_fwd.h" +namespace lyx { +namespace frontend { + /** This class simplifies interaction with a group of radio buttons: * one, and only one, can be selected. * The idea is that you register a bunch of radio buttons with @@ -31,8 +33,6 @@ */ class RadioButtonGroup { public: - /// - typedef lyx::size_type size_type; /// Register a radio button with its corresponding value. void init(FL_OBJECT * ob, size_type value); @@ -41,9 +41,14 @@ public: void set(size_type value) const; void set(FL_OBJECT * ob) const; + // None of the radiobuttons are set. + void unset() const; + // Get the active button's value. size_type get() const; + void setEnabled(bool enabled); + private: /// typedef std::pair ButtonValuePair; @@ -53,4 +58,7 @@ private: ButtonValueMap map; }; +} // namespace frontend +} // namespace lyx + #endif // RADIOBUTTONGROUP_H