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

#include <UI_grid_view.hh>

Inherits blender::ui::AbstractViewItem.

Inherited by blender::ui::PreviewGridItem.

Public Member Functions

 ~AbstractGridViewItem () override=default
 
virtual void build_grid_tile (const bContext &C, uiLayout &layout) const =0
 
std::optional< std::string > debug_name () const override
 
AbstractGridViewget_view () const
 
- Public Member Functions inherited from blender::ui::AbstractViewItem
virtual ~AbstractViewItem ()=default
 
virtual void build_context_menu (bContext &C, uiLayout &column) const
 
virtual std::unique_ptr< AbstractViewItemDragControllercreate_drag_controller () const
 
AbstractViewget_view () const
 
uiButViewItemview_item_button () const
 
void disable_interaction ()
 
bool is_interactive () const
 
void disable_activatable ()
 
bool is_active () const
 
bool is_search_highlight () const
 
virtual void on_activate (bContext &C)
 
virtual std::optional< bool > should_be_active () const
 
void activate (bContext &C)
 
void deactivate ()
 
virtual bool supports_renaming () const
 
virtual bool rename (const bContext &C, StringRefNull new_name)
 
virtual StringRef get_rename_string () const
 
bool is_renaming () const
 
void begin_renaming ()
 
void end_renaming ()
 
void rename_apply (const bContext &C)
 
bool is_filtered_visible () const
 

Protected Member Functions

 AbstractGridViewItem (StringRef identifier)
 
bool matches (const AbstractViewItem &other) const override
 
std::unique_ptr< DropTargetInterfacecreate_item_drop_target () final
 
virtual std::unique_ptr< GridViewItemDropTargetcreate_drop_target ()
 
- Protected Member Functions inherited from blender::ui::AbstractViewItem
 AbstractViewItem ()=default
 
virtual void update_from_old (const AbstractViewItem &old)
 
virtual void change_state_delayed ()
 
virtual bool set_state_active ()
 
void add_rename_button (uiBlock &block)
 
virtual bool should_be_filtered_visible (StringRefNull filter_string) const
 

Protected Attributes

StringRef identifier_ {}
 
- Protected Attributes inherited from blender::ui::AbstractViewItem
AbstractViewview_ = nullptr
 
uiButViewItemview_item_but_ = nullptr
 
bool is_activatable_ = true
 
bool is_interactive_ = true
 
bool is_active_ = false
 
bool is_renaming_ = false
 
bool is_highlighted_search_ = false
 
bool is_filtered_visible_ = true
 

Friends

class AbstractGridView
 
class GridViewLayoutBuilder
 

Detailed Description

Definition at line 37 of file UI_grid_view.hh.

Constructor & Destructor Documentation

◆ ~AbstractGridViewItem()

blender::ui::AbstractGridViewItem::~AbstractGridViewItem ( )
overridedefault

◆ AbstractGridViewItem()

blender::ui::AbstractGridViewItem::AbstractGridViewItem ( StringRef identifier)
protected

Definition at line 131 of file grid_view.cc.

Member Function Documentation

◆ build_grid_tile()

virtual void blender::ui::AbstractGridViewItem::build_grid_tile ( const bContext & C,
uiLayout & layout ) const
pure virtual

◆ create_drop_target()

std::unique_ptr< GridViewItemDropTarget > blender::ui::AbstractGridViewItem::create_drop_target ( )
protectedvirtual

Definition at line 189 of file grid_view.cc.

Referenced by create_item_drop_target().

◆ create_item_drop_target()

std::unique_ptr< DropTargetInterface > blender::ui::AbstractGridViewItem::create_item_drop_target ( )
finalprotectedvirtual

If an item wants to support dropping data into it, it has to return a drop target here. That is an object implementing #DropTargetInterface.

Note
This drop target may be requested for each event. The view doesn't keep a drop target around currently. So it can not contain persistent state.

Reimplemented from blender::ui::AbstractViewItem.

Definition at line 184 of file grid_view.cc.

References create_drop_target().

◆ debug_name()

std::optional< std::string > blender::ui::AbstractGridViewItem::debug_name ( ) const
overridevirtual

View types should implement this to return some name or identifier of the item, which is helpful for debugging (there's nothing to identify the item just from the AbstractViewItem otherwise).

Reimplemented from blender::ui::AbstractViewItem.

Definition at line 168 of file grid_view.cc.

References identifier_.

◆ get_view()

◆ matches()

bool blender::ui::AbstractGridViewItem::matches ( const AbstractViewItem & other) const
overrideprotectedvirtual

Friends And Related Symbol Documentation

◆ AbstractGridView

friend class AbstractGridView
friend

Definition at line 38 of file UI_grid_view.hh.

◆ GridViewLayoutBuilder

friend class GridViewLayoutBuilder
friend

Definition at line 39 of file UI_grid_view.hh.

Member Data Documentation

◆ identifier_

StringRef blender::ui::AbstractGridViewItem::identifier_ {}
protected

Reference to a string that uniquely identifies this item in the view.

Definition at line 43 of file UI_grid_view.hh.

Referenced by debug_name(), and matches().


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