From: Dominic L. <ma...@us...> - 2005-11-18 15:00:43
|
Update of /cvsroot/robotflow/RobotFlow/Probes/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24259/include Added Files: SoundSourceDisplay.h Log Message: testing.. --- NEW FILE: SoundSourceDisplay.h --- // Copyright (C) 2005 Dominic Letourneau #ifndef _SOUNDSOURCEDISPLAY_H_ #define _SOUNDSOURCEDISPLAY_H_ #include "BufferedNode.h" #include <pthread.h> #include <gnome.h> namespace RobotFlow { /** Virtual Joystick is a visual probe that shows a joystick with 2 standard buttons and 2 toggle buttons. \author Dominic Letourneau */ class SoundSourceDisplay : public FD::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; //GUI widgets GtkWidget* m_pWindow1; GtkWidget* m_pVbox2; GtkWidget* m_pToolbar2; GnomeCanvas* m_pCanvas; GnomeCanvasGroup* m_pGroup; GtkWidget* m_pButton1; GtkWidget* m_pButton2; GtkWidget* m_pButton3; GtkWidget* m_pButton4; GnomeCanvasItem* m_pBorder; GnomeCanvasItem* m_pHandle; public: /** Constructor \param nodeName The name of the node \param params The parameters passed at construction */ SoundSourceDisplay(std::string nodeName, FD::ParameterSet params); ///Destructor virtual ~SoundSourceDisplay(); /** 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, FD::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); }; }//namespace RobotFlow #endif |