summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.h
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2024-02-02 19:53:08 +0100
committerGuru <alexandrgproductengine@lindenlab.com>2024-02-06 02:59:32 +0300
commit17e3b2936a63f1242071ffcfe09069fcecc3b73b (patch)
treed02aaa13bcbc260fdea609ce2b1a640390ddb729 /indra/newview/llfavoritesbar.h
parent7fa86e04d6ce9081e364d67ffd4efd010eb46d81 (diff)
GH-68175 [SL-17986] Ability to drag Favorites to the Overflow menu
Diffstat (limited to 'indra/newview/llfavoritesbar.h')
-rw-r--r--indra/newview/llfavoritesbar.h39
1 files changed, 19 insertions, 20 deletions
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 3b439b31fd..6b9f2cee69 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -56,22 +56,21 @@ protected:
public:
virtual ~LLFavoritesBarCtrl();
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ BOOL postBuild() override;
/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg);
+ EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override;
+ bool handleDragAndDropToMenu(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg);
- /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask) override;
+ /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) override;
// LLInventoryObserver observer trigger
- virtual void changed(U32 mask);
- virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
- virtual void draw();
+ /*virtual*/ void changed(U32 mask) override;
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) override;
+ /*virtual*/ void draw() override;
- void showDragMarker(BOOL show) { mShowDragMarker = show; }
+ void showDragMarker(bool show) { mShowDragMarker = show; }
void setLandingTab(LLUICtrl* tab) { mLandingTab = tab; }
protected:
@@ -108,7 +107,7 @@ protected:
S32 mDropDownItemsCount;
bool mUpdateDropDownItems;
bool mRestoreOverflowMenu;
-
+ bool mDragToOverflowMenu;
bool mGetPrevItems;
LLUUID mSelectedItemID;
@@ -118,19 +117,21 @@ protected:
private:
/*
* Helper function to make code more readable. It handles all drag and drop
- * operations of the existing favorites items on the favorites bar.
+ * operations of the existing favorites items to the favorites bar to on the overflow menu.
*/
void handleExistingFavoriteDragAndDrop(S32 x, S32 y);
/*
* Helper function to make code more readable. It handles all drag and drop
- * operations of the new landmark to the favorites bar.
+ * operations of the new landmark to the favorites bar or to the overflow menu.
*/
void handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y);
// finds a control under the specified LOCAL point
LLUICtrl* findChildByLocalCoords(S32 x, S32 y);
+ bool findDragAndDropTarget(LLUUID &target_id, bool &insert_before, S32 x, S32 y);
+
// checks if the current order of the favorites items must be saved
BOOL needToSaveItemsOrder(const LLInventoryModel::item_array_t& items);
@@ -145,27 +146,25 @@ private:
void createOverflowMenu();
- void updateMenuItems(LLToggleableMenu* menu);
+ void updateOverflowMenuItems();
// Fits menu item label width with favorites menu width
void fitLabelWidth(LLMenuItemCallGL* menu_item);
void addOpenLandmarksMenuItem(LLToggleableMenu* menu);
- void positionAndShowMenu(LLToggleableMenu* menu);
+ void positionAndShowOverflowMenu();
- BOOL mShowDragMarker;
+ bool mShowDragMarker;
LLUICtrl* mLandingTab;
LLUICtrl* mLastTab;
LLTextBox* mMoreTextBox;
LLTextBox* mBarLabel;
LLUUID mDragItemId;
- BOOL mStartDrag;
+ bool mStartDrag;
LLInventoryModel::item_array_t mItems;
- BOOL mTabsHighlightEnabled;
-
S32 mMouseX;
S32 mMouseY;