diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-10-17 16:56:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 16:56:21 +0300 |
commit | 0ef7a9b39cf72da1211039ab22bdf8f9f6a2c984 (patch) | |
tree | 6f51ef179497265b5bff2a355471ae5dc9643ad2 /indra/newview/llinventoryfunctions.h | |
parent | 9e24b300d02e5627ea0d304d412cb683ec2de3a4 (diff) | |
parent | d3d349ae0f17a72481f30b9354b9367b1cd3b639 (diff) |
Merge pull request #2856 from secondlife/marchcat/c-develop
Develop → Maint C sync
Diffstat (limited to 'indra/newview/llinventoryfunctions.h')
-rw-r--r-- | indra/newview/llinventoryfunctions.h | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index f2fa7b3fe5..9e2739ef29 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -43,14 +43,14 @@ const S32 COMPUTE_STOCK_NOT_EVALUATED = -2; **/ // Is this a parent folder to a worn item -BOOL get_is_parent_to_worn_item(const LLUUID& id); +bool get_is_parent_to_worn_item(const LLUUID& id); // Is this item or its baseitem is worn, attached, etc... -BOOL get_is_item_worn(const LLUUID& id); -BOOL get_is_item_worn(const LLViewerInventoryItem* item); +bool get_is_item_worn(const LLUUID& id); +bool get_is_item_worn(const LLViewerInventoryItem* item); // Could this item be worn (correct type + not already being worn) -BOOL get_can_item_be_worn(const LLUUID& id); +bool get_can_item_be_worn(const LLUUID& id); bool get_is_item_removable(const LLInventoryModel* model, const LLUUID& id, bool check_worn); @@ -58,10 +58,10 @@ bool get_is_item_removable(const LLInventoryModel* model, const LLUUID& id, bool bool get_is_item_editable(const LLUUID& inv_item_id); void handle_item_edit(const LLUUID& inv_item_id); -BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id); +bool get_is_category_removable(const LLInventoryModel* model, const LLUUID& id); bool get_is_category_and_children_removable(LLInventoryModel* model, const LLUUID& folder_id, bool check_worn); -BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id); +bool get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id); void show_item_profile(const LLUUID& item_uuid); void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id); @@ -110,7 +110,7 @@ bool is_only_cats_selected(const uuid_vec_t& selected_uuids); bool is_only_items_selected(const uuid_vec_t& selected_uuids); std::string get_category_path(LLUUID cat_id); -bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); +bool can_move_to_outfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit); bool can_move_to_landmarks(LLInventoryItem* inv_item); bool can_move_to_my_outfits(LLInventoryModel* model, LLInventoryCategory* inv_cat, U32 wear_limit); std::string get_localized_folder_name(LLUUID cat_uuid); @@ -185,7 +185,7 @@ private: // Base class for LLInventoryModel::collectDescendentsIf() method // which accepts an instance of one of these objects to use as the // function to determine if it should be added. Derive from this class -// and override the () operator to return TRUE if you want to collect +// and override the () operator to return true if you want to collect // the category or item passed in. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInventoryCollectFunctor @@ -194,6 +194,8 @@ public: virtual ~LLInventoryCollectFunctor(){}; virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) = 0; + virtual bool exceedsLimit() { return false; } + static bool itemTransferCommonlyAllowed(const LLInventoryItem* item); }; @@ -235,7 +237,7 @@ protected: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIsType // -// Implementation of a LLInventoryCollectFunctor which returns TRUE if +// Implementation of a LLInventoryCollectFunctor which returns true if // the type is the type passed in during construction. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -253,7 +255,7 @@ protected: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIsNotType // -// Implementation of a LLInventoryCollectFunctor which returns FALSE if the +// Implementation of a LLInventoryCollectFunctor which returns false if the // type is the type passed in during construction, otherwise false. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLIsNotType : public LLInventoryCollectFunctor @@ -270,7 +272,7 @@ protected: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIsOfAssetType // -// Implementation of a LLInventoryCollectFunctor which returns TRUE if +// Implementation of a LLInventoryCollectFunctor which returns true if // the item or category is of asset type passed in during construction. // Link types are treated as links, not as the types they point to. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -289,7 +291,7 @@ protected: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLAssetIDAndTypeMatches // -// Implementation of a LLInventoryCollectFunctor which returns TRUE if +// Implementation of a LLInventoryCollectFunctor which returns true if // the item matches both asset type and asset id. // This is needed in case you are looking for a specific type with default id // (since null is default for multiple asset types) @@ -409,6 +411,22 @@ protected: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLNameItemCollector +// +// Collects items based on case-insensitive match of prefix +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLNameItemCollector : public LLInventoryCollectFunctor +{ +public: + LLNameItemCollector(const std::string& name) : mName(name) {} + virtual ~LLNameItemCollector() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +protected: + std::string mName; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLFindCOFValidItems // // Collects items that can be legitimately linked to in the COF. @@ -589,13 +607,13 @@ class LLInventoryState { public: // HACK: Until we can route this info through the instant message hierarchy - static BOOL sWearNewClothing; + static bool sWearNewClothing; static LLUUID sWearNewClothingTransactionID; // wear all clothing in this transaction }; struct LLInventoryAction { - static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE); + static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, bool user_confirm = true); static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root); |