00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00015
00016 #ifndef __MANIP_H__
00017 #define __MANIP_H__
00018
00019 #include "../../core/src/manipmodule.h"
00020
00021
00022 namespace VRUT
00023 {
00025 const int MODULE_VERSION = 1;
00026
00028 class _manip: public ManipulatorModule
00029 {
00030 protected:
00032 int var;
00034 Parameter::ParameterIdentificator varParamID;
00035
00037 virtual void processEvent(wxCommandEvent & evt)
00038 {
00040 ManipulatorModule::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 }
00052 virtual void processKeyEvent(wxKeyEvent & evt)
00053 {
00054 LOG(wxString::Format(wxT("<_manip>Key '%i' was pressed"), evt.GetKeyCode()));
00055 }
00057 virtual void processMouseEvent(wxMouseEvent & evt)
00058 {
00059 if (evt.ButtonDown())
00060 LOG(wxT("<_manip>Mouse button down"));
00061 }
00062
00063 public:
00065 _manip(const MODULE_ID & _id, const wxString & _name, EventHandler * msgSink)
00066 : ManipulatorModule(_id, _name, 0, msgSink),
00069 varParamID(_name, wxT("var"), _id)
00070 {
00072 REGISTER_PARAM_GUI_SLIDER(varParamID, wxT("100"), 0, 200);
00073 }
00075 virtual ~_manip()
00076 {
00077 }
00078
00080 virtual wxString GetDesc() const
00081 {
00082 return wxT("This is my module");
00083 }
00084 };
00085 };
00086
00087
00088 EXPORT_VRUT_MODULE_FUNCTIONS( _manip )
00089
00090
00091 #endif