X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FRadioButtonGroup.h;h=bf96b6aca68a263d196d57041380ba1c86eb18d5;hb=9f29ab3aa5fb11baca9bc28dc3710076cb3a2645;hp=276ab0a74852f4143dcc45ec365e184abc36a7fe;hpb=f4b8943ebb264c92b86a9756f9ae02b76552b347;p=lyx.git diff --git a/src/frontends/xforms/RadioButtonGroup.h b/src/frontends/xforms/RadioButtonGroup.h index 276ab0a748..bf96b6aca6 100644 --- a/src/frontends/xforms/RadioButtonGroup.h +++ b/src/frontends/xforms/RadioButtonGroup.h @@ -9,50 +9,52 @@ * This file Copyright 2000 Baruch Even * ================================================= */ -/* - * This class simplifies the work with a group of radio buttons, - * the idea is that you register a bunch of radio buttons with the accompanying - * value for each radio button and then you get to query or set the active - * button in a single function call. - */ #ifndef RADIOBUTTONGROUP_H #define RADIOBUTTONGROUP_H +#include +#include + +#include FORMS_H_LOCATION + #ifdef __GNUG__ #pragma interface -#endif +#endif -#include -#include using std::vector; using std::pair; -#include FORMS_H_LOCATION +/** This class simplifies the work with a group of radio buttons, + * the idea is that you register a bunch of radio buttons with the accompanying + * value for each radio button and then you get to query or set the active + * button in a single function call. + * @author Baruch Even + */ class RadioButtonGroup { public: - /// Constructor. Allocate space for 'n' items in the group. - RadioButtonGroup(unsigned n = 5) : map(n) - {}; - /// Destructor. Cleans up. - ~RadioButtonGroup() {}; - - /// Register a radio button with it's corresponding value. - void registerRadioButton(FL_OBJECT *button, int value); - /// Reset registrations. - void reset(); - - // Set the active button. - void setButton(int value); - - // Get the active button. - int getButton(); - + /// Constructor. Allocate space for 'n' items in the group. + RadioButtonGroup(unsigned n = 5) : map(n) {}; + + /// Register a radio button with it's corresponding value. + void registerRadioButton(FL_OBJECT *button, int value); + /// Reset registrations. + void reset(); + + // Set the active button. + void setButton(int value); + + // Get the active button. + int getButton(); + private: - typedef pair ButtonValuePair; - typedef vector ButtonValueMap; - ButtonValueMap map; + /// + typedef pair ButtonValuePair; + /// + typedef vector ButtonValueMap; + /// + ButtonValueMap map; }; -#endif +#endif