diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-10-03 19:46:29 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-10-03 19:55:49 +0300 |
commit | 878fb36a0bb632f5e541b132a7ded5eb047ff947 (patch) | |
tree | 9280a9ce33ddec5e186526077c7edcba2f6fe736 /indra/newview/llpanelmaininventory.h | |
parent | bcfd5d5279f1796abaf347d2276d2a0b9983f35e (diff) | |
parent | 2465470817957c8378e81ec1a7e32551fbac7b26 (diff) |
Merge branch 'main' into DRTVWR-591-maint-X
# Conflicts:
# indra/newview/app_settings/settings.xml
# indra/newview/llinventorybridge.cpp
# indra/newview/lltexturectrl.h
# indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/newview/llpanelmaininventory.h')
-rw-r--r-- | indra/newview/llpanelmaininventory.h | 83 |
1 files changed, 79 insertions, 4 deletions
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 7aae5a0b3c..79501e63bc 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -30,6 +30,7 @@ #include "llpanel.h" #include "llinventoryobserver.h" +#include "llinventorypanel.h" #include "lldndbutton.h" #include "llfolderview.h" @@ -37,14 +38,17 @@ class LLComboBox; class LLFolderViewItem; class LLInventoryPanel; +class LLInventoryGallery; class LLSaveFolderState; class LLFilterEditor; class LLTabContainer; class LLFloaterInventoryFinder; class LLMenuButton; class LLMenuGL; +class LLSidepanelInventory; class LLToggleableMenu; class LLFloater; +class LLFloaterSidePanelContainer; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLPanelMainInventory @@ -63,6 +67,13 @@ public: BOOL postBuild(); + enum EViewModeType + { + MODE_LIST, + MODE_GALLERY, + MODE_COMBINATION + }; + virtual BOOL handleKeyHere(KEY key, MASK mask); // Inherited functionality @@ -80,6 +91,7 @@ public: LLInventoryPanel* getAllItemsPanel(); void selectAllItemsPanel(); const LLInventoryPanel* getActivePanel() const { return mActivePanel; } + void setActivePanel(); bool isRecentItemsPanelSelected(); @@ -91,13 +103,40 @@ public: void setFocusFilterEditor(); - static void newWindow(); + static LLFloaterSidePanelContainer* newWindow(); + static void newFolderWindow(LLUUID folder_id = LLUUID(), LLUUID item_to_select = LLUUID()); void toggleFindOptions(); void resetFilters(); void resetAllItemsFilters(); + void findLinks(const LLUUID& item_id, const std::string& item_name); + + void onViewModeClick(); + void toggleViewMode(); + void initSingleFolderRoot(const LLUUID& start_folder_id = LLUUID::null); + void initInventoryViews(); + void onUpFolderClicked(); + void onBackFolderClicked(); + void onForwardFolderClicked(); + void setSingleFolderViewRoot(const LLUUID& folder_id, bool clear_nav_history = true); + void setGallerySelection(const LLUUID& item_id, bool new_window = false); + LLUUID getSingleFolderViewRoot(); + bool isSingleFolderMode() { return mSingleFolderMode; } + + void scrollToGallerySelection(); + void scrollToInvPanelSelection(); + + void setViewMode(EViewModeType mode); + bool isListViewMode() { return (mViewMode == MODE_LIST); } + bool isGalleryViewMode() { return (mViewMode == MODE_GALLERY); } + bool isCombinationViewMode() { return (mViewMode == MODE_COMBINATION); } + LLUUID getCurrentSFVRoot(); + std::string getLocalizedRootName(); + + LLInventoryFilter& getCurrentFilter(); + protected: // // Misc functions @@ -127,9 +166,15 @@ protected: bool isSaveTextureEnabled(const LLSD& userdata); void updateItemcountText(); + void updatePanelVisibility(); + void updateCombinationVisibility(); + void onFocusReceived(); void onSelectSearchType(); void updateSearchTypeCombo(); + void setSearchType(LLInventoryFilter::ESearchType type); + + LLSidepanelInventory* getParentSidepanelInventory(); private: LLFloaterInventoryFinder* getFinder(); @@ -150,7 +195,26 @@ private: std::string mCategoryCountString; LLComboBox* mSearchTypeCombo; + LLButton* mBackBtn; + LLButton* mForwardBtn; + LLButton* mUpBtn; + LLButton* mViewModeBtn; + LLLayoutPanel* mNavigationBtnsPanel; + + LLPanel* mDefaultViewPanel; + LLPanel* mCombinationViewPanel; + bool mSingleFolderMode; + EViewModeType mViewMode; + + LLInventorySingleFolderPanel* mCombinationInventoryPanel; + LLInventoryGallery* mCombinationGalleryPanel; + LLPanel* mCombinationGalleryLayoutPanel; + LLLayoutPanel* mCombinationListLayoutPanel; + LLLayoutStack* mCombinationLayoutStack; + + boost::signals2::connection mListViewRootUpdatedConnection; + boost::signals2::connection mGalleryRootUpdatedConnection; ////////////////////////////////////////////////////////////////////////////////// // List Commands // @@ -159,26 +223,37 @@ protected: void updateListCommands(); void onAddButtonClick(); void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); - void onTrashButtonClick(); void onClipboardAction(const LLSD& userdata); BOOL isActionEnabled(const LLSD& command_name); BOOL isActionChecked(const LLSD& userdata); void onCustomAction(const LLSD& command_name); - bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); + bool isActionVisible(const LLSD& userdata); static bool hasSettingsInventory(); + void updateTitle(); + void updateNavButtons(); + + void onCombinationRootChanged(bool gallery_clicked); + void onCombinationGallerySelectionChanged(const LLUUID& category_id); + void onCombinationInventorySelectionChanged(const std::deque<LLFolderViewItem*>& items, BOOL user_action); /** * Set upload cost in "Upload" sub menu. */ void setUploadCostIfNeeded(); + void disableAddIfNeeded(); private: - LLDragAndDropButton* mTrashButton; LLToggleableMenu* mMenuGearDefault; + LLToggleableMenu* mMenuViewDefault; LLToggleableMenu* mMenuVisibility; LLMenuButton* mGearMenuButton; + LLMenuButton* mViewMenuButton; LLMenuButton* mVisibilityMenuButton; LLHandle<LLView> mMenuAddHandle; bool mNeedUploadCost; + + bool mForceShowInvLayout; + bool mReshapeInvLayout; + LLUUID mCombInvUUIDNeedsRename; // List Commands // //////////////////////////////////////////////////////////////////////////////// }; |