summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.h
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-05-11 13:01:27 -0400
committerLoren Shih <seraph@lindenlab.com>2010-05-11 13:01:27 -0400
commit64da5083d0b99d58140d84f9a44191b5c3d321b1 (patch)
tree82e1b50c6ea3786631d57e79b0aa9aa07d74481d /indra/newview/llinventorybridge.h
parent79457a85fe660eeafc30618ae4541aa787c749ec (diff)
EXT-7306 : FIXED : Add shortcut-style icons for inventory links
EXT-7295 : FIXED : INFRASTRUCTURE : Cleaned up Inventory Icon code Inventory link icons were designed from scratch. Added LLInventoryIcon class and did some major refactoring for how it determines inventory icons from item bridges.
Diffstat (limited to 'indra/newview/llinventorybridge.h')
-rw-r--r--indra/newview/llinventorybridge.h68
1 files changed, 3 insertions, 65 deletions
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index aa3b36e7e2..d1094b66d4 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -99,6 +99,7 @@ public:
virtual BOOL isItemRemovable() const;
virtual BOOL isItemMovable() const;
virtual BOOL isItemInTrash() const;
+ virtual BOOL isLink() const;
//virtual BOOL removeItem() = 0;
virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch);
@@ -162,6 +163,7 @@ protected:
LLFolderView* mRoot;
const LLUUID mUUID; // item id
LLInventoryType::EType mInvType;
+ BOOL mIsLink;
void purgeItem(LLInventoryModel *model, const LLUUID &uuid);
};
@@ -184,49 +186,6 @@ public:
U32 flags = 0x00) const;
};
-// Used by LLItemBridge::getIcon
-enum EInventoryIcon
-{
- TEXTURE_ICON_NAME,
- SOUND_ICON_NAME,
- CALLINGCARD_ONLINE_ICON_NAME,
- CALLINGCARD_OFFLINE_ICON_NAME,
- LANDMARK_ICON_NAME,
- LANDMARK_VISITED_ICON_NAME,
- SCRIPT_ICON_NAME,
- CLOTHING_ICON_NAME,
- OBJECT_ICON_NAME,
- OBJECT_MULTI_ICON_NAME,
- NOTECARD_ICON_NAME,
- BODYPART_ICON_NAME,
- SNAPSHOT_ICON_NAME,
-
- BODYPART_SHAPE_ICON_NAME,
- BODYPART_SKIN_ICON_NAME,
- BODYPART_HAIR_ICON_NAME,
- BODYPART_EYES_ICON_NAME,
- CLOTHING_SHIRT_ICON_NAME,
- CLOTHING_PANTS_ICON_NAME,
- CLOTHING_SHOES_ICON_NAME,
- CLOTHING_SOCKS_ICON_NAME,
- CLOTHING_JACKET_ICON_NAME,
- CLOTHING_GLOVES_ICON_NAME,
- CLOTHING_UNDERSHIRT_ICON_NAME,
- CLOTHING_UNDERPANTS_ICON_NAME,
- CLOTHING_SKIRT_ICON_NAME,
- CLOTHING_ALPHA_ICON_NAME,
- CLOTHING_TATTOO_ICON_NAME,
-
- ANIMATION_ICON_NAME,
- GESTURE_ICON_NAME,
-
- LINKITEM_ICON_NAME,
- LINKFOLDER_ICON_NAME,
-
- ICON_NAME_COUNT
-};
-extern std::string ICON_NAME[ICON_NAME_COUNT];
-
class LLItemBridge : public LLInvFVBridge
{
public:
@@ -289,7 +248,7 @@ public:
virtual LLFolderType::EType getPreferredType() const;
virtual LLUIImagePtr getIcon() const;
virtual LLUIImagePtr getOpenIcon() const;
- static LLUIImagePtr getIcon(LLFolderType::EType preferred_type);
+ static LLUIImagePtr getIcon(LLFolderType::EType preferred_type, BOOL is_link = FALSE);
virtual BOOL renameItem(const std::string& new_name);
@@ -368,20 +327,6 @@ private:
menuentry_vec_t mDisabledItems;
};
-// DEPRECATED
-class LLScriptBridge : public LLItemBridge
-{
- friend class LLInvFVBridge;
-public:
- LLUIImagePtr getIcon() const;
-
-protected:
- LLScriptBridge(LLInventoryPanel* inventory,
- LLFolderView* root,
- const LLUUID& uuid ) :
- LLItemBridge(inventory, root, uuid) {}
-};
-
class LLTextureBridge : public LLItemBridge
{
friend class LLInvFVBridge;
@@ -407,7 +352,6 @@ class LLSoundBridge : public LLItemBridge
{
friend class LLInvFVBridge;
public:
- virtual LLUIImagePtr getIcon() const;
virtual void openItem();
virtual void previewItem();
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
@@ -466,7 +410,6 @@ class LLNotecardBridge : public LLItemBridge
{
friend class LLInvFVBridge;
public:
- virtual LLUIImagePtr getIcon() const;
virtual void openItem();
protected:
LLNotecardBridge(LLInventoryPanel* inventory,
@@ -479,8 +422,6 @@ class LLGestureBridge : public LLItemBridge
{
friend class LLInvFVBridge;
public:
- virtual LLUIImagePtr getIcon() const;
-
// Only suffix for gesture items, not task items, because only
// gestures in your inventory can be active.
virtual LLFontGL::StyleFlags getLabelStyle() const;
@@ -508,7 +449,6 @@ public:
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
- virtual LLUIImagePtr getIcon() const;
virtual void openItem();
protected:
@@ -548,7 +488,6 @@ class LLLSLTextBridge : public LLItemBridge
{
friend class LLInvFVBridge;
public:
- virtual LLUIImagePtr getIcon() const;
virtual void openItem();
protected:
LLLSLTextBridge(LLInventoryPanel* inventory,
@@ -605,7 +544,6 @@ class LLLinkItemBridge : public LLItemBridge
friend class LLInvFVBridge;
public:
virtual const std::string& getPrefix() { return sPrefix; }
- virtual LLUIImagePtr getIcon() const;
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
protected:
LLLinkItemBridge(LLInventoryPanel* inventory,