summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.h
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-05-26 16:24:49 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-05-26 16:24:49 -0700
commitc5c13a92eb62e1e9927a9685d5433c040e6ef2ce (patch)
tree0134513ccbd15cccd193bc38772eb5147e0f4591 /indra/newview/llwearableitemslist.h
parentabcdff128c85c5a1188da8e36510f249e5918899 (diff)
parentdb119d86a7a930c64b022c41386d37c001555d68 (diff)
Merge
Diffstat (limited to 'indra/newview/llwearableitemslist.h')
-rw-r--r--indra/newview/llwearableitemslist.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 2cab5a07a2..7ad1b5a3ad 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -32,11 +32,14 @@
#ifndef LL_LLWEARABLEITEMSLIST_H
#define LL_LLWEARABLEITEMSLIST_H
+// libs
#include "llpanel.h"
+#include "llsingleton.h"
// newview
#include "llinventoryitemslist.h"
#include "llinventorymodel.h"
+#include "lllistcontextmenu.h"
#include "llwearabletype.h"
/**
@@ -274,8 +277,32 @@ private:
class LLWearableItemsList : public LLInventoryItemsList
{
public:
+ /**
+ * Context menu.
+ *
+ * This menu is likely to be used from outside
+ * (e.g. for items selected across multiple wearable lists),
+ * so making it a singleton.
+ */
+ class ContextMenu : public LLListContextMenu, public LLSingleton<ContextMenu>
+ {
+ protected:
+ enum {
+ MASK_CLOTHING = 0x01,
+ MASK_BODYPART = 0x02,
+ MASK_ATTACHMENT = 0x04,
+ };
+
+ /* virtual */ LLContextMenu* createMenu();
+ void updateItemsVisibility(LLContextMenu* menu);
+ void setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val);
+ void updateMask(U32& mask, LLAssetType::EType at);
+ };
+
struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params>
{
+ Optional<bool> use_internal_context_menu;
+
Params();
};
@@ -286,6 +313,8 @@ public:
protected:
friend class LLUICtrlFactory;
LLWearableItemsList(const LLWearableItemsList::Params& p);
+
+ void onRightClick(S32 x, S32 y);
};
#endif //LL_LLWEARABLEITEMSLIST_H