Blender V4.3
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 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
 

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

Definition at line 78 of file GHOST_Buttons.cc.

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 m_Button4, m_Button5, m_Button6, m_Button7, m_ButtonLeft, m_ButtonMiddle, and m_ButtonRight.

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 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, and m_ButtonRight.

Referenced by GHOST_System::getButtonState().

◆ set()

Member Data Documentation

◆ m_Button4

uint8_t GHOST_Buttons::m_Button4

Definition at line 48 of file GHOST_Buttons.hh.

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

◆ m_Button5

uint8_t GHOST_Buttons::m_Button5

Definition at line 49 of file GHOST_Buttons.hh.

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

◆ m_Button6

uint8_t GHOST_Buttons::m_Button6

Definition at line 50 of file GHOST_Buttons.hh.

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

◆ m_Button7

uint8_t GHOST_Buttons::m_Button7

Definition at line 51 of file GHOST_Buttons.hh.

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

◆ m_ButtonLeft

uint8_t GHOST_Buttons::m_ButtonLeft

Definition at line 45 of file GHOST_Buttons.hh.

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

◆ m_ButtonMiddle

uint8_t GHOST_Buttons::m_ButtonMiddle

Definition at line 46 of file GHOST_Buttons.hh.

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

◆ m_ButtonRight

uint8_t GHOST_Buttons::m_ButtonRight

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: