Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / client / src / interfaces_manager / radio_controller.h
blobaa95923ae3e8719b805034e770e3f14cc4f4e871
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CL_RADIO_CONTROLLER_H
20 #define CL_RADIO_CONTROLLER_H
22 #include "nel/misc/types_nl.h"
23 // Client.
24 #include "control.h"
25 #include "radio_button.h"
26 #include <vector>
28 using std::vector;
31 /**
32 * CRadioController : manage several CRadioButtons objects, ensuring only one is selected at a time
33 * \author Fleury David
34 * \author Nevrax France
35 * \date 2001
37 class CRadioController : public CControl
39 typedef vector<CRadioButton *> TVectButtons;
40 /// the radio buttons controled by this radio controller
41 TVectButtons _Buttons;
43 public:
44 /// Constructor.
45 CRadioController(uint id);
46 /// Destructor.
47 ~CRadioController();
49 /// Do nothing
50 virtual void display() {}
52 /// Manage the click of the mouse for the control
53 virtual void click(float x, float y, bool &taken);
55 /// does nothing
56 virtual void resize(uint32 width, uint32 height) {}
57 /// does nothing
58 virtual void ref(float x, float y, float width, float height) {}
60 /// Add a button to the group; Return true if the button have been inserted.
61 bool add(CRadioButton *button);
62 /// Select the button corresponding to the id.
63 void select(uint id);
64 /// Return the number of buttons.
65 uint size() {return (uint)_Buttons.size();}
67 /**
68 * unselect all the radio buttons
70 void unselectAll();
74 #endif // CL_RADIO_CONTROLLER_H
76 /* End of radio_button.h */