|
Blender V5.0
|
#include <UI_abstract_view.hh>
Inherited by blender::ed::asset::shelf::AssetDragController, blender::ed::asset_browser::AssetCatalogDragController, blender::ed::object::shapekey::ShapeKeyDragController, blender::ui::bonecollections::BoneCollectionDragController, and blender::ui::greasepencil::LayerViewItemDragController.
Public Member Functions | |
| virtual | ~AbstractViewItemDragController ()=default |
| virtual std::optional< eWM_DragDataType > | get_drag_type () const =0 |
| virtual void * | create_drag_data () const =0 |
Drag 'n Drop | |
| AbstractViewItemDragController (AbstractView &view) | |
| virtual void | on_drag_start (bContext &C) |
| template<class ViewType> | |
| ViewType & | get_view () const |
Protected Attributes | |
| AbstractView & | view_ |
Class to enable dragging a view item. An item can return a drag controller for itself by implementing #AbstractViewItem::create_drag_controller().
Definition at line 419 of file UI_abstract_view.hh.
| blender::ui::AbstractViewItemDragController::AbstractViewItemDragController | ( | AbstractView & | view | ) |
Definition at line 318 of file abstract_view_item.cc.
Referenced by blender::ed::asset_browser::AssetCatalogDragController::AssetCatalogDragController(), blender::ed::asset::shelf::AssetDragController::AssetDragController(), blender::ui::bonecollections::BoneCollectionDragController::BoneCollectionDragController(), blender::ui::greasepencil::LayerViewItemDragController::LayerViewItemDragController(), and blender::ed::object::shapekey::ShapeKeyDragController::ShapeKeyDragController().
|
virtualdefault |
|
pure virtual |
Implemented in blender::ed::asset::shelf::AssetDragController, blender::ed::asset_browser::AssetCatalogDragController, blender::ed::object::shapekey::ShapeKeyDragController, blender::ui::bonecollections::BoneCollectionDragController, and blender::ui::greasepencil::LayerViewItemDragController.
References C.
|
pure virtual |
|
inline |
Request the view the item is registered for as type #ViewType. Throws a std::bad_cast exception if the view is not of the requested type.
Definition at line 440 of file UI_abstract_view.hh.
References view_.
Referenced by blender::ed::asset::shelf::AssetDragController::get_drag_type(), blender::ed::asset::shelf::AssetDragController::on_drag_start(), and blender::ed::asset_browser::AssetCatalogDragController::on_drag_start().
|
virtual |
Called when beginning to drag. Also called when get_drag_type() doesn't return a value, so an arbitrary action can be executed.
Reimplemented in blender::ed::asset::shelf::AssetDragController, blender::ed::asset_browser::AssetCatalogDragController, blender::ui::bonecollections::BoneCollectionDragController, and blender::ui::greasepencil::LayerViewItemDragController.
Definition at line 320 of file abstract_view_item.cc.
|
protected |
Definition at line 421 of file UI_abstract_view.hh.
Referenced by AbstractViewItemDragController(), and get_view().