X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FRadioButtonGroup.h;h=3be3c0ad6182c064d8b2e0fc325d343f151efb3e;hb=d5443737342903de489d527802cd2cdd38987d74;hp=02a640f20f4ad10f03472a36a0f3255a9335fa16;hpb=99d1627a471b92f403598d03dfc861ddc3c11be0;p=lyx.git diff --git a/src/frontends/xforms/RadioButtonGroup.h b/src/frontends/xforms/RadioButtonGroup.h index 02a640f20f..3be3c0ad61 100644 --- a/src/frontends/xforms/RadioButtonGroup.h +++ b/src/frontends/xforms/RadioButtonGroup.h @@ -1,26 +1,27 @@ // -*- C++ -*- /** * \file RadioButtonGroup.h - * Copyright 2000 Baruch Even * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * * \author Baruch Even * \author Rob Lahaye * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #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 @@ -32,19 +33,22 @@ */ 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); // Set a single active button. - void set(size_type value); - void set(FL_OBJECT * ob); + 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; @@ -54,4 +58,7 @@ private: ButtonValueMap map; }; -#endif +} // namespace frontend +} // namespace lyx + +#endif // RADIOBUTTONGROUP_H