diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-09-07 22:55:07 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-09-07 22:55:07 +0000 |
commit | 79653dfed48105019b8ecca9cf4bfaa2a390e100 (patch) | |
tree | 455943795bf3371bbff0689604cf5eedd903fae4 /indra/newview/llfavoritesbar.h | |
parent | a9b2296b2b5664cfc8d86c7f99c00c10268e250a (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1566 https://svn.aws.productengine.com/secondlife/pe/stable-2@1580 -> viewer-2.0.0-3
* Bugs: EXT-807 EXT-810 EXT-811 EXT-784 EXT-820 EXT-393 EXT-826 EXT-811 EXT-801 EXT-808 EXT-393 EXT-743 EXT-699 EXT-397 EXT-812 EXT-736 EXT-744 EXT-809 EXT-306 EXT-854 EXT-857 EXT-790
* New Dev: EXT-694 EXT-393 EXT-367 EXT-819 EXT-795 EXT-827 EXT-788
* EXT-272 - Draggable Landmarks
* EXT-715 - Block List Panel
* EXT-782 - Implement advanced place information accordions
Diffstat (limited to 'indra/newview/llfavoritesbar.h')
-rw-r--r-- | indra/newview/llfavoritesbar.h | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index 824b396add..4cd92d1a58 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -60,6 +60,8 @@ public: EAcceptance* accept, std::string& tooltip_msg); + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); + // LLInventoryObserver observer trigger virtual void changed(U32 mask); virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); @@ -73,10 +75,12 @@ protected: void onButtonClick(LLUUID id); void onButtonRightClick(LLUUID id,LLView* button,S32 x,S32 y,MASK mask); + void onButtonMouseDown(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask); + void onButtonMouseUp(LLUUID id, LLUICtrl* button, S32 x, S32 y, MASK mask); + void doToSelected(const LLSD& userdata); BOOL isClipboardPasteable() const; void pastFromClipboard() const; - void showDropDownMenu(); @@ -94,8 +98,49 @@ protected: LLRect mChevronRect; std::string mChevronButtonToolTip; + +private: + /* + * Helper function to make code more readable. It handles all drag and drop + * operations of the existing favorites items on the favorites bar. + */ + 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. + */ + 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); + + // checks if the current order of the favorites items must be saved + BOOL needToSaveItemsOrder(const LLInventoryModel::item_array_t& items); + + // saves current order of the favorites items + void saveItemsOrder(LLInventoryModel::item_array_t& items); + + /* + * changes favorites items order by insertion of the item identified by srcItemId + * BEFORE the item identified by destItemId. both items must exist in items array. + */ + void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& srcItemId, const LLUUID& destItemId); + + /* + * inserts an item identified by insertedItemId BEFORE an item identified by beforeItemId. + * this function assumes that an item identified by insertedItemId doesn't exist in items array. + */ + void insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, const LLUUID& insertedItemId); + + // finds an item by it's UUID in the items array + LLInventoryModel::item_array_t::iterator findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id); + + BOOL mSkipUpdate; + BOOL mStartDrag; + LLUUID mDragItemId; + LLInventoryModel::item_array_t mItems; }; #endif // LL_LLFAVORITESBARCTRL_H - |