#include <llgesturemgr.h>

Public Types | |
| typedef std::map< LLUUID, LLMultiGesture * > | item_map_t |
Public Member Functions | |
| LLGestureManager () | |
| ~LLGestureManager () | |
| void | init () |
| void | update () |
| void | activateGesture (const LLUUID &item_id) |
| void | activateGestures (LLViewerInventoryItem::item_array_t &items) |
| void | replaceGesture (const LLUUID &item_id, LLMultiGesture *new_gesture, const LLUUID &asset_id) |
| void | replaceGesture (const LLUUID &item_id, const LLUUID &asset_id) |
| void | activateGestureWithAsset (const LLUUID &item_id, const LLUUID &asset_id, BOOL inform_server, BOOL deactivate_similar) |
| void | deactivateGesture (const LLUUID &item_id) |
| void | deactivateSimilarGestures (LLMultiGesture *gesture, const LLUUID &in_item_id) |
| BOOL | isGestureActive (const LLUUID &item_id) |
| BOOL | isGesturePlaying (const LLUUID &item_id) |
| void | playGesture (LLMultiGesture *gesture) |
| void | playGesture (const LLUUID &item_id) |
| void | stopGesture (LLMultiGesture *gesture) |
| void | stopGesture (const LLUUID &item_id) |
| BOOL | triggerGesture (KEY key, MASK mask) |
| BOOL | triggerAndReviseString (const std::string &str, std::string *revised_string=NULL) |
| BOOL | isKeyBound (KEY key, MASK mask) |
| S32 | getPlayingCount () const |
| void | addObserver (LLGestureManagerObserver *observer) |
| void | removeObserver (LLGestureManagerObserver *observer) |
| void | notifyObservers () |
| BOOL | matchPrefix (const std::string &in_str, std::string *out_str) |
| void | getItemIDs (std::vector< LLUUID > *ids) |
Public Attributes | |
| BOOL | mValid |
| std::vector< LLMultiGesture * > | mPlaying |
| item_map_t | mActive |
| S32 | mLoadingCount |
| std::string | mDeactivateSimilarNames |
| std::vector < LLGestureManagerObserver * > | mObservers |
Protected Member Functions | |
| void | stepGesture (LLMultiGesture *gesture) |
| void | runStep (LLMultiGesture *gesture, LLGestureStep *step) |
Static Protected Member Functions | |
| static void | onLoadComplete (LLVFS *vfs, const LLUUID &asset_uuid, LLAssetType::EType type, void *user_data, S32 status, LLExtStat ext_status) |
Definition at line 54 of file llgesturemgr.h.
| typedef std::map<LLUUID, LLMultiGesture*> LLGestureManager::item_map_t |
Definition at line 146 of file llgesturemgr.h.
| LLGestureManager::LLGestureManager | ( | ) |
Definition at line 68 of file llgesturemgr.cpp.
| LLGestureManager::~LLGestureManager | ( | ) |
| void LLGestureManager::init | ( | void | ) |
Definition at line 90 of file llgesturemgr.cpp.
| void LLGestureManager::update | ( | ) |
Definition at line 637 of file llgesturemgr.cpp.
References i, LLMultiGesture::mCallbackData, LLMultiGesture::mDoneCallback, mPlaying, notifyObservers(), NULL, S32, and stepGesture().
Referenced by LLAppViewer::idle().


| void LLGestureManager::activateGesture | ( | const LLUUID & | item_id | ) |
Definition at line 98 of file llgesturemgr.cpp.
References activateGestureWithAsset(), FALSE, LLInventoryItem::getAssetUUID(), LLInventoryModel::getItem(), gInventory, mDeactivateSimilarNames, mLoadingCount, and TRUE.
Referenced by activateGestures(), LLToolDragAndDrop::dad3dActivateGesture(), CreateGestureCallback::fire(), ActivateGestureCallback::fire(), LLPreviewGesture::onCommitActive(), and LLGestureBridge::performAction().


| void LLGestureManager::activateGestures | ( | LLViewerInventoryItem::item_array_t & | items | ) |
Definition at line 114 of file llgesturemgr.cpp.
References activateGesture(), activateGestureWithAsset(), LLMessageSystem::addU32(), LLMessageSystem::addUUID(), FALSE, gAgent, LLInventoryItem::getAssetUUID(), LLMessageSystem::getCurrentSendTotal(), LLAgent::getID(), LLAgent::getSessionID(), LLInventoryObject::getUUID(), gMessageSystem, isGestureActive(), mDeactivateSimilarNames, mLoadingCount, MTUBYTES, LLMessageSystem::newMessage(), LLMessageSystem::nextBlock(), S32, LLAgent::sendReliableMessage(), and TRUE.
Referenced by wear_inventory_category_on_avatar_step2().


| void LLGestureManager::replaceGesture | ( | const LLUUID & | item_id, | |
| LLMultiGesture * | new_gesture, | |||
| const LLUUID & | asset_id | |||
| ) |
Definition at line 402 of file llgesturemgr.cpp.
References LLAssetType::AT_GESTURE, FALSE, gAssetStorage, LLAssetStorage::getAssetData(), llendl, llwarns, mActive, LLLoadInfo::mDeactivateSimilar, mDeactivateSimilarNames, LLLoadInfo::mInformServer, LLLoadInfo::mItemID, mLoadingCount, notifyObservers(), LLUUID::notNull(), NULL, onLoadComplete(), stopGesture(), and TRUE.
Referenced by replaceGesture(), LLPreviewGesture::saveIfNeeded(), and LLUpdateAgentInventoryResponder::uploadComplete().


Definition at line 442 of file llgesturemgr.cpp.
References llendl, llwarns, mActive, and replaceGesture().

| void LLGestureManager::activateGestureWithAsset | ( | const LLUUID & | item_id, | |
| const LLUUID & | asset_id, | |||
| BOOL | inform_server, | |||
| BOOL | deactivate_similar | |||
| ) |
Definition at line 207 of file llgesturemgr.cpp.
References LLAssetType::AT_GESTURE, gAssetStorage, LLAssetStorage::getAssetData(), isGestureActive(), llendl, llwarns, mActive, LLLoadInfo::mDeactivateSimilar, LLLoadInfo::mInformServer, LLLoadInfo::mItemID, notifyObservers(), LLUUID::notNull(), NULL, onLoadComplete(), and TRUE.
Referenced by activateGesture(), activateGestures(), and idle_startup().


| void LLGestureManager::deactivateGesture | ( | const LLUUID & | item_id | ) |
Definition at line 256 of file llgesturemgr.cpp.
References LLInventoryModel::addChangedMask(), LLMessageSystem::addU32(), LLMessageSystem::addUUID(), gAgent, LLAgent::getID(), LLAgent::getSessionID(), gInventory, gMessageSystem, LLInventoryObserver::LABEL, llendl, llwarns, mActive, LLMessageSystem::newMessage(), LLMessageSystem::nextBlock(), notifyObservers(), NULL, LLAgent::sendReliableMessage(), and stopGesture().
Referenced by LLFolderBridge::dragCategoryIntoFolder(), LLFolderBridge::dragItemIntoFolder(), LLPreviewGesture::onCommitActive(), LLGestureBridge::performAction(), remove_inventory_category_from_avatar_step2(), LLInvFVBridge::removeBatch(), LLGestureBridge::removeItem(), and LLFolderBridge::removeItem().


| void LLGestureManager::deactivateSimilarGestures | ( | LLMultiGesture * | gesture, | |
| const LLUUID & | in_item_id | |||
| ) |
Definition at line 298 of file llgesturemgr.cpp.
References LLInventoryModel::addChangedMask(), LLMessageSystem::addU32(), LLMessageSystem::addUUID(), FALSE, gAgent, LLMessageSystem::getCurrentSendTotal(), LLAgent::getID(), LLInventoryModel::getItem(), LLInventoryObject::getName(), LLAgent::getSessionID(), gInventory, gMessageSystem, KEY_NONE, LLInventoryObserver::LABEL, mActive, mDeactivateSimilarNames, LLMultiGesture::mKey, LLMultiGesture::mMask, LLMultiGesture::mTrigger, MTUBYTES, LLMessageSystem::newMessage(), LLMessageSystem::nextBlock(), notifyObservers(), NULL, LLAgent::sendReliableMessage(), stopGesture(), and TRUE.
Referenced by onLoadComplete().


Definition at line 384 of file llgesturemgr.cpp.
References mActive.
Referenced by activateGestures(), activateGestureWithAsset(), LLFolderBridge::dragCategoryIntoFolder(), LLFolderBridge::dragItemIntoFolder(), LLGestureBridge::getLabelStyle(), LLGestureBridge::getLabelSuffix(), LLPreviewGesture::onCommitActive(), LLPreviewGesture::refresh(), remove_inventory_category_from_avatar_step2(), LLFolderBridge::removeItem(), LLPreviewGesture::saveIfNeeded(), and LLUpdateAgentInventoryResponder::uploadComplete().

Definition at line 391 of file llgesturemgr.cpp.
References FALSE, mActive, and LLMultiGesture::mPlaying.
Referenced by LLFloaterGesture::onClickPlay(), and LLFloaterGesture::onCommitList().

| void LLGestureManager::playGesture | ( | LLMultiGesture * | gesture | ) |
Definition at line 456 of file llgesturemgr.cpp.
References LLMultiGesture::mCurrentStep, mPlaying, LLMultiGesture::mPlaying, notifyObservers(), stepGesture(), and TRUE.
Referenced by LLFloaterGesture::onClickPlay(), LLPreviewGesture::onClickPreview(), playGesture(), triggerAndReviseString(), and triggerGesture().


| void LLGestureManager::playGesture | ( | const LLUUID & | item_id | ) |
Definition at line 475 of file llgesturemgr.cpp.
References mActive, and playGesture().

| void LLGestureManager::stopGesture | ( | LLMultiGesture * | gesture | ) |
Definition at line 1024 of file llgesturemgr.cpp.
References ANIM_REQUEST_STOP, gAgent, LLMultiGesture::mCallbackData, LLMultiGesture::mDoneCallback, mPlaying, LLMultiGesture::mPlayingAnimIDs, LLMultiGesture::mRequestedAnimIDs, notifyObservers(), NULL, LLMultiGesture::reset(), and LLAgent::sendAnimationRequest().
Referenced by deactivateGesture(), deactivateSimilarGestures(), LLPreviewGesture::handleSaveChangesDialog(), LLFloaterGesture::onClickPlay(), LLPreviewGesture::onClickPreview(), LLPreviewGesture::onClose(), replaceGesture(), and stopGesture().


| void LLGestureManager::stopGesture | ( | const LLUUID & | item_id | ) |
Definition at line 1064 of file llgesturemgr.cpp.
References mActive, and stopGesture().

Definition at line 589 of file llgesturemgr.cpp.
References FALSE, ll_rand(), mActive, LLMultiGesture::mKey, LLMultiGesture::mMask, playGesture(), and TRUE.
Referenced by LLViewerWindow::handleKey().


| BOOL LLGestureManager::triggerAndReviseString | ( | const std::string & | str, | |
| std::string * | revised_string = NULL | |||
| ) |
Definition at line 490 of file llgesturemgr.cpp.
References FALSE, ll_rand(), mActive, LLMultiGesture::mTrigger, NULL, playGesture(), S32, LLStringBase< char >::toLower(), and TRUE.
Referenced by LLVOAvatar::idleUpdate(), LLChatBar::onCommitGesture(), and LLChatBar::sendChat().


| S32 LLGestureManager::getPlayingCount | ( | ) | const |
| void LLGestureManager::addObserver | ( | LLGestureManagerObserver * | observer | ) |
Definition at line 1076 of file llgesturemgr.cpp.
References mObservers.
Referenced by LLFloaterGesture::LLFloaterGesture(), and LLChatBar::setGestureCombo().

| void LLGestureManager::removeObserver | ( | LLGestureManagerObserver * | observer | ) |
Definition at line 1081 of file llgesturemgr.cpp.
References mObservers.
Referenced by LLFloaterGesture::~LLFloaterGesture().

| void LLGestureManager::notifyObservers | ( | ) |
Definition at line 1094 of file llgesturemgr.cpp.
References LLGestureManagerObserver::changed(), lldebugs, llendl, and mObservers.
Referenced by activateGestureWithAsset(), deactivateGesture(), deactivateSimilarGestures(), onLoadComplete(), playGesture(), replaceGesture(), stopGesture(), and update().


| BOOL LLGestureManager::matchPrefix | ( | const std::string & | in_str, | |
| std::string * | out_str | |||
| ) |
Definition at line 1108 of file llgesturemgr.cpp.
References LLStringBase< char >::compareInsensitive(), FALSE, LLMultiGesture::getTrigger(), mActive, S32, TRUE, and LLStringBase< char >::truncate().
Referenced by LLChatBar::onInputEditorKeystroke().


| void LLGestureManager::getItemIDs | ( | std::vector< LLUUID > * | ids | ) |
| void LLGestureManager::stepGesture | ( | LLMultiGesture * | gesture | ) | [protected] |
Definition at line 680 of file llgesturemgr.cpp.
References FALSE, gAgent, LLAgent::getAvatarObject(), LLFrameTimer::getElapsedTimeF32(), llassert, llendl, llinfos, MAX_WAIT_ANIM_SECS, LLMultiGesture::mCurrentStep, LLMultiGesture::mPlaying, LLMultiGesture::mPlayingAnimIDs, LLMultiGesture::mRequestedAnimIDs, LLVOAvatar::mSignaledAnimations, LLMultiGesture::mSteps, LLMultiGesture::mWaitingAnimations, LLMultiGesture::mWaitingAtEnd, LLMultiGesture::mWaitingTimer, LLGestureStepWait::mWaitSeconds, LLMultiGesture::mWaitTimer, NULL, runStep(), S32, and TRUE.
Referenced by playGesture(), and update().


| void LLGestureManager::runStep | ( | LLMultiGesture * | gesture, | |
| LLGestureStep * | step | |||
| ) | [protected] |
Definition at line 828 of file llgesturemgr.cpp.
References ANIM_FLAG_STOP, ANIM_REQUEST_START, ANIM_REQUEST_STOP, CHAT_TYPE_NORMAL, FALSE, gAgent, gChatBar, LLGestureStep::getType(), LLUUID::isNull(), LLGestureStepAnimation::mAnimAssetID, LLGestureStepChat::mChatText, LLMultiGesture::mCurrentStep, LLGestureStepWait::mFlags, LLGestureStepAnimation::mFlags, LLMultiGesture::mRequestedAnimIDs, LLGestureStepSound::mSoundAssetID, LLMultiGesture::mWaitingAnimations, LLMultiGesture::mWaitingTimer, LLMultiGesture::mWaitTimer, LLFrameTimer::reset(), send_sound_trigger(), LLAgent::sendAnimationRequest(), LLChatBar::sendChatFromViewer(), STEP_ANIMATION, STEP_CHAT, STEP_SOUND, STEP_WAIT, TRUE, WAIT_FLAG_ALL_ANIM, and WAIT_FLAG_TIME.
Referenced by stepGesture().


| void LLGestureManager::onLoadComplete | ( | LLVFS * | vfs, | |
| const LLUUID & | asset_uuid, | |||
| LLAssetType::EType | type, | |||
| void * | user_data, | |||
| S32 | status, | |||
| LLExtStat | ext_status | |||
| ) | [static, protected] |
Definition at line 913 of file llgesturemgr.cpp.
References LLInventoryModel::addChangedMask(), LLMessageSystem::addU32(), LLMessageSystem::addUUID(), deactivateSimilarGestures(), LLMultiGesture::deserialize(), gAgent, LLDelayedGestureError::gestureFailedToLoad(), LLDelayedGestureError::gestureMissing(), LLAgent::getID(), LLSingleton< LLViewerStats >::getInstance(), LLAgent::getSessionID(), LLVFile::getSize(), gInventory, gMessageSystem, LLViewerStats::incStat(), LLInventoryObserver::LABEL, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_ERR_FILE_EMPTY, llendl, llerrs, llwarns, mActive, LLLoadInfo::mDeactivateSimilar, mDeactivateSimilarNames, LLLoadInfo::mInformServer, LLLoadInfo::mItemID, mLoadingCount, LLMessageSystem::newMessage(), LLMessageSystem::nextBlock(), notifyObservers(), NULL, LLVFile::read(), LLVFile::READ, S32, LLAgent::sendReliableMessage(), LLNotifyBox::showXml(), and LLViewerStats::ST_DOWNLOAD_FAILED.
Referenced by activateGestureWithAsset(), and replaceGesture().


Definition at line 142 of file llgesturemgr.h.
| std::vector<LLMultiGesture*> LLGestureManager::mPlaying |
Definition at line 143 of file llgesturemgr.h.
Referenced by getPlayingCount(), playGesture(), stopGesture(), and update().
Definition at line 152 of file llgesturemgr.h.
Referenced by activateGestureWithAsset(), LLFloaterGesture::buildGestureList(), deactivateGesture(), deactivateSimilarGestures(), getItemIDs(), isGestureActive(), isGesturePlaying(), matchPrefix(), onLoadComplete(), playGesture(), LLChatBar::refreshGestures(), replaceGesture(), stopGesture(), triggerAndReviseString(), triggerGesture(), and ~LLGestureManager().
Definition at line 154 of file llgesturemgr.h.
Referenced by activateGesture(), activateGestures(), onLoadComplete(), and replaceGesture().
| std::string LLGestureManager::mDeactivateSimilarNames |
Definition at line 155 of file llgesturemgr.h.
Referenced by activateGesture(), activateGestures(), deactivateSimilarGestures(), onLoadComplete(), and replaceGesture().
| std::vector<LLGestureManagerObserver*> LLGestureManager::mObservers |
Definition at line 157 of file llgesturemgr.h.
Referenced by addObserver(), notifyObservers(), and removeObserver().
1.5.5