Blender V4.3
blender::ui::GridViewItemDropTarget Class Reference

#include <UI_grid_view.hh>

Inherits blender::ui::DropTargetInterface.

Public Member Functions

 GridViewItemDropTarget (AbstractGridView &view)
 
template<class ViewType >
ViewType & get_view () const
 
- Public Member Functions inherited from blender::ui::DropTargetInterface
 DropTargetInterface ()=default
 
virtual ~DropTargetInterface ()=default
 
virtual bool can_drop (const wmDrag &drag, const char **r_disabled_hint) const =0
 
virtual std::optional< DropLocationchoose_drop_location (const ARegion &region, const wmEvent &event) const
 
virtual std::string drop_tooltip (const DragInfo &drag) const =0
 
virtual bool on_drop (bContext *C, const DragInfo &drag) const =0
 

Protected Attributes

AbstractGridViewview_
 

Detailed Description

Class to define the behavior when dropping something onto/into a view item, plus the behavior when dragging over this item. An item can return a drop target for itself via a custom implementation of AbstractGridViewItem::create_drop_target().

Definition at line 149 of file UI_grid_view.hh.

Constructor & Destructor Documentation

◆ GridViewItemDropTarget()

blender::ui::GridViewItemDropTarget::GridViewItemDropTarget ( AbstractGridView & view)

Definition at line 194 of file grid_view.cc.

Member Function Documentation

◆ get_view()

template<class ViewType >
ViewType & blender::ui::GridViewItemDropTarget::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 245 of file UI_grid_view.hh.

References blender::ui::AbstractViewItem::view_.

Member Data Documentation

◆ view_

AbstractGridView& blender::ui::GridViewItemDropTarget::view_
protected

Definition at line 151 of file UI_grid_view.hh.


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