VRUT::_manip Class Reference

Add comment here for your module class. More...

#include <_manip.h>

Inheritance diagram for VRUT::_manip:

VRUT::ManipulatorModule VRUT::SceneModule VRUT::Module

List of all members.

Public Member Functions

 _manip (const MODULE_ID &_id, const wxString &_name, EventHandler *msgSink)
 Class constructor - do not alter.
virtual ~_manip ()
 Class destructor - deinitialize your data.
virtual wxString GetDesc () const
 Always overload method giving description for your module.

Protected Member Functions

virtual void processEvent (wxCommandEvent &evt)
 Overload this to process events you need.
virtual void processKeyEvent (wxKeyEvent &evt)
virtual void processMouseEvent (wxMouseEvent &evt)
 And one for mouse input.

Protected Attributes

int var
 Add any variables.
Parameter::ParameterIdentificator varParamID
 Add var param identificator to register this as parameter.


Detailed Description

Add comment here for your module class.

Definition at line 28 of file _manip.h.


Constructor & Destructor Documentation

VRUT::_manip::_manip ( const MODULE_ID _id,
const wxString &  _name,
EventHandler msgSink 
) [inline]

Class constructor - do not alter.

Initialize your variables Do not change other than param name when initializing param identificators

Register your params - choose GUI type or just register w/o GUI

Definition at line 65 of file _manip.h.

00066                      : ManipulatorModule(_id, _name, 0, msgSink),
00069                      varParamID(_name, wxT("var"), _id)
00070               {
00072                      REGISTER_PARAM_GUI_SLIDER(varParamID, wxT("100"), 0, 200);
00073               }

virtual VRUT::_manip::~_manip (  )  [inline, virtual]

Class destructor - deinitialize your data.

Definition at line 75 of file _manip.h.

00076               {
00077               }


Member Function Documentation

virtual void VRUT::_manip::processEvent ( wxCommandEvent &  evt  )  [inline, protected, virtual]

Overload this to process events you need.

Always call base method

Remember to process registered param update events

Reimplemented from VRUT::ManipulatorModule.

Definition at line 37 of file _manip.h.

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               }

virtual void VRUT::_manip::processKeyEvent ( wxKeyEvent &  evt  )  [inline, protected, virtual]

Manipulator modules are special because they have 2 more event processing methods One for key input

Implements VRUT::ManipulatorModule.

Definition at line 52 of file _manip.h.

00053               {
00054                      LOG(wxString::Format(wxT("<_manip>Key '%i' was pressed"), evt.GetKeyCode()));
00055               }

virtual void VRUT::_manip::processMouseEvent ( wxMouseEvent &  evt  )  [inline, protected, virtual]

And one for mouse input.

Implements VRUT::ManipulatorModule.

Definition at line 57 of file _manip.h.

00058               {
00059                      if (evt.ButtonDown())
00060                             LOG(wxT("<_manip>Mouse button down"));
00061               }

virtual wxString VRUT::_manip::GetDesc (  )  const [inline, virtual]

Always overload method giving description for your module.

Implements VRUT::Module.

Definition at line 80 of file _manip.h.

00081               {
00082                      return wxT("This is my module");
00083               }


Member Data Documentation

int VRUT::_manip::var [protected]

Add any variables.

Definition at line 32 of file _manip.h.

Add var param identificator to register this as parameter.

Definition at line 34 of file _manip.h.


The documentation for this class was generated from the following file:

Generated on Tue Mar 10 14:41:45 2009 for VRUT by  doxygen 1.5.5