00001
00003
00004
00005
00006
00007
00009
00011
00012
00013
00015
00016 #ifndef _VRJGA_BUTTON_DEVICES_GROUP_H_
00017 #define _VRJGA_BUTTON_DEVICES_GROUP_H_
00018
00019 #include "vrjGA/ButtonDevice.h"
00020
00021 #include <vector>
00022
00023
00024 namespace vrjGA {
00025
00026
00027 class VRJ_GA_EXPORT ButtonGroup : public Referenced
00028 {
00029 public:
00030
00031
00032 typedef Referenced BaseClass;
00033
00035 VRJGA_DECLARE_POINTER ( ButtonGroup );
00036
00037
00038 ButtonGroup();
00039
00040
00041 void add ( ButtonDevice * );
00042
00043
00044 unsigned long down() const { return _down; }
00045
00046
00047 unsigned long pressed() const { return _pressed; }
00048
00049
00050 unsigned long released() const { return _released; }
00051
00052
00053 void update();
00054
00055 protected:
00056
00057 virtual ~ButtonGroup();
00058
00059 private:
00060
00061
00062 ButtonGroup ( const ButtonGroup & );
00063 ButtonGroup& operator = ( const ButtonGroup & );
00064
00065 typedef std::vector<ButtonDevice::Ptr> Buttons;
00066 Buttons _buttons;
00067 unsigned long _down;
00068 unsigned long _pressed;
00069 unsigned long _released;
00070 };
00071
00072
00073 };
00074
00075
00076 #endif // _VRJGA_BUTTON_DEVICES_GROUP_H_