LLJoystick Class Reference

#include <lljoystickbutton.h>

Inheritance diagram for LLJoystick:

Inheritance graph
[legend]
Collaboration diagram for LLJoystick:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLJoystick (const LLString &name, LLRect rect, const LLString &default_image, const LLString &selected_image, EJoystickQuadrant initial)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual void onMouseUp ()
virtual void onHeldDown ()=0
F32 getElapsedHeldDownTime ()
void setInitialQuadrant (EJoystickQuadrant initial)
virtual LLXMLNodePtr getXML (bool save_children=true) const

Static Public Member Functions

static void onHeldDown (void *userdata)
static LLString nameFromQuadrant (const EJoystickQuadrant quadrant)
static EJoystickQuadrant quadrantFromName (const LLString &name)
static EJoystickQuadrant selectQuadrant (LLXMLNodePtr node)

Protected Member Functions

virtual void updateSlop ()

Protected Attributes

EJoystickQuadrant mInitialQuadrant
LLCoordGL mInitialOffset
LLCoordGL mLastMouse
LLCoordGL mFirstMouse
S32 mVertSlopNear
S32 mVertSlopFar
S32 mHorizSlopNear
S32 mHorizSlopFar
BOOL mHeldDown
LLFrameTimer mHeldDownTimer

Detailed Description

Definition at line 48 of file lljoystickbutton.h.


Constructor & Destructor Documentation

LLJoystick::LLJoystick ( const LLString name,
LLRect  rect,
const LLString default_image,
const LLString selected_image,
EJoystickQuadrant  initial 
)

Definition at line 56 of file lljoystickbutton.cpp.

References LLUICtrl::mCallbackUserData, LLButton::mHeldDownCallback, and onHeldDown().


Member Function Documentation

F32 LLJoystick::getElapsedHeldDownTime (  ) 

Definition at line 162 of file lljoystickbutton.cpp.

References LLFrameTimer::getElapsedTimeF32(), mHeldDown, and LLButton::mMouseDownTimer.

Referenced by LLJoystickCameraZoom::getOrbitRate(), LLJoystickCameraRotate::getOrbitRate(), LLJoystickAgentTurn::onHeldDown(), and LLJoystickAgentSlide::onMouseUp().

LLXMLNodePtr LLJoystick::getXML ( bool  save_children = true  )  const [virtual]

Reimplemented from LLButton.

Definition at line 243 of file lljoystickbutton.cpp.

References LLButton::addImageAttributeToXML(), LLUICtrl::getXML(), LLButton::mHAlign, LLButton::mImageSelectedID, LLButton::mImageSelectedName, LLButton::mImageUnselectedID, LLButton::mImageUnselectedName, mInitialQuadrant, LLButton::mScaleImage, LLFontGL::nameFromHAlign(), nameFromQuadrant(), and TRUE.

BOOL LLJoystick::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLButton.

Definition at line 152 of file lljoystickbutton.cpp.

References LLButton::handleHover(), LLView::hasMouseCapture(), mLastMouse, and LLCoord::set().

BOOL LLJoystick::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLButton.

Reimplemented in LLJoystickCameraRotate, and LLJoystickCameraZoom.

Definition at line 125 of file lljoystickbutton.cpp.

References LLButton::handleMouseDown(), mFirstMouse, mLastMouse, LLButton::mMouseDownTimer, LLFrameTimer::reset(), and LLCoord::set().

Referenced by LLJoystickCameraZoom::handleMouseDown(), and LLJoystickCameraRotate::handleMouseDown().

BOOL LLJoystick::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLButton.

Definition at line 137 of file lljoystickbutton.cpp.

References FALSE, LLButton::handleMouseUp(), LLView::hasMouseCapture(), mHeldDown, mLastMouse, onMouseUp(), and LLCoord::set().

LLString LLJoystick::nameFromQuadrant ( const EJoystickQuadrant  quadrant  )  [static]

Definition at line 203 of file lljoystickbutton.cpp.

References JQ_DOWN, JQ_LEFT, JQ_ORIGIN, JQ_RIGHT, and JQ_UP.

Referenced by getXML().

void LLJoystick::onHeldDown ( void userdata  )  [static]

Reimplemented from LLButton.

Definition at line 175 of file lljoystickbutton.cpp.

References TRUE.

virtual void LLJoystick::onHeldDown (  )  [pure virtual]

Implemented in LLJoystickAgentTurn, LLJoystickAgentSlide, LLJoystickCameraRotate, LLJoystickCameraTrack, and LLJoystickCameraZoom.

Referenced by LLJoystick().

virtual void LLJoystick::onMouseUp (  )  [inline, virtual]

Reimplemented in LLJoystickAgentSlide.

Definition at line 58 of file lljoystickbutton.h.

Referenced by handleMouseUp().

EJoystickQuadrant LLJoystick::quadrantFromName ( const LLString name  )  [static]

Definition at line 214 of file lljoystickbutton.cpp.

References JQ_DOWN, JQ_LEFT, JQ_ORIGIN, JQ_RIGHT, and JQ_UP.

Referenced by selectQuadrant().

EJoystickQuadrant LLJoystick::selectQuadrant ( LLXMLNodePtr  node  )  [static]

Definition at line 187 of file lljoystickbutton.cpp.

References JQ_RIGHT, and quadrantFromName().

Referenced by LLJoystickAgentSlide::fromXML(), and LLJoystickAgentTurn::fromXML().

void LLJoystick::setInitialQuadrant ( EJoystickQuadrant  initial  )  [inline]

Definition at line 63 of file lljoystickbutton.h.

References mInitialQuadrant.

void LLJoystick::updateSlop (  )  [protected, virtual]

Reimplemented in LLJoystickCameraRotate, and LLJoystickCameraZoom.

Definition at line 80 of file lljoystickbutton.cpp.

References LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), JQ_DOWN, JQ_LEFT, JQ_ORIGIN, JQ_RIGHT, JQ_UP, llendl, llerrs, mHorizSlopFar, mHorizSlopNear, mInitialOffset, mInitialQuadrant, LLView::mRect, mVertSlopFar, mVertSlopNear, LLCoord::mX, LLCoord::mY, and LLCoord::set().

Referenced by LLJoystickAgentSlide::onHeldDown(), and LLJoystickAgentTurn::onHeldDown().


Member Data Documentation

LLCoordGL LLJoystick::mFirstMouse [protected]

Definition at line 78 of file lljoystickbutton.h.

Referenced by LLJoystickCameraZoom::handleMouseDown(), handleMouseDown(), LLJoystickCameraZoom::onHeldDown(), LLJoystickCameraTrack::onHeldDown(), LLJoystickCameraRotate::onHeldDown(), LLJoystickAgentSlide::onHeldDown(), and LLJoystickAgentTurn::onHeldDown().

BOOL LLJoystick::mHeldDown [protected]

Definition at line 83 of file lljoystickbutton.h.

Referenced by getElapsedHeldDownTime(), and handleMouseUp().

LLFrameTimer LLJoystick::mHeldDownTimer [protected]

Definition at line 84 of file lljoystickbutton.h.

S32 LLJoystick::mHorizSlopFar [protected]

Definition at line 82 of file lljoystickbutton.h.

Referenced by LLJoystickCameraRotate::handleMouseDown(), LLJoystickCameraZoom::updateSlop(), LLJoystickCameraRotate::updateSlop(), and updateSlop().

S32 LLJoystick::mHorizSlopNear [protected]

Definition at line 81 of file lljoystickbutton.h.

Referenced by LLJoystickCameraRotate::handleMouseDown(), LLJoystickCameraRotate::onHeldDown(), LLJoystickAgentSlide::onHeldDown(), LLJoystickCameraZoom::updateSlop(), LLJoystickCameraRotate::updateSlop(), and updateSlop().

LLCoordGL LLJoystick::mInitialOffset [protected]

Definition at line 76 of file lljoystickbutton.h.

Referenced by LLJoystickCameraRotate::handleMouseDown(), LLJoystickCameraZoom::onHeldDown(), LLJoystickCameraTrack::onHeldDown(), LLJoystickCameraRotate::onHeldDown(), LLJoystickAgentSlide::onHeldDown(), LLJoystickAgentTurn::onHeldDown(), LLJoystickCameraZoom::updateSlop(), and updateSlop().

EJoystickQuadrant LLJoystick::mInitialQuadrant [protected]

Definition at line 75 of file lljoystickbutton.h.

Referenced by getXML(), LLJoystickCameraZoom::handleMouseDown(), LLJoystickCameraRotate::handleMouseDown(), LLJoystickAgentSlide::onMouseUp(), setInitialQuadrant(), LLJoystickCameraZoom::updateSlop(), and updateSlop().

LLCoordGL LLJoystick::mLastMouse [protected]

Definition at line 77 of file lljoystickbutton.h.

Referenced by handleHover(), handleMouseDown(), handleMouseUp(), LLJoystickCameraZoom::onHeldDown(), LLJoystickCameraTrack::onHeldDown(), LLJoystickCameraRotate::onHeldDown(), LLJoystickAgentSlide::onHeldDown(), and LLJoystickAgentTurn::onHeldDown().

S32 LLJoystick::mVertSlopFar [protected]

Definition at line 80 of file lljoystickbutton.h.

Referenced by LLJoystickCameraRotate::handleMouseDown(), LLJoystickCameraZoom::onHeldDown(), LLJoystickAgentSlide::onHeldDown(), LLJoystickAgentTurn::onHeldDown(), LLJoystickCameraZoom::updateSlop(), LLJoystickCameraRotate::updateSlop(), and updateSlop().

S32 LLJoystick::mVertSlopNear [protected]

Definition at line 79 of file lljoystickbutton.h.

Referenced by LLJoystickCameraRotate::handleMouseDown(), LLJoystickCameraZoom::onHeldDown(), LLJoystickCameraTrack::onHeldDown(), LLJoystickCameraRotate::onHeldDown(), LLJoystickAgentSlide::onHeldDown(), LLJoystickAgentTurn::onHeldDown(), LLJoystickCameraZoom::updateSlop(), LLJoystickCameraRotate::updateSlop(), and updateSlop().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:26 2010 for Second Life Viewer by  doxygen 1.4.7