summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitslist.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lloutfitslist.h')
-rw-r--r--indra/newview/lloutfitslist.h63
1 files changed, 61 insertions, 2 deletions
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 11512b6731..852c3353a4 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -41,6 +41,7 @@
class LLAccordionCtrlTab;
class LLInventoryCategoriesObserver;
class LLOutfitListGearMenuBase;
+class LLOutfitListSortMenuBase;
class LLWearableItemsList;
class LLListContextMenu;
@@ -61,6 +62,17 @@ public:
/*virtual*/ bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const;
};
+class LLOutfitTabFavComparator : public LLAccordionCtrl::LLTabComparator
+{
+ LOG_CLASS(LLOutfitTabFavComparator);
+
+public:
+ LLOutfitTabFavComparator() {};
+ virtual ~LLOutfitTabFavComparator() {};
+
+ /*virtual*/ bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const;
+};
+
class LLOutfitListBase : public LLPanelAppearanceTab
{
public:
@@ -92,6 +104,7 @@ public:
boost::signals2::connection setSelectionChangeCallback(selection_change_callback_t cb);
void outfitRightClickCallBack(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id);
+ void onAction(const LLSD& userdata);
virtual bool isActionEnabled(const LLSD& userdata);
virtual void performAction(std::string action);
virtual bool hasItemSelected() = 0;
@@ -109,6 +122,12 @@ public:
virtual bool getHasExpandableFolders() = 0;
+ virtual void onChangeSortOrder(const LLSD& userdata) = 0;
+
+ virtual void updateMenuItemsVisibility();
+ virtual LLToggleableMenu* getGearMenu();
+ virtual bool getTrashMenuVisible() { return true; };
+
protected:
void observerCallback(const LLUUID& category_id);
virtual LLOutfitListGearMenuBase* createGearMenu() = 0;
@@ -139,6 +158,7 @@ protected:
selection_change_signal_t mSelectionChangeSignal;
LLListContextMenu* mOutfitMenu;
LLOutfitListGearMenuBase* mGearMenu;
+ boost::signals2::connection mGearMenuConnection;
};
//////////////////////////////////////////////////////////////////////////
@@ -155,7 +175,6 @@ protected:
/* virtual */ LLContextMenu* createMenu();
bool onEnable(LLSD::String param);
-
bool onVisible(LLSD::String param);
static void editOutfit();
@@ -163,6 +182,7 @@ protected:
static void renameOutfit(const LLUUID& outfit_cat_id);
void onThumbnail(const LLUUID &outfit_cat_id);
+ void onFavorite(const LLUUID& outfit_cat_id);
void onSave(const LLUUID &outfit_cat_id);
private:
@@ -182,6 +202,7 @@ public:
protected:
virtual void onUpdateItemsVisibility();
virtual void onThumbnail();
+ virtual void onFavorite();
virtual void onChangeSortOrder();
const LLUUID& getSelectedOutfitID();
@@ -202,6 +223,23 @@ private:
bool onVisible(LLSD::String param);
};
+class LLOutfitListSortMenu
+{
+public:
+ LLOutfitListSortMenu(LLOutfitListBase* parent_panel);
+
+ LLToggleableMenu* getMenu();
+ void updateItemsVisibility();
+
+private:
+ void onUpdateItemsVisibility();
+ bool onEnable(LLSD::String param);
+
+ LLToggleableMenu* mMenu;
+ LLHandle<LLPanel> mPanelHandle;
+};
+
+
class LLOutfitListGearMenu : public LLOutfitListGearMenuBase
{
public:
@@ -221,8 +259,16 @@ public:
Params() : cat_id("cat_id") {}
};
+ virtual void draw();
virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ void setFavorite(bool is_favorite);
+ bool getFavorite() const { return mIsFavorite; }
+ void setOutfitSelected(bool val);
+
+ static LLUIImage* sFavoriteIcon;
+ static LLUIColor sFgColor;
+
protected:
LLOutfitAccordionCtrlTab(const LLOutfitAccordionCtrlTab::Params &p)
: LLAccordionCtrlTab(p),
@@ -230,7 +276,11 @@ public:
{}
friend class LLUICtrlFactory;
+ void drawFavoriteIcon();
+
LLUUID mFolderID;
+ bool mIsFavorite = false;
+ bool mIsSelected = false;
};
/**
* @class LLOutfitsList
@@ -249,6 +299,7 @@ public:
virtual ~LLOutfitsList();
/*virtual*/ BOOL postBuild();
+ void initComparator();
/*virtual*/ void onOpen(const LLSD& info);
@@ -287,6 +338,10 @@ public:
/*virtual*/ bool getHasExpandableFolders() { return TRUE; }
+ /*virtual*/ void onChangeSortOrder(const LLSD& userdata);
+ virtual LLToggleableMenu* getSortMenu();
+ void updateMenuItemsVisibility();
+
protected:
LLOutfitListGearMenuBase* createGearMenu();
@@ -357,6 +412,8 @@ private:
static void onOutfitRename(const LLSD& notification, const LLSD& response);
+ void handleInvFavColorChange();
+
//LLInventoryCategoriesObserver* mCategoriesObserver;
LLAccordionCtrl* mAccordion;
@@ -374,13 +431,15 @@ private:
// Used to monitor COF changes for updating items worn state. See EXT-8636.
uuid_vec_t mCOFLinkedItems;
- //LLOutfitListGearMenu* mGearMenu;
+ LLOutfitListSortMenu* mSortMenu;
//bool mIsInitialized;
/**
* True if there is a selection inside currently selected outfit
*/
bool mItemSelected;
+
+ boost::signals2::connection mSavedSettingInvFavColor;
};
#endif //LL_LLOUTFITSLIST_H