123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811 |
- /**
- * @file llinventorybridge.h
- * @brief Implementation of the Inventory-Folder-View-Bridge classes.
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- *
- * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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$
- */
- #ifndef LL_LLINVENTORYBRIDGE_H
- #define LL_LLINVENTORYBRIDGE_H
- #include <vector>
- #include "llavatartracker.h"
- #include "llfolderview.h"
- #include "llinventorymodel.h"
- #include "llviewerwearable.h"
- class LLInventoryModel;
- class LLLandmark;
- // The "Restore to Last Position" feature is no more supported in SL and was
- // never implemented in OpenSim... In SL, it also relies on having rez rights
- // at position 0,0 in the sim, which is rarely the case in mainland regions...
- #define LL_RESTORE_TO_WORLD 0
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // Class LLInvFVBridge (& its derived classes)
- //
- // Short for Inventory-Folder-View-Bridge. This is an
- // implementation class to be able to view inventory items.
- //
- // You'll want to call LLInvItemFVELister::createBridge() to actually create
- // an instance of this class. This helps encapsulate the
- // funcationality a bit. (except for folders, you can create those
- // manually...)
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- class LLInvFVBridge : public LLFolderViewEventListener
- {
- protected:
- LOG_CLASS(LLInvFVBridge);
- public:
- // This method is a convenience function which creates the correct
- // type of bridge based on some basic information
- static LLInvFVBridge* createBridge(LLAssetType::EType asset_type,
- LLAssetType::EType actual_asset_type,
- LLInventoryType::EType inv_type,
- LLInventoryPanel* inventory,
- const LLUUID& uuid,
- U32 flags = 0x00);
- ~LLInvFVBridge() override = default;
- LL_INLINE const LLUUID& getUUID() const override { return mUUID; }
- LL_INLINE virtual const LLUUID& getThumbnailUUID() const
- {
- return LLUUID::null;
- }
- LL_INLINE virtual const std::string& getPrefix() { return LLStringUtil::null; }
- LL_INLINE virtual void restoreItem() {}
- #if LL_RESTORE_TO_WORLD
- LL_INLINE virtual void restoreToWorld() {}
- #endif
- // LLFolderViewEventListener methods
- const std::string& getName() const override;
- LL_INLINE const std::string& getDisplayName() const override
- {
- return getName();
- }
- LL_INLINE PermissionMask getPermissionMask() const override
- {
- return PERM_ALL; // Folders have full perms
- }
- LL_INLINE LLFolderType::EType getPreferredType() const override
- {
- return LLFolderType::FT_NONE;
- }
- // NOTE: folders do not have a creation date
- LL_INLINE time_t getCreationDate() const override { return 0; }
- LL_INLINE LLFontGL::StyleFlags getLabelStyle() const override
- {
- return LLFontGL::NORMAL;
- }
- LL_INLINE std::string getLabelSuffix() const override { return LLStringUtil::null; }
- LL_INLINE void openItem() override {}
- LL_INLINE void previewItem() override { openItem(); }
- void showProperties() override;
- LL_INLINE virtual bool isMultiPreviewAllowed() const { return true; }
- LL_INLINE bool isItemRenameable() const override { return true; }
- bool isItemRemovable() override;
- bool isItemMovable() override;
- void removeBatch(std::vector<LLFolderViewEventListener*>& batch) override;
- LL_INLINE void move(LLFolderViewEventListener*) override
- {
- }
- LL_INLINE bool isItemCopyable() const override { return false; }
- LL_INLINE bool copyToClipboard() const override { return false; }
- bool cutToClipboard() const override;
- bool isClipboardPasteable() const override;
- virtual bool isClipboardPasteableAsLink() const;
- LL_INLINE void pasteFromClipboard() override {}
- LL_INLINE void pasteLinkFromClipboard() override {}
- void getClipboardEntries(bool show_asset_id,
- std::vector<std::string>& items,
- std::vector<std::string>& disabled_items,
- U32 flags);
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- bool startDrag(EDragAndDropType* type, LLUUID* id) const override;
- LL_INLINE bool dragOrDrop(MASK, bool, EDragAndDropType, void*,
- std::string&) override
- {
- return false;
- }
- LL_INLINE LLInventoryType::EType getInventoryType() const override
- {
- return mInvType;
- }
- LL_INLINE S32 getSubType() const override
- {
- return mSubType;
- }
- // LLInvFVBridge functionality
- LL_INLINE virtual void clearDisplayName() {}
- //MK
- ////protected:
- //mk
- LLInvFVBridge(LLInventoryPanel* inv_panelp, const LLUUID& uuid)
- : mInventoryPanel(inv_panelp),
- mUUID(uuid),
- mInvType(LLInventoryType::IT_NONE)
- {
- }
- LLInventoryObject* getInventoryObject() const;
- bool isInTrash() const;
- bool isInLostAndFound() const;
- bool isInCOF() const;
- bool isInMarketplace() const;
- // Is this obj or its baseobj in the trash ?
- bool isLinkedObjectInTrash() const;
- // Is this a linked obj whose baseobj is not in inventory ?
- bool isLinkedObjectMissing() const;
- // Returns true if the item is in agent inventory. If false, it must be
- // lost or in the inventory library.
- bool isAgentInventory() const;
- LL_INLINE virtual bool isItemPermissive() const { return false; }
- static void changeItemParent(LLInventoryModel* model,
- LLViewerInventoryItem* item,
- const LLUUID& new_parent,
- bool restamp);
- static void changeCategoryParent(LLInventoryModel* model,
- LLViewerInventoryCategory* item,
- const LLUUID& new_parent,
- bool restamp);
- void removeBatchNoCheck(std::vector<LLFolderViewEventListener*>& batch);
- void purgeItem(LLInventoryModel* model, const LLUUID& uuid);
- protected:
- LLInventoryPanel* mInventoryPanel;
- LLUUID mUUID; // item id
- LLInventoryType::EType mInvType;
- S32 mSubType;
- };
- class LLItemBridge : public LLInvFVBridge
- {
- protected:
- LOG_CLASS(LLItemBridge);
- public:
- LLItemBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLInvFVBridge(inventory, uuid)
- {
- }
- void performAction(LLFolderView* folderp, LLInventoryModel* modelp,
- const std::string& action) override;
- void selectItem() override;
- void restoreItem() override;
- #if LL_RESTORE_TO_WORLD
- void restoreToWorld() override;
- #endif
- virtual void gotoItem(LLFolderView* folderp);
- LLUIImagePtr getIcon() const override;
- const std::string& getDisplayName() const override;
- std::string getLabelSuffix() const override;
- PermissionMask getPermissionMask() const override;
- time_t getCreationDate() const override;
- bool isItemRenameable() const override;
- bool renameItem(const std::string& new_name) override;
- bool removeItem() override;
- bool isItemCopyable() const override;
- bool copyToClipboard() const override;
- LL_INLINE bool isUpToDate() const override { return true; }
- LL_INLINE bool hasChildren() const override { return false; }
- // Override for LLInvFVBridge
- LL_INLINE void clearDisplayName() override { mDisplayName.clear(); }
- LLViewerInventoryItem* getItem() const;
- const LLUUID& getThumbnailUUID() const override;
- protected:
- bool isItemPermissive() const override;
- static void buildDisplayName(LLInventoryItem* item, std::string& name);
- mutable std::string mDisplayName;
- };
- class LLFolderBridge : public LLInvFVBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLFolderBridge);
- public:
- ~LLFolderBridge() override;
- bool dragItemIntoFolder(LLInventoryItem* inv_item,
- bool drop, std::string& tooltip_msg);
- bool dragCategoryIntoFolder(LLInventoryCategory* inv_category,
- bool drop, std::string& tooltip_msg);
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void openItem() override;
- bool isItemRenameable() const override;
- LL_INLINE void selectItem() override {}
- void restoreItem() override;
- LLFolderType::EType getPreferredType() const override;
- LLUIImagePtr getIcon() const override;
- std::string getLabelSuffix() const override;
- LLFontGL::StyleFlags getLabelStyle() const override;
- const LLUUID& getThumbnailUUID() const override;
- bool renameItem(const std::string& new_name) override;
- bool removeItem() override;
- void pasteFromClipboard() override;
- void pasteLinkFromClipboard() override;
- bool isClipboardPasteableAsLink() const override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- bool hasChildren() const override;
- bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type,
- void* cargo_data, std::string& tooltip_msg) override;
- bool isItemRemovable() override;
- bool isItemMovable() override;
- bool isUpToDate() const override;
- bool isItemCopyable() const override;
- bool copyToClipboard() const override;
- LLViewerInventoryCategory* getCategory() const;
- protected:
- LLFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLInvFVBridge(inventory, uuid),
- mCallingCards(false),
- mWearables(false)
- {
- }
- bool checkFolderForContentsOfType(LLInventoryModel* model,
- LLInventoryCollectFunctor& typeToCheck);
- void modifyOutfit(bool append, bool replace);
- public:
- static LLFolderBridge* sSelf;
- static void staticFolderOptionsMenu();
- void folderOptionsMenu(U32 flags = FIRST_SELECTED_ITEM);
- private:
- bool mCallingCards;
- bool mWearables;
- LLMenuGL* mMenu;
- std::vector<std::string> mItems;
- std::vector<std::string> mDisabledItems;
- };
- // DEPRECATED
- class LLScriptBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLScriptBridge);
- public:
- LLUIImagePtr getIcon() const;
- protected:
- LLScriptBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- class LLTextureBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLTextureBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- void openItem() override;
- protected:
- LL_INLINE LLTextureBridge(LLInventoryPanel* inventory, const LLUUID& uuid,
- LLInventoryType::EType type)
- : LLItemBridge(inventory, uuid), mInvType(type)
- {
- }
- protected:
- LLInventoryType::EType mInvType;
- };
- class LLSoundBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLSoundBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- void openItem() override;
- void previewItem() override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- protected:
- LLSoundBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- class LLLandmarkBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLLandmarkBridge);
- public:
- const std::string& getPrefix() override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- LLUIImagePtr getIcon() const override;
- void openItem() override;
- void showOnMap(LLLandmark* landmark);
- protected:
- LLLandmarkBridge(LLInventoryPanel* inventory,
- const LLUUID& uuid, U32 flags = 0x00)
- : LLItemBridge(inventory, uuid)
- {
- mVisited = (flags & LLInventoryItem::II_FLAGS_LANDMARK_VISITED) != 0;
- }
- protected:
- bool mVisited;
- };
- class LLCallingCardBridge;
- class LLCallingCardObserver final : public LLFriendObserver
- {
- public:
- LLCallingCardObserver(LLCallingCardBridge* bridge)
- : mBridgep(bridge)
- {
- }
- ~LLCallingCardObserver() override
- {
- mBridgep = NULL;
- }
- void changed(U32 mask) override;
- protected:
- LLCallingCardBridge* mBridgep;
- };
- class LLCallingCardBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLCallingCardBridge);
- public:
- const std::string& getPrefix() override;
- std::string getLabelSuffix() const override;
- //const std::string& getDisplayName() const override;
- LLUIImagePtr getIcon() const override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void openItem() override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- //void renameItem(const std::string& new_name) override;
- //bool removeItem() override;
- bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type,
- void* cargo_data, std::string& tooltip_msg) override;
- void refreshFolderViewItem();
- protected:
- LLCallingCardBridge(LLInventoryPanel* inventory, const LLUUID& uuid);
- ~LLCallingCardBridge() override;
- protected:
- LLCallingCardObserver* mObserver;
- };
- class LLNotecardBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLNotecardBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- void openItem() override;
- protected:
- LLNotecardBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- class LLGestureBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLGestureBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- // Only suffix for gesture items, not task items, because only
- // gestures in your inventory can be active.
- LLFontGL::StyleFlags getLabelStyle() const override;
- std::string getLabelSuffix() const override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void openItem() override;
- bool removeItem() override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- protected:
- LLGestureBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- class LLAnimationBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLAnimationBridge);
- public:
- const std::string& getPrefix() override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- LLUIImagePtr getIcon() const override;
- void openItem() override;
- protected:
- LLAnimationBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- class LLObjectBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLObjectBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void openItem() override;
- LLFontGL::StyleFlags getLabelStyle() const override;
- std::string getLabelSuffix() const override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- bool isItemRemovable() override;
- bool renameItem(const std::string& new_name) override;
- protected:
- LLObjectBridge(LLInventoryPanel* inventory, const LLUUID& uuid,
- LLInventoryType::EType type, U32 flags)
- : LLItemBridge(inventory, uuid), mInvType(type)
- {
- mAttachPt = (flags & 0xff); // low bye of inventory flags
- mIsMultiObject = (flags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) != 0;
- }
- protected:
- U32 mAttachPt;
- LLInventoryType::EType mInvType;
- bool mIsMultiObject;
- };
- class LLLSLTextBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLLSLTextBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- void openItem() override;
- protected:
- LLLSLTextBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- class LLWearableBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLWearableBridge);
- public:
- LLUIImagePtr getIcon() const override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void openItem() override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- LLFontGL::StyleFlags getLabelStyle() const override;
- std::string getLabelSuffix() const override;
- bool isItemRemovable() override;
- bool renameItem(const std::string& new_name) override;
- // Access to wearOnAvatar() from menu:
- static void onWearOnAvatar(void* userdata);
- static bool canWearOnAvatar(void* userdata);
- static void onWearOnAvatarArrived(LLViewerWearable* wearable,
- void* userdata);
- void wearOnAvatar(bool replace = true);
- // Access to editOnAvatar() from menu:
- static bool canEditOnAvatar(void* userdata);
- static void onEditOnAvatar(void* userdata);
- void editOnAvatar();
- static bool canRemoveFromAvatar(void* userdata);
- static void onRemoveFromAvatar(void* userdata);
- static void onRemoveFromAvatarArrived(LLViewerWearable* wearable,
- void* userdata);
- protected:
- LLWearableBridge(LLInventoryPanel* inventory,
- const LLUUID& uuid,
- LLAssetType::EType asset_type,
- LLInventoryType::EType inv_type,
- LLWearableType::EType wearable_type)
- : LLItemBridge(inventory, uuid),
- mAssetType(asset_type),
- mInvType(inv_type),
- mWearableType(wearable_type)
- {
- }
- protected:
- LLAssetType::EType mAssetType;
- LLInventoryType::EType mInvType;
- LLWearableType::EType mWearableType;
- };
- class LLLinkItemBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLLinkItemBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- protected:
- LLLinkItemBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- class LLLinkFolderBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLLinkFolderBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- void gotoItem(LLFolderView* folder) override;
- protected:
- LLLinkFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- const LLUUID& getFolderID() const;
- };
- #if LL_MESH_ASSET_SUPPORT
- class LLMeshBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLMeshBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- void openItem() override;
- void previewItem() override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- protected:
- LLMeshBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- #endif
- class LLSettingsBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLSettingsBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- LLFontGL::StyleFlags getLabelStyle() const override;
- bool isMultiPreviewAllowed() const override { return false; }
- void openItem() override;
- void previewItem() override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- protected:
- LLSettingsBridge(LLInventoryPanel* inventory, const LLUUID& uuid, U32 type)
- : LLItemBridge(inventory, uuid),
- mSettingsType(type)
- {
- }
- protected:
- U32 mSettingsType;
- };
- class LLMaterialBridge final : public LLItemBridge
- {
- friend class LLInvFVBridge;
- protected:
- LOG_CLASS(LLMaterialBridge);
- public:
- const std::string& getPrefix() override;
- LLUIImagePtr getIcon() const override;
- bool isMultiPreviewAllowed() const override { return false; }
- void openItem() override;
- void previewItem() override;
- void buildContextMenu(LLMenuGL& menu, U32 flags) override;
- void performAction(LLFolderView* folder, LLInventoryModel* model,
- const std::string& action) override;
- protected:
- LLMaterialBridge(LLInventoryPanel* inventory, const LLUUID& uuid)
- : LLItemBridge(inventory, uuid)
- {
- }
- };
- class LLFindWearables final : public LLInventoryCollectFunctor
- {
- public:
- LLFindWearables() = default;
- bool operator()(LLInventoryCategory* cat,
- LLInventoryItem* item) override;
- };
- // Moves items from an in-world object's "Contents" folder to a specified
- // folder in agent inventory.
- // Also used in llfloateropenobject.cpp.
- bool move_inv_category_world_to_agent(const LLUUID& object_id,
- const LLUUID& category_id,
- bool drop,
- void (*callback)(S32, void*) = NULL,
- void* user_data = NULL);
- // Sets menu entries state according to on entries_to_show and disabled_entries
- // Also used in llpanelinventory.cpp.
- void set_menu_entries_state(LLMenuGL& menu,
- const std::vector<std::string>& entries_to_show,
- const std::vector<std::string>& disabled_entries);
- #endif // LL_LLINVENTORYBRIDGE_H
|