|
Blender V5.0
|
#include <GHOST_Buttons.hh>
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 | button_left_: 1 |
| uint8_t | button_middle_: 1 |
| uint8_t | button_right_: 1 |
| uint8_t | button4_: 1 |
| uint8_t | button5_: 1 |
| uint8_t | button6_: 1 |
| uint8_t | button7_: 1 |
This struct stores the state of the mouse buttons. Buttons can be set using button masks.
Definition at line 18 of file GHOST_Buttons.hh.
| GHOST_Buttons::GHOST_Buttons | ( | ) |
|
default |
References mask().
| void GHOST_Buttons::clear | ( | ) |
Sets the state of all buttons to up.
Definition at line 67 of file GHOST_Buttons.cc.
References button4_, button5_, button6_, button7_, button_left_, button_middle_, and button_right_.
Referenced by GHOST_SystemCocoa::getButtons(), and GHOST_Buttons().
| bool GHOST_Buttons::get | ( | GHOST_TButton | mask | ) | const |
Returns the state of a single button.
Definition at line 16 of file GHOST_Buttons.cc.
References button4_, button5_, button6_, button7_, button_left_, button_middle_, button_right_, GHOST_kButtonMaskButton4, GHOST_kButtonMaskButton5, GHOST_kButtonMaskButton6, GHOST_kButtonMaskButton7, GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, 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 38 of file GHOST_Buttons.cc.
References button4_, button5_, button6_, button7_, button_left_, button_middle_, button_right_, GHOST_kButtonMaskButton4, GHOST_kButtonMaskButton5, GHOST_kButtonMaskButton6, GHOST_kButtonMaskButton7, GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, and mask().
Referenced by GHOST_SystemCocoa::getButtons(), GHOST_SystemSDL::getButtons(), GHOST_SystemWin32::getButtons(), GHOST_SystemX11::getButtons(), and tablet_tool_handle_frame().
| uint8_t GHOST_Buttons::button4_ |
Definition at line 48 of file GHOST_Buttons.hh.
| uint8_t GHOST_Buttons::button5_ |
Definition at line 49 of file GHOST_Buttons.hh.
| uint8_t GHOST_Buttons::button6_ |
Definition at line 50 of file GHOST_Buttons.hh.
| uint8_t GHOST_Buttons::button7_ |
Definition at line 51 of file GHOST_Buttons.hh.
| uint8_t GHOST_Buttons::button_left_ |
Definition at line 45 of file GHOST_Buttons.hh.
| uint8_t GHOST_Buttons::button_middle_ |
Definition at line 46 of file GHOST_Buttons.hh.
| uint8_t GHOST_Buttons::button_right_ |
Definition at line 47 of file GHOST_Buttons.hh.