Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-12-09 14:07:34 +0300
committerJulian Eisel <julian@blender.org>2021-12-09 14:35:15 +0300
commit69f55b1b6216969ecd42fab657dd777c3179f916 (patch)
tree6efed9d8d23f082f61ca3366d106aa4ffdb2aa07 /source/blender/editors/space_file
parent9183f9f8602aac82aae5319d5a9e75bc830b3fa7 (diff)
Cleanup: Various cleanups to the tree-view API
* Correct URL for documentation (was changed recently). * Add comments. * Reevaluate and update which functions are public, protected or private. * Reorder functions and classes to be more logical and readable. * Add helper class for the public item API so individual functions it uses can be made protected/private (the helper class is a friend). Also allows splitting API implementation from the C-API. * Move internal layout builder helper class to the source file, out of the header. * More consistent naming. * Add alias for item-container, so it's more clear how it can be used. * Use const. * Remove unnecessary forward declaration.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/asset_catalog_tree_view.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/asset_catalog_tree_view.cc b/source/blender/editors/space_file/asset_catalog_tree_view.cc
index 2576d0052a8..86c4b78dea4 100644
--- a/source/blender/editors/space_file/asset_catalog_tree_view.cc
+++ b/source/blender/editors/space_file/asset_catalog_tree_view.cc
@@ -76,7 +76,7 @@ class AssetCatalogTreeView : public ui::AbstractTreeView {
void activate_catalog_by_id(CatalogID catalog_id);
private:
- ui::BasicTreeViewItem &build_catalog_items_recursive(ui::TreeViewItemContainer &view_parent_item,
+ ui::BasicTreeViewItem &build_catalog_items_recursive(ui::TreeViewOrItem &view_parent_item,
AssetCatalogTreeItem &catalog);
AssetCatalogTreeViewAllItem &add_all_item();
@@ -98,7 +98,7 @@ class AssetCatalogTreeViewItem : public ui::BasicTreeViewItem {
void build_row(uiLayout &row) override;
void build_context_menu(bContext &C, uiLayout &column) const override;
- bool can_rename() const override;
+ bool supports_renaming() const override;
bool rename(StringRefNull new_name) override;
/** Add drag support for catalog items. */
@@ -211,7 +211,7 @@ void AssetCatalogTreeView::build_tree()
}
ui::BasicTreeViewItem &AssetCatalogTreeView::build_catalog_items_recursive(
- ui::TreeViewItemContainer &view_parent_item, AssetCatalogTreeItem &catalog)
+ ui::TreeViewOrItem &view_parent_item, AssetCatalogTreeItem &catalog)
{
ui::BasicTreeViewItem &view_item = view_parent_item.add_tree_item<AssetCatalogTreeViewItem>(
&catalog);
@@ -333,7 +333,7 @@ void AssetCatalogTreeViewItem::build_context_menu(bContext &C, uiLayout &column)
UI_menutype_draw(&C, mt, &column);
}
-bool AssetCatalogTreeViewItem::can_rename() const
+bool AssetCatalogTreeViewItem::supports_renaming() const
{
return true;
}