diff options
Diffstat (limited to 'indra/newview/llfavoritesbar.h')
-rw-r--r-- | indra/newview/llfavoritesbar.h | 39 |
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; |