Blender V2.61 - r43446
Public Member Functions | Public Attributes

GHOST_Buttons Struct Reference

#include <GHOST_Buttons.h>

List of all members.

Public Member Functions

 GHOST_Buttons ()
virtual ~GHOST_Buttons ()
virtual bool get (GHOST_TButtonMask mask) const
virtual void set (GHOST_TButtonMask mask, bool down)
virtual void clear ()

Public Attributes

GHOST_TUns8 m_ButtonLeft: 1
GHOST_TUns8 m_ButtonMiddle: 1
GHOST_TUns8 m_ButtonRight: 1

Detailed Description

This struct stores the state of the mouse buttons. Buttons can be set using button masks.

Author:
Maarten Gribnau
Date:
May 15, 2001

Definition at line 45 of file GHOST_Buttons.h.


Constructor & Destructor Documentation

GHOST_Buttons::GHOST_Buttons ( )

Constructor.

Definition at line 37 of file GHOST_Buttons.cpp.

References clear().

GHOST_Buttons::~GHOST_Buttons ( ) [virtual]

Definition at line 78 of file GHOST_Buttons.cpp.


Member Function Documentation

void GHOST_Buttons::clear ( ) [virtual]

Sets the state of all buttons to up.

Definition at line 71 of file GHOST_Buttons.cpp.

References m_ButtonLeft, m_ButtonMiddle, and m_ButtonRight.

Referenced by GHOST_SystemCocoa::getButtons(), GHOST_SystemCarbon::getButtons(), and GHOST_Buttons().

bool GHOST_Buttons::get ( GHOST_TButtonMask  mask) const [virtual]

Returns the state of a single button.

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

Definition at line 43 of file GHOST_Buttons.cpp.

References GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, m_ButtonLeft, m_ButtonMiddle, and m_ButtonRight.

Referenced by GHOST_System::getButtonState().

void GHOST_Buttons::set ( GHOST_TButtonMask  mask,
bool  down 
) [virtual]

Updates the state of a single button.

Parameters:
maskButton state to update.
downThe new state of the button.

Definition at line 57 of file GHOST_Buttons.cpp.

References GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, m_ButtonLeft, m_ButtonMiddle, and m_ButtonRight.

Referenced by GHOST_SystemX11::getButtons(), GHOST_SystemWin32::getButtons(), GHOST_SystemSDL::getButtons(), GHOST_SystemCocoa::getButtons(), and GHOST_SystemCarbon::getButtons().


Member Data Documentation

Definition at line 72 of file GHOST_Buttons.h.

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

Definition at line 73 of file GHOST_Buttons.h.

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

Definition at line 74 of file GHOST_Buttons.h.

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


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