]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/RadioButtonGroup.h
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / RadioButtonGroup.h
index 533035be1f662e8ed5c2f12c91a68e384b9ab4d3..0236b8fe5abc1162a4eb07f6e38c56fcd4d74c66 100644 (file)
@@ -1,26 +1,27 @@
 // -*- C++ -*-
 /**
  * \file RadioButtonGroup.h
- * Copyright 2002 the LyX Team
  * Copyright 2000 Baruch Even
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Baruch Even, baruch.even@writeme.com
+ * \author Baruch Even
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 
 #ifndef RADIOBUTTONGROUP_H
 #define RADIOBUTTONGROUP_H
 
-#include <vector>
-#include <utility>
-
-#include FORMS_H_LOCATION
-
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include "support/types.h"
+#include <vector>
+#include <utility>
+#include "forms_fwd.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
  */
 class RadioButtonGroup {
 public:
+       ///
+       typedef lyx::size_type size_type;
+
        /// 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);
+       void init(FL_OBJECT * button, size_type value);
        /// Reset registrations.
        void reset();
 
        // Set the active button.
-       void setButton(int value);
+       void set(size_type value);
 
        // Get the active button.
-       int getButton();
+       size_type get() const;
 
 private:
        ///
-       typedef std::pair<FL_OBJECT *, int> ButtonValuePair;
+       typedef std::pair<FL_OBJECT *, size_type> ButtonValuePair;
        ///
        typedef std::vector<ButtonValuePair> ButtonValueMap;
        ///