From: Dominic L. <ma...@us...> - 2004-08-16 14:50:55
|
Update of /cvsroot/robotflow/RobotFlow/Probes/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23210/include Modified Files: VirtualJoystick.h Log Message: Added parameter to display or not display buttons Index: VirtualJoystick.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Probes/include/VirtualJoystick.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VirtualJoystick.h 17 Jun 2004 01:03:51 -0000 1.3 --- VirtualJoystick.h 16 Aug 2004 14:50:46 -0000 1.4 *************** *** 1,20 **** // Copyright (C) 2002 Dominic Letourneau #ifndef _VIRTUALJOYSTICK_H_ #define _VIRTUALJOYSTICK_H_ #include "BufferedNode.h" #include <pthread.h> #include <gnome.h> ! class VirtualJoystick : public BufferedNode { protected: bool m_button1_on; bool m_button2_on; bool m_toggleButton3_on; bool m_toggleButton4_on; ! int m_inputID; int m_outputID; --- 1,31 ---- // Copyright (C) 2002 Dominic Letourneau + #ifndef _VIRTUALJOYSTICK_H_ #define _VIRTUALJOYSTICK_H_ + #include "BufferedNode.h" #include <pthread.h> #include <gnome.h> ! /** ! Virtual Joystick is a visual probe that shows a joystick with 2 standard buttons and 2 toggle buttons. ! \author Dominic Letourneau ! */ class VirtualJoystick : public BufferedNode { protected: + ///Flag for the visibility of all the buttons + bool m_buttonsVisible; + ///button 1 state bool m_button1_on; + ///button 2 state bool m_button2_on; + ///button 3 state bool m_toggleButton3_on; + ///button 4 state bool m_toggleButton4_on; ! ///The output vector containing the state of the virtual joystick int m_outputID; *************** *** 34,49 **** public: VirtualJoystick(string nodeName, ParameterSet params); virtual ~VirtualJoystick(); ! /**Class specific initialization routine. ! Each class will call its subclass specificInitialize() method*/ virtual void initialize(); virtual void calculate(int output_id, int count, Buffer &out); gint event(GdkEvent *event); bool change_button_status(int button_id); --- 45,82 ---- public: + /** + Constructor + \param nodeName The name of the node + \param params The parameters passed at construction + */ VirtualJoystick(string nodeName, ParameterSet params); + ///Destructor virtual ~VirtualJoystick(); ! /** ! Class specific initialization routine. ! Each class will call its subclass specificInitialize() method ! */ virtual void initialize(); + /** + Calculate inherited from BufferedNode + \param output_id the output to calculate + \param count the iteration number + \param out the buffer where to write the result + */ virtual void calculate(int output_id, int count, Buffer &out); + /** + Catch a GdkEvent on the canvas + \param event The GdkEvent + */ gint event(GdkEvent *event); + /** + Called when a button changed its status + \param button_id the id of the button + */ bool change_button_status(int button_id); |