summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.h
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-06-27 18:57:02 +0300
committerGitHub <noreply@github.com>2024-06-27 18:57:02 +0300
commitac0f56668b42bbd01396633bbfd6dbda7ea434a5 (patch)
treedbb724773d49b1397e192e38770543fff4cf85f2 /indra/newview/llinventorybridge.h
parentfcffbad09007185becf53f2a259701c7e07444f5 (diff)
parent6ee6d19f600bb7fee99f96e8476e2c57088dad17 (diff)
Merge pull request #1840 from secondlife/inventory_favorites
viewer#1300 viewer#1301 viewer#1424 viewer#1425 viewer#1619 viewer#1005
Diffstat (limited to 'indra/newview/llinventorybridge.h')
-rw-r--r--indra/newview/llinventorybridge.h45
1 files changed, 44 insertions, 1 deletions
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 460d501256..9a81d99b0d 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -86,6 +86,7 @@ public:
//--------------------------------------------------------------------
virtual const LLUUID& getUUID() const { return mUUID; }
virtual const LLUUID& getThumbnailUUID() const { return LLUUID::null; }
+ virtual bool isFavorite() const { return false; }
virtual void clearDisplayName() { mDisplayName.clear(); }
virtual void restoreItem() {}
virtual void restoreToWorld() {}
@@ -174,7 +175,8 @@ protected:
BOOL isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash?
BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory?
- BOOL isAgentInventory() const; // false if lost or in the inventory library
+ bool isAgentInventory() const; // false if lost or in the inventory library
+ bool isAgentInventoryRoot() const; // true if worn by agent
BOOL isCOFFolder() const; // true if COF or descendant of
BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox
@@ -259,6 +261,7 @@ public:
LLViewerInventoryItem* getItem() const;
virtual const LLUUID& getThumbnailUUID() const;
+ virtual bool isFavorite() const;
protected:
BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response);
@@ -301,6 +304,7 @@ public:
virtual std::string getLabelSuffix() const;
virtual LLFontGL::StyleFlags getLabelStyle() const;
virtual const LLUUID& getThumbnailUUID() const;
+ virtual bool isFavorite() const;
void setShowDescendantsCount(bool show_count) {mShowDescendantsCount = show_count;}
@@ -752,6 +756,45 @@ public:
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Favorites Inventory Panel related classes
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+// Overridden version of the Inventory-Folder-View-Bridge for Folders
+class LLFavoritesFolderBridge : public LLFolderBridge
+{
+ friend class LLInvFVBridgeAction;
+public:
+ // Creates context menu for Folders related to Recent Inventory Panel.
+ // Uses base logic and than removes from visible items "New..." menu items.
+ LLFavoritesFolderBridge(LLInventoryType::EType type,
+ LLInventoryPanel* inventory,
+ LLFolderView* root,
+ const LLUUID& uuid) :
+ LLFolderBridge(inventory, root, uuid)
+ {
+ mInvType = type;
+ }
+ /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags);
+};
+
+// Bridge builder to create Inventory-Folder-View-Bridge for Recent Inventory Panel
+class LLFavoritesInventoryBridgeBuilder : public LLInventoryFolderViewModelBuilder
+{
+public:
+ LLFavoritesInventoryBridgeBuilder() {}
+ // Overrides FolderBridge for Recent Inventory Panel.
+ // It use base functionality for bridges other than FolderBridge.
+ virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type,
+ LLAssetType::EType actual_asset_type,
+ LLInventoryType::EType inv_type,
+ LLInventoryPanel* inventory,
+ LLFolderViewModelInventory* view_model,
+ LLFolderView* root,
+ const LLUUID& uuid,
+ U32 flags = 0x00) const;
+};
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Marketplace Inventory Panel related classes
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~