Blender
V3.3
|
#include <GHOST_Buttons.h>
Public Member Functions | |
GHOST_Buttons () | |
~GHOST_Buttons () | |
bool | get (GHOST_TButton mask) const |
void | set (GHOST_TButton mask, bool down) |
void | clear () |
Public Attributes | |
uint8_t | m_ButtonLeft: 1 |
uint8_t | m_ButtonMiddle: 1 |
uint8_t | m_ButtonRight: 1 |
uint8_t | m_Button4: 1 |
uint8_t | m_Button5: 1 |
uint8_t | m_Button6: 1 |
uint8_t | m_Button7: 1 |
This struct stores the state of the mouse buttons. Buttons can be set using button masks.
Definition at line 17 of file GHOST_Buttons.h.
GHOST_Buttons::GHOST_Buttons | ( | ) |
GHOST_Buttons::~GHOST_Buttons | ( | ) |
Definition at line 77 of file GHOST_Buttons.cpp.
void GHOST_Buttons::clear | ( | ) |
Sets the state of all buttons to up.
Definition at line 66 of file GHOST_Buttons.cpp.
References m_Button4, m_Button5, m_Button6, m_Button7, m_ButtonLeft, m_ButtonMiddle, and m_ButtonRight.
Referenced by GHOST_SystemCocoa::getButtons(), and GHOST_Buttons().
bool GHOST_Buttons::get | ( | GHOST_TButton | mask | ) | const |
Returns the state of a single button.
mask | Key button to return. |
Definition at line 15 of file GHOST_Buttons.cpp.
References GHOST_kButtonMaskButton4, GHOST_kButtonMaskButton5, GHOST_kButtonMaskButton6, GHOST_kButtonMaskButton7, GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, m_Button4, m_Button5, m_Button6, m_Button7, m_ButtonLeft, m_ButtonMiddle, m_ButtonRight, and mask().
Referenced by GHOST_System::getButtonState().
void GHOST_Buttons::set | ( | GHOST_TButton | mask, |
bool | down | ||
) |
Updates the state of a single button.
mask | Button state to update. |
down | The new state of the button. |
Definition at line 37 of file GHOST_Buttons.cpp.
References GHOST_kButtonMaskButton4, GHOST_kButtonMaskButton5, GHOST_kButtonMaskButton6, GHOST_kButtonMaskButton7, GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, m_Button4, m_Button5, m_Button6, m_Button7, m_ButtonLeft, m_ButtonMiddle, m_ButtonRight, and mask().
Referenced by GHOST_SystemCocoa::getButtons(), GHOST_SystemSDL::getButtons(), GHOST_SystemWin32::getButtons(), and GHOST_SystemX11::getButtons().
uint8_t GHOST_Buttons::m_Button4 |
Definition at line 47 of file GHOST_Buttons.h.
uint8_t GHOST_Buttons::m_Button5 |
Definition at line 48 of file GHOST_Buttons.h.
uint8_t GHOST_Buttons::m_Button6 |
Definition at line 49 of file GHOST_Buttons.h.
uint8_t GHOST_Buttons::m_Button7 |
Definition at line 50 of file GHOST_Buttons.h.
uint8_t GHOST_Buttons::m_ButtonLeft |
Definition at line 44 of file GHOST_Buttons.h.
uint8_t GHOST_Buttons::m_ButtonMiddle |
Definition at line 45 of file GHOST_Buttons.h.
uint8_t GHOST_Buttons::m_ButtonRight |
Definition at line 46 of file GHOST_Buttons.h.