diff options
author | Julian Eisel <julian@blender.org> | 2021-10-26 19:48:24 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-10-26 19:55:27 +0300 |
commit | 11e8a2ec5fc95524a59a7422d2715ef1116dbef4 (patch) | |
tree | 709a06d470a2810d140a72599624a7f46a3e6f50 /source/blender/editors/include/UI_interface.h | |
parent | 03c0581c6ed6eb98c4c4c7bf42c92d623880dfac (diff) |
UI: Support disabled-hint for dropping in the tree-view API
A tree-view item's drop controller can now return a message for the user
explaining why dropping isn't possible with the dropped data. This is then
displayed in red text next to the cursor.
This isn't actually used yet, the follow up commit will do that.
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index b6e33d6ed0d..12fdda2092c 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -2777,7 +2777,9 @@ void UI_interface_tag_script_reload(void); bool UI_tree_view_item_is_active(const uiTreeViewItemHandle *item); bool UI_tree_view_item_matches(const uiTreeViewItemHandle *a, const uiTreeViewItemHandle *b); -bool UI_tree_view_item_can_drop(const uiTreeViewItemHandle *item_, const struct wmDrag *drag); +bool UI_tree_view_item_can_drop(const uiTreeViewItemHandle *item_, + const struct wmDrag *drag, + const char **r_disabled_hint); char *UI_tree_view_item_drop_tooltip(const uiTreeViewItemHandle *item, const struct wmDrag *drag); bool UI_tree_view_item_drop_handle(uiTreeViewItemHandle *item_, const struct ListBase *drags); bool UI_tree_view_item_can_rename(const uiTreeViewItemHandle *item_handle); |