Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/tree_view.cc
| Show First 20 Lines • Show All 361 Lines • ▼ Show 20 Lines | |||||
| bool AbstractTreeViewItem::can_drop(const wmDrag & /*drag*/) const | bool AbstractTreeViewItem::can_drop(const wmDrag & /*drag*/) const | ||||
| { | { | ||||
| return false; | return false; | ||||
| } | } | ||||
| std::string AbstractTreeViewItem::drop_tooltip(const bContext & /*C*/, | std::string AbstractTreeViewItem::drop_tooltip(const bContext & /*C*/, | ||||
| const wmDrag & /*drag*/, | const wmDrag & /*drag*/, | ||||
| const wmEvent & /*event*/) const | const int * /*xy*/) const | ||||
| { | { | ||||
| return TIP_("Drop into/onto tree item"); | return TIP_("Drop into/onto tree item"); | ||||
| } | } | ||||
| bool AbstractTreeViewItem::can_rename() const | bool AbstractTreeViewItem::can_rename() const | ||||
| { | { | ||||
| /* No renaming by default. */ | /* No renaming by default. */ | ||||
| return false; | return false; | ||||
| ▲ Show 20 Lines • Show All 305 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| const AbstractTreeViewItem &item = reinterpret_cast<const AbstractTreeViewItem &>(*item_); | const AbstractTreeViewItem &item = reinterpret_cast<const AbstractTreeViewItem &>(*item_); | ||||
| return item.can_drop(*drag); | return item.can_drop(*drag); | ||||
| } | } | ||||
| char *UI_tree_view_item_drop_tooltip(const uiTreeViewItemHandle *item_, | char *UI_tree_view_item_drop_tooltip(const uiTreeViewItemHandle *item_, | ||||
| const bContext *C, | const bContext *C, | ||||
| const wmDrag *drag, | const wmDrag *drag, | ||||
| const wmEvent *event) | const int xy[2]) | ||||
| { | { | ||||
| const AbstractTreeViewItem &item = reinterpret_cast<const AbstractTreeViewItem &>(*item_); | const AbstractTreeViewItem &item = reinterpret_cast<const AbstractTreeViewItem &>(*item_); | ||||
| return BLI_strdup(item.drop_tooltip(*C, *drag, *event).c_str()); | return BLI_strdup(item.drop_tooltip(*C, *drag, xy).c_str()); | ||||
| } | } | ||||
| /** | /** | ||||
| * Let a tree-view item handle a drop event. | * Let a tree-view item handle a drop event. | ||||
| * \return True if the drop was handled by the tree-view item. | * \return True if the drop was handled by the tree-view item. | ||||
| */ | */ | ||||
| bool UI_tree_view_item_drop_handle(uiTreeViewItemHandle *item_, const ListBase *drags) | bool UI_tree_view_item_drop_handle(uiTreeViewItemHandle *item_, const ListBase *drags) | ||||
| { | { | ||||
| Show All 36 Lines | |||||