#include <InputDevice.h>
Inheritance diagram for cmil::Mouse:
Public Member Functions | |
Mouse (const std::string &name, unsigned int buttons, unsigned int coords) | |
This builds the base InputIndentifiers for this device. | |
virtual InputDevice * | clone () const |
virtual bool | operator== (const Mouse &mouse) const |
Public Attributes | |
tInputIndex< Press > | m_buttons |
tInputIndex< Coord > | m_coords |
Private Member Functions | |
void | init_inputs (const std::string &name, unsigned int buttons, unsigned int coords) |
This is for ctor use only. |
Definition at line 283 of file InputDevice.h.
cmil::Mouse::Mouse | ( | const std::string & | name, | |
unsigned int | buttons, | |||
unsigned int | coords | |||
) |
This builds the base InputIndentifiers for this device.
Definition at line 757 of file InputDevice.cpp.
References init_inputs().
Referenced by clone().
00759 : 00760 InputDevice(name) { 00761 init_inputs( name, buttons, coords ); 00762 }
Here is the call graph for this function:
Here is the caller graph for this function:
InputDevice * cmil::Mouse::clone | ( | ) | const [virtual] |
Devices must provide this function in order to achieve certain custom properties on on construction, this function is accessed by translators.
Reimplemented from cmil::InputDevice.
Definition at line 769 of file InputDevice.cpp.
References cmil::InputDevice::getName(), Logger::log_debug(), m_buttons, m_coords, Mouse(), and cmil::InputDevice::setInputs().
00769 { 00770 log_debug( "Mouse clone()" ); 00771 00772 InputDevice* clone = new Mouse(getName(), m_buttons.getSize(), m_coords.getSize()); 00773 00775 clone->setInputs( *this ); 00776 log_debug("clone() returning clone"); 00777 return clone; 00778 }
Here is the call graph for this function:
void cmil::Mouse::init_inputs | ( | const std::string & | name, | |
unsigned int | buttons, | |||
unsigned int | coords | |||
) | [private] |
This is for ctor use only.
Definition at line 764 of file InputDevice.cpp.
References m_buttons, m_coords, and cmil::InputDevice::m_inputs.
Referenced by Mouse().
00764 { 00765 m_buttons.fill_indexes(name, "button", buttons, m_inputs); 00766 m_coords.fill_indexes(name, "coord", coords, m_inputs); 00767 };
Here is the caller graph for this function:
bool cmil::Mouse::operator== | ( | const Mouse & | mouse | ) | const [virtual] |
Definition at line 780 of file InputDevice.cpp.
References cmil::InputDevice::getInputs(), cmil::DeviceInputs::getInputs(), Logger::log_debug(), m_buttons, m_coords, and cmil::InputDevice::m_inputs.
00780 { 00781 log_debug("(Mouse) operator== Mouse& "); 00782 00783 if(!(m_buttons == mouse.m_buttons) && (m_coords == mouse.m_coords)) 00784 return false; 00785 00786 if ( ( m_inputs.getInputs() == mouse.getInputs().getInputs()) ) 00787 return false; 00788 return true; 00789 };
Here is the call graph for this function:
Definition at line 295 of file InputDevice.h.
Referenced by cmil::SDL::SDLMice::assign_inputs(), clone(), init_inputs(), cmil::SDL::DefaultMouse::operator==(), and operator==().
Definition at line 296 of file InputDevice.h.
Referenced by clone(), init_inputs(), cmil::SDL::DefaultMouse::operator==(), and operator==().