00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00015
00016 #ifndef __GENERAL_H__
00017 #define __GENERAL_H__
00018
00019 #include "../../core/src/module.h"
00020
00021
00022 namespace VRUT
00023 {
00025 const int MODULE_VERSION = 1;
00026
00028 class _general: public Module
00029 {
00030 protected:
00032 int var;
00034 Parameter::ParameterIdentificator varParamID;
00035
00037 virtual void processEvent(wxCommandEvent & evt)
00038 {
00040 Module::processEvent(evt);
00041
00042 switch (evt.GetEventType())
00043 {
00045 case Event::EVT_PARAM_SET:
00046 UPDATE_PARAM_FROM_EVENT_INT(varParamID, var, evt);
00047 break;
00048 }
00049 }
00051 virtual void run()
00052 {
00055 LOG(wxT("<_general>I am still alive"));
00057 if (TestExit())
00059 return;
00060 }
00061
00062 public:
00064 _general(const MODULE_ID & _id, const wxString & _name, EventHandler * msgSink)
00065 : Module(_id, _name, 0, msgSink),
00068 varParamID(_name, wxT("var"), _id)
00069 {
00071 REGISTER_PARAM_GUI_SLIDER(varParamID, wxT("100"), 0, 200);
00072 }
00074 virtual ~_general()
00075 {
00076 }
00077
00079 virtual wxString GetDesc() const
00080 {
00081 return wxT("This is my module");
00082 }
00083 };
00084 };
00085
00086
00087 EXPORT_VRUT_MODULE_FUNCTIONS( _general )
00088
00089
00090 #endif