llinventorybridge.cpp File Reference

Implementation of the Inventory-Folder-View-Bridge classes. More...

#include "llviewerprecompiledheaders.h"
#include <utility>
#include "llinventoryview.h"
#include "llinventorybridge.h"
#include "message.h"
#include "llagent.h"
#include "llcallingcard.h"
#include "llcheckboxctrl.h"
#include "llradiogroup.h"
#include "llspinctrl.h"
#include "lltextbox.h"
#include "llui.h"
#include "llviewercontrol.h"
#include "llfirstuse.h"
#include "llfloateravatarinfo.h"
#include "llfloaterchat.h"
#include "llfloatercustomize.h"
#include "llfloaterproperties.h"
#include "llfloaterworldmap.h"
#include "llfocusmgr.h"
#include "llfolderview.h"
#include "llgesturemgr.h"
#include "lliconctrl.h"
#include "llinventorymodel.h"
#include "llinventoryclipboard.h"
#include "lllineeditor.h"
#include "llmenugl.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
#include "llpreviewlandmark.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
#include "llpreviewsound.h"
#include "llpreviewtexture.h"
#include "llresmgr.h"
#include "llscrollcontainer.h"
#include "llimview.h"
#include "lltooldraganddrop.h"
#include "llviewerimagelist.h"
#include "llviewerinventory.h"
#include "llviewerobjectlist.h"
#include "llviewerwindow.h"
#include "llwearable.h"
#include "llwearablelist.h"
#include "viewer.h"
#include "llviewermessage.h"
#include "llviewerregion.h"
#include "lltabcontainer.h"
#include "llvieweruictrlfactory.h"
#include "llselectmgr.h"
#include "llfloateropenobject.h"

Include dependency graph for llinventorybridge.cpp:

Go to the source code of this file.

Classes

struct  LLWearInfo
class  LLFindWearables
class  LLRightClickInventoryFetchObserver
class  LLRightClickInventoryFetchDescendentsObserver
class  LLInventoryCopyAndWearObserver
struct  LLFoundData
struct  LLWearableHoldingPattern
class  LLOutfitObserver
class  LLWearInventoryCategoryCallback
class  LLOutfitFetch

Functions

void inc_busy_count ()
void dec_busy_count ()
void wear_inventory_category_on_avatar (LLInventoryCategory *category, BOOL append)
void wear_inventory_category_on_avatar_step2 (BOOL proceed, void *userdata)
void wear_inventory_category_on_avatar_loop (LLWearable *wearable, void *)
void wear_inventory_category_on_avatar_step3 (LLWearableHoldingPattern *holder, BOOL append)
void remove_inventory_category_from_avatar (LLInventoryCategory *category)
void remove_inventory_category_from_avatar_step2 (BOOL proceed, void *userdata)
void move_task_inventory_callback (S32 option, void *user_data)
void confirm_replace_attachment_rez (S32 option, void *user_data)
void hideContextEntries (LLMenuGL &menu, const std::vector< LLString > &entries_to_show, const std::vector< LLString > &disabled_entries)
const char * safe_inv_type_lookup (LLInventoryType::EType inv_type)
void warn_move_inventory (LLViewerObject *object, LLMoveInv *move_inv)
BOOL move_inv_category_world_to_agent (const LLUUID &object_id, const LLUUID &category_id, BOOL drop, void(*callback)(S32, void *), void *user_data)
void open_texture (const LLUUID &item_id, const LLString &title, BOOL show_keep_discard, const LLUUID &source_id, BOOL take_focus)
void open_landmark (LLViewerInventoryItem *inv_item, const LLString &title, BOOL show_keep_discard, const LLUUID &source_id, BOOL take_focus)
static void open_landmark_callback (S32 option, void *data)
void open_notecard (LLViewerInventoryItem *inv_item, const LLString &title, const LLUUID &object_id, BOOL show_keep_discard, const LLUUID &source_id, BOOL take_focus)
void rez_attachment (LLViewerInventoryItem *item, LLViewerJointAttachment *attachment)
void wear_inventory_item_on_avatar (LLInventoryItem *item)
void wear_outfit_by_name (const char *name)
void wear_inventory_category (LLInventoryCategory *category, bool copy, bool append)

Variables

const char * ICON_NAME [ICON_NAME_COUNT]
BOOL gAddToOutfit = FALSE


Detailed Description

Implementation of the Inventory-Folder-View-Bridge classes.

LicenseInfo
firstyear=2001&license=viewergpl

Copyright (c) 2001-2007, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llinventorybridge.cpp.


Function Documentation

void confirm_replace_attachment_rez ( S32  option,
void user_data 
)

Definition at line 3249 of file llinventorybridge.cpp.

References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_AttachmentPt, _PREHASH_Description, _PREHASH_ItemID, _PREHASH_Name, _PREHASH_ObjectData, _PREHASH_OwnerID, _PREHASH_RezSingleAttachmentFromInv, _PREHASH_SessionID, LLMessageSystem::addStringFast(), LLMessageSystem::addU8Fast(), LLMessageSystem::addUUIDFast(), gAgent, LLInventoryItem::getDescription(), LLInventoryItem::getFlags(), LLViewerRegion::getHost(), LLAgent::getID(), LLInventoryModel::getItem(), LLInventoryObject::getName(), LLPermissions::getOwner(), LLInventoryItem::getPermissions(), LLAgent::getRegion(), LLAgent::getSessionID(), LLInventoryObject::getUUID(), gInventory, gMessageSystem, LLAttachmentRezAction::mAttachPt, LLAttachmentRezAction::mItemID, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), pack_permissions_slam(), and LLMessageSystem::sendReliable().

Referenced by rez_attachment().

void dec_busy_count (  ) 

Definition at line 97 of file llinventorybridge.cpp.

Referenced by LLOutfitFetch::done(), LLRightClickInventoryFetchDescendentsObserver::done(), wear_inventory_category_on_avatar_step3(), and wear_outfit_by_name().

void hideContextEntries ( LLMenuGL menu,
const std::vector< LLString > &  entries_to_show,
const std::vector< LLString > &  disabled_entries 
)

Definition at line 341 of file llinventorybridge.cpp.

References FALSE, LLView::getChildList(), hideContextEntries(), list, and WIDGET_TYPE_MENU_ITEM_BRANCH.

Referenced by LLTaskSoundBridge::buildContextMenu(), LLTaskCategoryBridge::buildContextMenu(), LLTaskInvFVBridge::buildContextMenu(), LLWearableBridge::buildContextMenu(), LLObjectBridge::buildContextMenu(), LLAnimationBridge::buildContextMenu(), LLGestureBridge::buildContextMenu(), LLCallingCardBridge::buildContextMenu(), LLLandmarkBridge::buildContextMenu(), LLSoundBridge::buildContextMenu(), LLFolderBridge::buildContextMenu(), LLInvFVBridge::buildContextMenu(), LLFolderBridge::folderOptionsMenu(), and hideContextEntries().

void inc_busy_count (  ) 

Definition at line 91 of file llinventorybridge.cpp.

Referenced by LLFolderBridge::buildContextMenu(), LLOutfitFetch::done(), LLRightClickInventoryFetchDescendentsObserver::done(), wear_inventory_category(), wear_inventory_category_on_avatar_step2(), and wear_outfit_by_name().

BOOL move_inv_category_world_to_agent ( const LLUUID object_id,
const LLUUID category_id,
BOOL  drop,
void(*)(S32, void *)  callback,
void user_data 
)

Definition at line 1217 of file llinventorybridge.cpp.

References end, FALSE, LLViewerObjectList::findObject(), gAgent, LLAgent::getGroupID(), LLAgent::getID(), LLViewerObject::getInventoryContents(), gObjectList, llendl, llinfos, LLMoveInv::mCallback, LLMoveInv::mCategoryID, LLMoveInv::mMoveList, LLMoveInv::mObjectID, move_task_inventory_callback(), LLMoveInv::mUserData, LLViewerObject::permYouOwner(), TRUE, and warn_move_inventory().

Referenced by LLFolderBridge::dragCategoryIntoFolder(), and LLFloaterOpenObject::moveToInventory().

void move_task_inventory_callback ( S32  option,
void user_data 
)

Definition at line 2107 of file llinventorybridge.cpp.

References LLInventoryModel::addObserver(), dialog_refresh_all(), LLViewerObjectList::findObject(), LLViewerObject::getInventoryContents(), gInventory, gObjectList, LLMoveInv::mCallback, LLFloaterOpenObject::LLCatAndWear::mCatID, LLMoveInv::mMoveList, LLMoveInv::mObjectID, LLMoveInv::mUserData, and LLFloaterOpenObject::LLCatAndWear::mWear.

Referenced by LLFolderBridge::dragItemIntoFolder(), move_inv_category_world_to_agent(), and warn_move_inventory().

void open_landmark ( LLViewerInventoryItem inv_item,
const LLString title,
BOOL  show_keep_discard,
const LLUUID source_id,
BOOL  take_focus 
)

Definition at line 2538 of file llinventorybridge.cpp.

References LLFloaterView::adjustToFitScreen(), FALSE, LLFloaterView::getNewFloaterPosition(), LLControlGroup::getRect(), LLInventoryObject::getUUID(), gFloaterView, gSavedSettings, left, LLRectBase< Type >::mLeft, LLRectBase< Type >::mTop, S32, LLFloater::setFocus(), LLPreview::setSourceID(), LLPreview::show(), top, LLRectBase< Type >::translate(), and TRUE.

Referenced by landmark_menu_action(), LLFloaterLandmark::onBtnEdit(), open_offer(), LLViewerTextEditor::openEmbeddedLandmark(), and LLLandmarkBridge::performAction().

static void open_landmark_callback ( S32  option,
void data 
) [static]

Definition at line 2566 of file llinventorybridge.cpp.

References gAgent, gFloaterWorldMap, LLAgent::teleportViaLandmark(), and LLFloaterWorldMap::trackLandmark().

Referenced by LLLandmarkBridge::openItem().

void open_notecard ( LLViewerInventoryItem inv_item,
const LLString title,
const LLUUID object_id,
BOOL  show_keep_discard,
const LLUUID source_id,
BOOL  take_focus 
)

Definition at line 2824 of file llinventorybridge.cpp.

References LLFloaterView::adjustToFitScreen(), FALSE, LLInventoryItem::getAssetUUID(), LLFloaterView::getNewFloaterPosition(), LLControlGroup::getRect(), LLInventoryObject::getUUID(), gFloaterView, gSavedSettings, left, LLRectBase< Type >::mLeft, LLRectBase< Type >::mTop, S32, LLFloater::setFocus(), LLPreview::setSourceID(), LLPreview::show(), top, LLRectBase< Type >::translate(), and TRUE.

Referenced by open_offer(), and LLNotecardBridge::openItem().

void open_texture ( const LLUUID item_id,
const LLString title,
BOOL  show_keep_discard,
const LLUUID source_id,
BOOL  take_focus 
)

Definition at line 2333 of file llinventorybridge.cpp.

References LLFloaterView::adjustToFitScreen(), FALSE, LLFloaterView::getNewFloaterPosition(), LLControlGroup::getRect(), gFloaterView, gSavedSettings, left, LLRectBase< Type >::mLeft, LLRectBase< Type >::mTop, LLUUID::null, S32, LLFloater::setFocus(), LLPreview::setSourceID(), LLPreview::show(), top, LLRectBase< Type >::translate(), and TRUE.

Referenced by open_offer(), and LLTextureBridge::openItem().

void remove_inventory_category_from_avatar ( LLInventoryCategory category  ) 

Definition at line 4025 of file llinventorybridge.cpp.

References LLFloaterCustomize::askToSaveAllIfDirty(), LLInventoryObject::getName(), LLInventoryObject::getUUID(), gFloaterCustomize, lldebugs, llendl, remove_inventory_category_from_avatar_step2(), and TRUE.

Referenced by LLFolderBridge::performAction().

void remove_inventory_category_from_avatar_step2 ( BOOL  proceed,
void userdata 
)

Definition at line 4049 of file llinventorybridge.cpp.

References _PREHASH_AgentID, _PREHASH_DetachAttachmentIntoInv, _PREHASH_ItemID, _PREHASH_ObjectData, LLMessageSystem::addUUIDFast(), LLAssetType::AT_GESTURE, LLAssetType::AT_OBJECT, LLInventoryModel::collectDescendentsIf(), LLDynamicArray< Type, BlockSize >::count(), LLGestureManager::deactivateGesture(), LLInventoryModel::EXCLUDE_TRASH, LLViewerObjectList::findObject(), gAgent, LLDynamicArray< Type, BlockSize >::get(), LLWearableList::getAsset(), LLViewerRegion::getHost(), LLAgent::getID(), LLAgent::getRegion(), gGestureManager, gInventory, gMessageSystem, gObjectList, gSelectMgr, gWearableList, i, LLGestureManager::isGestureActive(), LLAgent::isWearingItem(), lldebugs, llendl, llwarns, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLInventoryModel::notifyObservers(), NULL, LLWearableBridge::onRemoveFromAvatarArrived(), LLSelectMgr::remove(), S32, LLMessageSystem::sendReliable(), and LLInventoryModel::updateItem().

Referenced by remove_inventory_category_from_avatar().

void rez_attachment ( LLViewerInventoryItem item,
LLViewerJointAttachment attachment 
)

const char* safe_inv_type_lookup ( LLInventoryType::EType  inv_type  ) 

Definition at line 560 of file llinventorybridge.cpp.

References LLInventoryType::lookup().

Referenced by LLInvFVBridge::createBridge().

void warn_move_inventory ( LLViewerObject object,
LLMoveInv move_inv 
)

Definition at line 1201 of file llinventorybridge.cpp.

References LLViewerWindow::alertXml(), LLViewerObject::flagScripted(), gViewerWindow, move_task_inventory_callback(), and NULL.

Referenced by LLFolderBridge::dragItemIntoFolder(), and move_inv_category_world_to_agent().

void wear_inventory_category ( LLInventoryCategory category,
bool  copy,
bool  append 
)

Definition at line 3721 of file llinventorybridge.cpp.

References LLInventoryModel::addObserver(), LLOutfitFetch::done(), LLInventoryFetchDescendentsObserver::fetchDescendents(), LLInventoryObject::getName(), LLInventoryObject::getUUID(), gInventory, inc_busy_count(), LLInventoryFetchDescendentsObserver::isEverythingComplete(), lldebugs, and llendl.

Referenced by LLInventoryCopyAndWearObserver::changed(), LLToolDragAndDrop::dad3dWearCategory(), and wear_outfit_by_name().

void wear_inventory_category_on_avatar ( LLInventoryCategory category,
BOOL  append 
)

Definition at line 3750 of file llinventorybridge.cpp.

References LLFloaterCustomize::askToSaveAllIfDirty(), LLInventoryObject::getName(), LLInventoryObject::getUUID(), gFloaterCustomize, lldebugs, llendl, LLWearInfo::mAppend, LLWearInfo::mCategoryID, TRUE, and wear_inventory_category_on_avatar_step2().

Referenced by LLOutfitObserver::done(), LLFolderBridge::modifyOutfit(), and LLWearInventoryCategoryCallback::~LLWearInventoryCategoryCallback().

void wear_inventory_category_on_avatar_loop ( LLWearable wearable,
void  
)

Definition at line 3948 of file llinventorybridge.cpp.

References gAddToOutfit, LLDoubleLinkedList< DATA_TYPE >::getFirstData(), LLWearable::getID(), LLDoubleLinkedList< DATA_TYPE >::getLength(), LLDoubleLinkedList< DATA_TYPE >::getNextData(), LLWearableHoldingPattern::mFoundList, LLWearableHoldingPattern::mResolved, and wear_inventory_category_on_avatar_step3().

Referenced by wear_inventory_category_on_avatar_step2().

void wear_inventory_category_on_avatar_step2 ( BOOL  proceed,
void userdata 
)

Definition at line 3778 of file llinventorybridge.cpp.

References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_AttachmentPt, _PREHASH_CompoundMsgID, _PREHASH_Description, _PREHASH_FirstDetachAll, _PREHASH_HeaderData, _PREHASH_ItemID, _PREHASH_Name, _PREHASH_ObjectData, _PREHASH_OwnerID, _PREHASH_RezMultipleAttachmentsFromInv, _PREHASH_SessionID, _PREHASH_TotalObjects, LLGestureManager::activateGestures(), LLMessageSystem::addBOOLFast(), LLDoubleLinkedList< DATA_TYPE >::addData(), LLMessageSystem::addStringFast(), LLMessageSystem::addU8Fast(), LLMessageSystem::addUUIDFast(), LLViewerWindow::alertXml(), LLAssetType::AT_GESTURE, LLAssetType::AT_OBJECT, LLInventoryModel::collectDescendentsIf(), LLDynamicArray< Type, BlockSize >::count(), LLInventoryModel::EXCLUDE_TRASH, gAddToOutfit, gAgent, LLUUID::generate(), LLDynamicArray< Type, BlockSize >::get(), LLWearableList::getAsset(), LLAgent::getAvatarObject(), LLInventoryModel::getCategory(), LLInventoryItem::getDescription(), LLInventoryItem::getFlags(), LLViewerRegion::getHost(), LLAgent::getID(), LLInventoryObject::getName(), LLPermissions::getOwner(), LLInventoryItem::getPermissions(), LLAgent::getRegion(), LLAgent::getSessionID(), LLInventoryObject::getUUID(), gGestureManager, gInventory, gMessageSystem, gViewerWindow, gWearableList, i, inc_busy_count(), lldebugs, llendl, llinfos, LLWearInfo::mAppend, LLFoundData::mAssetID, LLFoundData::mAssetType, LLWearInfo::mCategoryID, LLWearableHoldingPattern::mFoundList, LLFoundData::mName, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), LLInventoryModel::notifyObservers(), NULL, pack_permissions_slam(), LLDynamicArray< Type, BlockSize >::put(), S32, LLMessageSystem::sendReliable(), LLInventoryModel::updateCategory(), LLAgent::userRemoveAllAttachments(), and wear_inventory_category_on_avatar_loop().

Referenced by wear_inventory_category_on_avatar().

void wear_inventory_category_on_avatar_step3 ( LLWearableHoldingPattern holder,
BOOL  append 
)

Definition at line 3973 of file llinventorybridge.cpp.

References LLDynamicArray< Type, BlockSize >::count(), dec_busy_count(), gAgent, LLInventoryItem::getAssetUUID(), LLDoubleLinkedList< DATA_TYPE >::getFirstData(), LLInventoryModel::getItem(), LLDoubleLinkedList< DATA_TYPE >::getNextData(), gInventory, i, lldebugs, llendl, LLWearableHoldingPattern::mFoundList, LLInventoryModel::notifyObservers(), LLDynamicArray< Type, BlockSize >::put(), S32, LLAgent::setWearableOutfit(), and WT_COUNT.

Referenced by wear_inventory_category_on_avatar_loop().

void wear_inventory_item_on_avatar ( LLInventoryItem item  ) 

Definition at line 3436 of file llinventorybridge.cpp.

References LLWearableList::getAsset(), LLInventoryItem::getAssetUUID(), LLInventoryObject::getName(), LLInventoryObject::getType(), LLInventoryObject::getUUID(), gWearableList, lldebugs, llendl, and LLWearableBridge::onWearOnAvatarArrived().

Referenced by LLToolDragAndDrop::dad3dWearItem(), WearOnAvatarCallback::fire(), LLFloaterClothing::onClickWear(), LLInventoryModel::processBulkUpdateInventory(), and LLWearableBridge::wearOnAvatar().

void wear_outfit_by_name ( const char *  name  ) 

Definition at line 3674 of file llinventorybridge.cpp.

References LLInventoryModel::collectDescendentsIf(), LLDynamicArray< Type, BlockSize >::count(), dec_busy_count(), LLInventoryModel::EXCLUDE_TRASH, gAgent, LLDynamicArray< Type, BlockSize >::get(), LLAgent::getInventoryRootID(), gInventory, inc_busy_count(), llendl, llinfos, llwarns, NULL, LLUUID::null, and wear_inventory_category().

Referenced by callback_choose_gender(), handle_test_female(), and handle_test_male().


Variable Documentation

BOOL gAddToOutfit = FALSE

Definition at line 155 of file llinventorybridge.cpp.

Referenced by wear_inventory_category_on_avatar_loop(), and wear_inventory_category_on_avatar_step2().

const char* ICON_NAME[ICON_NAME_COUNT]

Definition at line 115 of file llinventorybridge.cpp.

Referenced by get_item_icon_uuid(), and LLItemBridge::getIcon().


Generated on Thu Jul 1 06:10:29 2010 for Second Life Viewer by  doxygen 1.4.7