diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-02-17 15:47:03 +0200 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-02-17 16:23:44 +0200 |
commit | 734b1b5d421254c45b3eb0fe0a5bbc8159e489fc (patch) | |
tree | cb02a1bff376f5448e861ba564a86aa1bfbdefe5 /indra/newview/llinventorypanel.h | |
parent | 4bc9331dddbacb9c0c36252b32f2514b9080dcf5 (diff) |
SL-19105 WIP Single-folder inventory view
Diffstat (limited to 'indra/newview/llinventorypanel.h')
-rw-r--r-- | indra/newview/llinventorypanel.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 0932482ad7..981bef62a8 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -222,6 +222,7 @@ public: void doCreate(const LLSD& userdata); bool beginIMSession(); void fileUploadLocation(const LLSD& userdata); + void openSingleViewInventory(const LLSD& userdata); void purgeSelectedItems(); bool attachObject(const LLSD& userdata); static void idle(void* user_data); @@ -263,6 +264,8 @@ public: void callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response); + void changeFolderRoot(const LLUUID& new_id) {}; + protected: void openStartFolderOrMyInventory(); // open the first level of inventory void onItemsCompletion(); // called when selected items are complete @@ -382,6 +385,44 @@ private: std::deque<LLUUID> mBuildViewsQueue; }; + +class LLInventorySingleFolderPanel : public LLInventoryPanel +{ +public: + struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params> + {}; + + void initFromParams(const Params& p); + bool isSelectionRemovable() { return false; } + //void setSelectCallback(const boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb); + + void openInCurrentWindow(const LLSD& userdata); + void changeFolderRoot(const LLUUID& new_id); + void onForwardFolder(); + void onBackwardFolder(); + void clearNavigationHistory(); + LLUUID getSingleFolderRoot() { return mFolderID; } + + void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb); + + typedef boost::function<void()> root_changed_callback_t; + boost::signals2::connection setRootChangedCallback(root_changed_callback_t cb); + +protected: + LLInventorySingleFolderPanel(const Params& params); + ~LLInventorySingleFolderPanel(); + void updateSingleFolderRoot(); + + boost::function<void(const std::deque<LLFolderViewItem*>& items, BOOL user_action)> mSelectionCallback; + friend class LLUICtrlFactory; + + LLUUID mFolderID; + std::list<LLUUID> mBackwardFolders; + std::list<LLUUID> mForwardFolders; + + boost::signals2::signal<void()> mRootChangedSignal; +}; + /************************************************************************/ /* Asset Pre-Filtered Inventory Panel related class */ /* Exchanges filter's flexibility for speed of generation and */ |