open_toontown_panda3d/panda/src/putil/buttonEvent.I

88 lines
2.5 KiB
Plaintext

// Filename: buttonEvent.I
// Created by: drose (01Mar00)
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// Function: ButtonEvent::Default Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE ButtonEvent::
ButtonEvent() :
_button(ButtonHandle::none()),
_down(false)
{
}
////////////////////////////////////////////////////////////////////
// Function: ButtonEvent::Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE ButtonEvent::
ButtonEvent(ButtonHandle button, bool down) :
_button(button),
_down(down)
{
}
////////////////////////////////////////////////////////////////////
// Function: ButtonEvent::Copy Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE ButtonEvent::
ButtonEvent(const ButtonEvent &copy) :
_button(copy._button),
_down(copy._down)
{
}
////////////////////////////////////////////////////////////////////
// Function: ButtonEvent::Copy Assignment Operator
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE void ButtonEvent::
operator = (const ButtonEvent &copy) {
_button = copy._button;
_down = copy._down;
}
////////////////////////////////////////////////////////////////////
// Function: ButtonEvent::Equality Operator
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE bool ButtonEvent::
operator == (const ButtonEvent &other) const {
return (_button == other._button &&
_down == other._down);
}
////////////////////////////////////////////////////////////////////
// Function: ButtonEvent::Inequality Operator
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE bool ButtonEvent::
operator != (const ButtonEvent &other) const {
return !operator == (other);
}
////////////////////////////////////////////////////////////////////
// Function: ButtonEvent::Ordering Operator
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE bool ButtonEvent::
operator < (const ButtonEvent &other) const {
if (_button != other._button) {
return _button < other._button;
}
return _down < other._down;
}