Blender V5.0
GHOST_Buttons Struct Reference

#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

Detailed Description

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.

Constructor & Destructor Documentation

◆ GHOST_Buttons()

GHOST_Buttons::GHOST_Buttons ( )

Constructor.

Definition at line 11 of file GHOST_Buttons.cc.

References clear().

◆ ~GHOST_Buttons()

GHOST_Buttons::~GHOST_Buttons ( )
default

References mask().

Member Function Documentation

◆ clear()

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().

◆ get()

bool GHOST_Buttons::get ( GHOST_TButton mask) const

Returns the state of a single button.

Parameters
maskKey button to return.
Returns
The state of the button (pressed == true).

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().

◆ set()

Member Data Documentation

◆ button4_

uint8_t GHOST_Buttons::button4_

Definition at line 48 of file GHOST_Buttons.hh.

Referenced by clear(), get(), and set().

◆ button5_

uint8_t GHOST_Buttons::button5_

Definition at line 49 of file GHOST_Buttons.hh.

Referenced by clear(), get(), and set().

◆ button6_

uint8_t GHOST_Buttons::button6_

Definition at line 50 of file GHOST_Buttons.hh.

Referenced by clear(), get(), and set().

◆ button7_

uint8_t GHOST_Buttons::button7_

Definition at line 51 of file GHOST_Buttons.hh.

Referenced by clear(), get(), and set().

◆ button_left_

uint8_t GHOST_Buttons::button_left_

Definition at line 45 of file GHOST_Buttons.hh.

Referenced by clear(), get(), and set().

◆ button_middle_

uint8_t GHOST_Buttons::button_middle_

Definition at line 46 of file GHOST_Buttons.hh.

Referenced by clear(), get(), and set().

◆ button_right_

uint8_t GHOST_Buttons::button_right_

Definition at line 47 of file GHOST_Buttons.hh.

Referenced by clear(), get(), and set().


The documentation for this struct was generated from the following files: