]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/RadioButtonGroup.h
controller-view split of FormLog and FormVCLog.
[lyx.git] / src / frontends / xforms / RadioButtonGroup.h
index 51b51b25a6155f1127f7e0cafdd77adddc6c80af..bf96b6aca68a263d196d57041380ba1c86eb18d5 100644 (file)
@@ -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 <vector>
+#include <utility>
+
+#include FORMS_H_LOCATION
+
 #ifdef __GNUG__
 #pragma interface
-#endif
+#endif 
 
-#include <vector>
-#include <pair.h>
 using std::vector;
 using std::pair;
 
-#include <forms.h>
 
+/** 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<FL_OBJECT *, int> ButtonValuePair;
-    typedef vector<ButtonValuePair> ButtonValueMap;
-    ButtonValueMap map;
+       ///
+       typedef pair<FL_OBJECT *, int> ButtonValuePair;
+       ///
+       typedef vector<ButtonValuePair> ButtonValueMap;
+       ///
+       ButtonValueMap map;
 };
 
-#endif
+#endif