Blender  V3.3
Public Member Functions | Public Attributes | List of all members
GHOST_Buttons Struct Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GHOST_Buttons()

GHOST_Buttons::GHOST_Buttons ( )

Constructor.

Definition at line 10 of file GHOST_Buttons.cpp.

References clear().

◆ ~GHOST_Buttons()

GHOST_Buttons::~GHOST_Buttons ( )

Definition at line 77 of file GHOST_Buttons.cpp.

Member Function Documentation

◆ clear()

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

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

◆ set()

void GHOST_Buttons::set ( GHOST_TButton  mask,
bool  down 
)

Member Data Documentation

◆ m_Button4

uint8_t GHOST_Buttons::m_Button4

Definition at line 47 of file GHOST_Buttons.h.

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

◆ m_Button5

uint8_t GHOST_Buttons::m_Button5

Definition at line 48 of file GHOST_Buttons.h.

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

◆ m_Button6

uint8_t GHOST_Buttons::m_Button6

Definition at line 49 of file GHOST_Buttons.h.

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

◆ m_Button7

uint8_t GHOST_Buttons::m_Button7

Definition at line 50 of file GHOST_Buttons.h.

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

◆ m_ButtonLeft

uint8_t GHOST_Buttons::m_ButtonLeft

Definition at line 44 of file GHOST_Buttons.h.

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

◆ m_ButtonMiddle

uint8_t GHOST_Buttons::m_ButtonMiddle

Definition at line 45 of file GHOST_Buttons.h.

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

◆ m_ButtonRight

uint8_t GHOST_Buttons::m_ButtonRight

Definition at line 46 of file GHOST_Buttons.h.

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


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