From a5261a5fa8fad810ecb5c260d92c3e771822bf58 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Feb 2024 23:46:23 +0100 Subject: Convert BOOL to bool in llui --- indra/newview/llpanelmaininventory.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpanelmaininventory.h') diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index fbfca43f64..b6eb055270 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -65,7 +65,7 @@ public: LLPanelMainInventory(const LLPanel::Params& p = getDefaultParams()); ~LLPanelMainInventory(); - BOOL postBuild(); + bool postBuild(); enum EViewModeType { @@ -74,17 +74,17 @@ public: MODE_COMBINATION }; - virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask); // Inherited functionality - /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); /*virtual*/ void changed(U32); /*virtual*/ void draw(); - /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); + /*virtual*/ void onVisibilityChange ( bool new_visibility ); LLInventoryPanel* getPanel() { return mActivePanel; } LLInventoryPanel* getActivePanel() { return mActivePanel; } -- cgit v1.2.3 From 60d3dd98a44230c21803c1606552ee098ed9fa7c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 21 Feb 2024 21:05:14 +0100 Subject: Convert remaining BOOL to bool --- indra/newview/llpanelmaininventory.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llpanelmaininventory.h') diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index b6eb055270..2d74670cab 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -144,14 +144,14 @@ protected: void setFilterTextFromFilter(); void startSearch(); - void onSelectionChange(LLInventoryPanel *panel, const std::deque& items, BOOL user_action); + void onSelectionChange(LLInventoryPanel *panel, const std::deque& items, bool user_action); - static BOOL filtersVisible(void* user_data); + static bool filtersVisible(void* user_data); void onClearSearch(); static void onFoldersByName(void *user_data); - static BOOL checkFoldersByName(void *user_data); + static bool checkFoldersByName(void *user_data); - static BOOL incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward); + static bool incrementalFind(LLFolderViewItem* first_item, const char *find_text, bool backward); void onFilterSelected(); const std::string getFilterSubString(); @@ -224,8 +224,8 @@ protected: void onAddButtonClick(); void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); void onClipboardAction(const LLSD& userdata); - BOOL isActionEnabled(const LLSD& command_name); - BOOL isActionChecked(const LLSD& userdata); + bool isActionEnabled(const LLSD& command_name); + bool isActionChecked(const LLSD& userdata); void onCustomAction(const LLSD& command_name); bool isActionVisible(const LLSD& userdata); static bool hasSettingsInventory(); @@ -235,7 +235,7 @@ protected: void onCombinationRootChanged(bool gallery_clicked); void onCombinationGallerySelectionChanged(const LLUUID& category_id); - void onCombinationInventorySelectionChanged(const std::deque& items, BOOL user_action); + void onCombinationInventorySelectionChanged(const std::deque& items, bool user_action); /** * Set upload cost in "Upload" sub menu. */ -- cgit v1.2.3 From e2e37cced861b98de8c1a7c9c0d3a50d2d90e433 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 22 May 2024 21:25:21 +0200 Subject: Fix line endlings --- indra/newview/llpanelmaininventory.h | 530 +++++++++++++++++------------------ 1 file changed, 265 insertions(+), 265 deletions(-) (limited to 'indra/newview/llpanelmaininventory.h') diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index f1e4476bb0..cad2501645 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -1,265 +1,265 @@ -/** - * @file llpanelmaininventory.h - * @brief llpanelmaininventory.h - * class definition - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLPANELMAININVENTORY_H -#define LL_LLPANELMAININVENTORY_H - -#include "llpanel.h" -#include "llinventoryobserver.h" -#include "llinventorypanel.h" -#include "lldndbutton.h" - -#include "llfolderview.h" - -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 -// -// This is a panel used to view and control an agent's inventory, -// including all the fixin's (e.g. AllItems/RecentItems tabs, filter floaters). -// -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLPanelMainInventory : public LLPanel, LLInventoryObserver -{ -public: - friend class LLFloaterInventoryFinder; - - LLPanelMainInventory(const LLPanel::Params& p = getDefaultParams()); - ~LLPanelMainInventory(); - - bool postBuild(); - - enum EViewModeType - { - MODE_LIST, - MODE_GALLERY, - MODE_COMBINATION - }; - - virtual bool handleKeyHere(KEY key, MASK mask); - - // Inherited functionality - /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, - EDragAndDropType cargo_type, - void* cargo_data, - EAcceptance* accept, - std::string& tooltip_msg); - /*virtual*/ void changed(U32); - /*virtual*/ void draw(); - /*virtual*/ void onVisibilityChange ( bool new_visibility ); - - LLInventoryPanel* getPanel() { return mActivePanel; } - LLInventoryPanel* getActivePanel() { return mActivePanel; } - LLInventoryPanel* getAllItemsPanel(); - void selectAllItemsPanel(); - const LLInventoryPanel* getActivePanel() const { return mActivePanel; } - void setActivePanel(); - - bool isRecentItemsPanelSelected(); - - const std::string& getFilterText() const { return mFilterText; } - - void setSelectCallback(const LLFolderView::signal_t::slot_type& cb); - - void onFilterEdit(const std::string& search_string ); - - void setFocusFilterEditor(); - - 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 - // - void setFilterTextFromFilter(); - void startSearch(); - - void onSelectionChange(LLInventoryPanel *panel, const std::deque& items, bool user_action); - - static bool filtersVisible(void* user_data); - void onClearSearch(); - static void onFoldersByName(void *user_data); - static bool checkFoldersByName(void *user_data); - - static bool incrementalFind(LLFolderViewItem* first_item, const char *find_text, bool backward); - void onFilterSelected(); - - const std::string getFilterSubString(); - void setFilterSubString(const std::string& string); - - // menu callbacks - void doToSelected(const LLSD& userdata); - void closeAllFolders(); - void doCreate(const LLSD& userdata); - void setSortBy(const LLSD& userdata); - void saveTexture(const LLSD& userdata); - 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(); - - LLFilterEditor* mFilterEditor; - LLTabContainer* mFilterTabs; - LLUICtrl* mCounterCtrl; - LLHandle mFinderHandle; - LLInventoryPanel* mActivePanel; - LLInventoryPanel* mWornItemsPanel; - bool mResortActivePanel; - LLSaveFolderState* mSavedFolderState; - std::string mFilterText; - std::string mFilterSubString; - S32 mItemCount; - std::string mItemCountString; - S32 mCategoryCount; - 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 // -protected: - void initListCommandsHandlers(); - void updateListCommands(); - void onAddButtonClick(); - void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); - void onClipboardAction(const LLSD& userdata); - bool isActionEnabled(const LLSD& command_name); - bool isActionChecked(const LLSD& userdata); - void onCustomAction(const LLSD& command_name); - bool isActionVisible(const LLSD& userdata); - static bool hasSettingsInventory(); - static bool hasMaterialsInventory(); - void updateTitle(); - void updateNavButtons(); - - void onCombinationRootChanged(bool gallery_clicked); - void onCombinationGallerySelectionChanged(const LLUUID& category_id); - void onCombinationInventorySelectionChanged(const std::deque& items, bool user_action); - /** - * Set upload cost in "Upload" sub menu. - */ - void setUploadCostIfNeeded(); - void disableAddIfNeeded(); -private: - LLToggleableMenu* mMenuGearDefault; - LLToggleableMenu* mMenuViewDefault; - LLToggleableMenu* mMenuVisibility; - LLMenuButton* mGearMenuButton; - LLMenuButton* mViewMenuButton; - LLMenuButton* mVisibilityMenuButton; - LLHandle mMenuAddHandle; - - bool mNeedUploadCost; - - bool mForceShowInvLayout; - bool mReshapeInvLayout; - LLUUID mCombInvUUIDNeedsRename; - // List Commands // - //////////////////////////////////////////////////////////////////////////////// -}; - -#endif // LL_LLPANELMAININVENTORY_H - - - +/** + * @file llpanelmaininventory.h + * @brief llpanelmaininventory.h + * class definition + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLPANELMAININVENTORY_H +#define LL_LLPANELMAININVENTORY_H + +#include "llpanel.h" +#include "llinventoryobserver.h" +#include "llinventorypanel.h" +#include "lldndbutton.h" + +#include "llfolderview.h" + +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 +// +// This is a panel used to view and control an agent's inventory, +// including all the fixin's (e.g. AllItems/RecentItems tabs, filter floaters). +// +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLPanelMainInventory : public LLPanel, LLInventoryObserver +{ +public: + friend class LLFloaterInventoryFinder; + + LLPanelMainInventory(const LLPanel::Params& p = getDefaultParams()); + ~LLPanelMainInventory(); + + bool postBuild(); + + enum EViewModeType + { + MODE_LIST, + MODE_GALLERY, + MODE_COMBINATION + }; + + virtual bool handleKeyHere(KEY key, MASK mask); + + // Inherited functionality + /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, + EDragAndDropType cargo_type, + void* cargo_data, + EAcceptance* accept, + std::string& tooltip_msg); + /*virtual*/ void changed(U32); + /*virtual*/ void draw(); + /*virtual*/ void onVisibilityChange ( bool new_visibility ); + + LLInventoryPanel* getPanel() { return mActivePanel; } + LLInventoryPanel* getActivePanel() { return mActivePanel; } + LLInventoryPanel* getAllItemsPanel(); + void selectAllItemsPanel(); + const LLInventoryPanel* getActivePanel() const { return mActivePanel; } + void setActivePanel(); + + bool isRecentItemsPanelSelected(); + + const std::string& getFilterText() const { return mFilterText; } + + void setSelectCallback(const LLFolderView::signal_t::slot_type& cb); + + void onFilterEdit(const std::string& search_string ); + + void setFocusFilterEditor(); + + 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 + // + void setFilterTextFromFilter(); + void startSearch(); + + void onSelectionChange(LLInventoryPanel *panel, const std::deque& items, bool user_action); + + static bool filtersVisible(void* user_data); + void onClearSearch(); + static void onFoldersByName(void *user_data); + static bool checkFoldersByName(void *user_data); + + static bool incrementalFind(LLFolderViewItem* first_item, const char *find_text, bool backward); + void onFilterSelected(); + + const std::string getFilterSubString(); + void setFilterSubString(const std::string& string); + + // menu callbacks + void doToSelected(const LLSD& userdata); + void closeAllFolders(); + void doCreate(const LLSD& userdata); + void setSortBy(const LLSD& userdata); + void saveTexture(const LLSD& userdata); + 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(); + + LLFilterEditor* mFilterEditor; + LLTabContainer* mFilterTabs; + LLUICtrl* mCounterCtrl; + LLHandle mFinderHandle; + LLInventoryPanel* mActivePanel; + LLInventoryPanel* mWornItemsPanel; + bool mResortActivePanel; + LLSaveFolderState* mSavedFolderState; + std::string mFilterText; + std::string mFilterSubString; + S32 mItemCount; + std::string mItemCountString; + S32 mCategoryCount; + 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 // +protected: + void initListCommandsHandlers(); + void updateListCommands(); + void onAddButtonClick(); + void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); + void onClipboardAction(const LLSD& userdata); + bool isActionEnabled(const LLSD& command_name); + bool isActionChecked(const LLSD& userdata); + void onCustomAction(const LLSD& command_name); + bool isActionVisible(const LLSD& userdata); + static bool hasSettingsInventory(); + static bool hasMaterialsInventory(); + void updateTitle(); + void updateNavButtons(); + + void onCombinationRootChanged(bool gallery_clicked); + void onCombinationGallerySelectionChanged(const LLUUID& category_id); + void onCombinationInventorySelectionChanged(const std::deque& items, bool user_action); + /** + * Set upload cost in "Upload" sub menu. + */ + void setUploadCostIfNeeded(); + void disableAddIfNeeded(); +private: + LLToggleableMenu* mMenuGearDefault; + LLToggleableMenu* mMenuViewDefault; + LLToggleableMenu* mMenuVisibility; + LLMenuButton* mGearMenuButton; + LLMenuButton* mViewMenuButton; + LLMenuButton* mVisibilityMenuButton; + LLHandle mMenuAddHandle; + + bool mNeedUploadCost; + + bool mForceShowInvLayout; + bool mReshapeInvLayout; + LLUUID mCombInvUUIDNeedsRename; + // List Commands // + //////////////////////////////////////////////////////////////////////////////// +}; + +#endif // LL_LLPANELMAININVENTORY_H + + + -- cgit v1.2.3