Blender V4.3
blender::ui::AbstractViewItemDragController Class Referenceabstract

#include <UI_abstract_view.hh>

Inherited by blender::ed::asset::shelf::AssetDragController, blender::ed::asset_browser::AssetCatalogDragController, blender::ui::bonecollections::BoneCollectionDragController, and blender::ui::greasepencil::LayerViewItemDragController.

Public Member Functions

virtual ~AbstractViewItemDragController ()=default
 
virtual 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 ()
 
template<class ViewType >
ViewType & get_view () const
 

Protected Attributes

AbstractViewview_
 

Detailed Description

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 349 of file UI_abstract_view.hh.

Constructor & Destructor Documentation

◆ AbstractViewItemDragController()

blender::ui::AbstractViewItemDragController::AbstractViewItemDragController ( AbstractView & view)

Definition at line 274 of file abstract_view_item.cc.

◆ ~AbstractViewItemDragController()

virtual blender::ui::AbstractViewItemDragController::~AbstractViewItemDragController ( )
virtualdefault

Member Function Documentation

◆ create_drag_data()

◆ get_drag_type()

◆ get_view()

template<class ViewType >
ViewType & blender::ui::AbstractViewItemDragController::get_view ( ) const
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 366 of file UI_abstract_view.hh.

References view_.

Referenced by blender::ed::asset_browser::AssetCatalogDragController::on_drag_start().

◆ on_drag_start()

void blender::ui::AbstractViewItemDragController::on_drag_start ( )
virtual

Member Data Documentation

◆ view_

AbstractView& blender::ui::AbstractViewItemDragController::view_
protected

Definition at line 351 of file UI_abstract_view.hh.

Referenced by get_view().


The documentation for this class was generated from the following files: