#include <SDLTranslator.h>
Inheritance diagram for cmil::SDL::DefaultMouse:
Public Member Functions | |
DefaultMouse (const std::string &name) | |
SDL 1.2.11 provides 0-255 buttons and one coord0 event. | |
DefaultMouse () | |
virtual | ~DefaultMouse () |
bool | operator== (const Mouse &mouse) |
Private Member Functions | |
void | init () |
Definition at line 42 of file SDLTranslator.h.
cmil::SDL::DefaultMouse::DefaultMouse | ( | const std::string & | name | ) |
cmil::SDL::DefaultMouse::DefaultMouse | ( | ) |
Definition at line 52 of file SDLTranslator.cpp.
References init().
Here is the call graph for this function:
virtual cmil::SDL::DefaultMouse::~DefaultMouse | ( | ) | [inline, virtual] |
void cmil::SDL::DefaultMouse::init | ( | ) | [private] |
Definition at line 54 of file SDLTranslator.cpp.
References cmil::InputDevice::setInput().
Referenced by DefaultMouse().
00054 { 00056 setInput( "button1", "LeftButton" ); 00057 setInput( "button2", "MiddleButton"); 00058 setInput( "button3", "RightButton" ); 00059 setInput( "button4", "WheelUp" ); 00060 setInput( "button5", "WheelDown" ); 00061 00062 setInput( "coord0", "Motion" ); 00063 }
Here is the call graph for this function:
Here is the caller graph for this function:
bool cmil::SDL::DefaultMouse::operator== | ( | const Mouse & | mouse | ) |
this ignores the mouse name to allow for insertion into the SDLMice DeviceTranslator The DeviceTranslator isn't concerned with the mouse name so this operator is necessary in order for custom mouse devices to be added.
Definition at line 68 of file SDLTranslator.cpp.
References cmil::InputDevice::getInputs(), cmil::DeviceInputs::isEqual(), Logger::log_debug(), cmil::Mouse::m_buttons, cmil::Mouse::m_coords, and cmil::InputDevice::m_inputs.
00068 { 00069 log_debug("(DefaultMouse) operator== Mouse& "); 00070 00071 if(!(m_buttons == mouse.m_buttons) && (m_coords == mouse.m_coords)) 00072 return false; 00073 00074 if( m_inputs.isEqual( false, mouse.getInputs()) ) { 00075 log_debug("operator== returning true"); 00076 return true; 00077 } 00078 return false; 00079 }
Here is the call graph for this function: