Blender V5.0
blender::ed::spreadsheet::DataSetViewItem Class Reference

Inherits blender::ui::AbstractTreeViewItem.

Inherited by blender::ed::spreadsheet::CurvesDomainViewItem, blender::ed::spreadsheet::CurvesViewItem, blender::ed::spreadsheet::GreasePencilLayerCurvesDomainViewItem, blender::ed::spreadsheet::GreasePencilLayerViewItem, blender::ed::spreadsheet::GreasePencilLayersViewItem, blender::ed::spreadsheet::GreasePencilViewItem, blender::ed::spreadsheet::InstancesViewItem, blender::ed::spreadsheet::MeshDomainViewItem, blender::ed::spreadsheet::MeshViewItem, blender::ed::spreadsheet::PointCloudViewItem, blender::ed::spreadsheet::PointsViewItem, and blender::ed::spreadsheet::VolumeGridsViewItem.

Public Member Functions

GeometryDataSetTreeViewget_tree () const
void on_activate (bContext &C) override
std::optional< bool > should_be_active () const override
virtual std::optional< GeometryDataIdentifierget_geometry_data_id () const
Public Member Functions inherited from blender::ui::AbstractTreeViewItem
 ~AbstractTreeViewItem () override=default
virtual void build_row (uiLayout &row)=0
std::optional< std::string > debug_name () const override
std::unique_ptr< DropTargetInterfacecreate_item_drop_target () final
virtual std::unique_ptr< TreeViewItemDropTargetcreate_drop_target ()
AbstractTreeViewget_tree_view () const
std::optional< rctfget_win_rect (const ARegion &region) const
void begin_renaming ()
bool toggle_collapsed ()
virtual bool set_collapsed (bool collapsed)
virtual void on_collapse_change (bContext &C, bool is_collapsed)
virtual std::optional< bool > should_be_collapsed () const
void uncollapse_by_default ()
bool is_collapsed () const
bool is_collapsible () const
int count_parents () const
void on_filter_change () override
Public Member Functions inherited from blender::ui::AbstractViewItem
virtual ~AbstractViewItem ()=default
virtual void build_context_menu (bContext &C, uiLayout &column) const
virtual std::optional< bool > should_be_selected () const
virtual void set_selected (const bool select)
void activate (bContext &C)
void activate_for_context_menu (bContext &C)
void deactivate ()
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 ()
void select_on_click_set ()
bool is_select_on_click () const
void always_reactivate_on_click ()
void activate_for_context_menu_set ()
bool is_active () const
bool is_selected () const
bool is_search_highlight () const
virtual bool supports_renaming () const
bool is_renaming () const
void begin_renaming ()
void end_renaming ()
void rename_apply (const bContext &C)
virtual void delete_item (bContext *C)
bool is_filtered_visible () const
Public Member Functions inherited from blender::ui::TreeViewItemContainer
template<class ItemT, typename... Args>
ItemT & add_tree_item (Args &&...args)
AbstractTreeViewItemadd_tree_item (std::unique_ptr< AbstractTreeViewItem > item)

Additional Inherited Members

Public Types inherited from blender::ui::TreeViewItemContainer
enum class  IterOptions { None = 0 , SkipCollapsed = 1 << 0 , SkipFiltered = 1 << 1 }
using ItemIterFn = FunctionRef<void(AbstractTreeViewItem &)>
Protected Member Functions inherited from blender::ui::AbstractTreeViewItem
StringRef get_rename_string () const override
bool rename (const bContext &C, StringRefNull new_name) override
virtual bool supports_collapsing () const
void toggle_collapsed_from_view (bContext &C)
void change_state_delayed () override
bool matches (const AbstractViewItem &other) const override
void update_from_old (const AbstractViewItem &old) override
virtual bool matches_single (const AbstractTreeViewItem &other) const
bool is_hovered () const
void ensure_parents_uncollapsed ()
Protected Member Functions inherited from blender::ui::AbstractViewItem
 AbstractViewItem ()=default
void add_rename_button (uiBlock &block)
virtual bool should_be_filtered_visible (StringRefNull filter_string) const
Protected Member Functions inherited from blender::ui::TreeViewItemContainer
void foreach_item_recursive (ItemIterFn iter_fn, IterOptions options=IterOptions::None) const
void foreach_parent (ItemIterFn iter_fn) const
Protected Attributes inherited from blender::ui::AbstractTreeViewItem
std::string label_
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_selected_ = false
bool is_renaming_ = false
bool is_highlighted_search_ = false
bool is_filtered_visible_ = true
bool is_always_collapsible_ = false
bool select_on_click_ = false
bool reactivate_on_click_ = false
bool activate_for_context_menu_ = false
Protected Attributes inherited from blender::ui::TreeViewItemContainer
Vector< std::unique_ptr< AbstractTreeViewItem > > children_
TreeViewItemContainer * root_ = nullptr
AbstractTreeViewItemparent_ = nullptr
bool is_flat_ = false

Detailed Description

Definition at line 227 of file spreadsheet_dataset_draw.cc.

Member Function Documentation

◆ get_geometry_data_id()

◆ get_tree()

GeometryDataSetTreeView & blender::ed::spreadsheet::DataSetViewItem::get_tree ( ) const

◆ on_activate()

void blender::ed::spreadsheet::DataSetViewItem::on_activate ( bContext & C)
overridevirtual

Called when the view changes an item's state from inactive to active. Will only be called if the state change is triggered through the view, not through external changes. E.g. a click on an item calls it, a change in the value returned by should_be_active() to reflect an external state change does not.

Reimplemented from blender::ui::AbstractViewItem.

Definition at line 702 of file spreadsheet_dataset_draw.cc.

References SpreadsheetTableIDGeometry::attribute_domain, C, CTX_wm_screen(), CTX_wm_space_spreadsheet(), blender::ui::TreeViewItemContainer::foreach_item_recursive(), SpreadsheetTableIDGeometry::geometry_component_type, SpaceSpreadsheet::geometry_id, get_geometry_data_id(), bScreen::id, SpreadsheetTableIDGeometry::layer_index, ptr, RNA_pointer_create_discrete(), RNA_property_update(), and RNA_struct_find_property().

◆ should_be_active()

std::optional< bool > blender::ed::spreadsheet::DataSetViewItem::should_be_active ( ) const
overridevirtual

If the result is not empty, it controls whether the item should be active or not, usually depending on the data that the view represents. Note that since this is meant to reflect externally managed state changes, on_activate() will never be called if this returns true.

Reimplemented from blender::ui::AbstractViewItem.

Definition at line 736 of file spreadsheet_dataset_draw.cc.

References SpreadsheetTableIDGeometry::attribute_domain, SpreadsheetTableIDGeometry::geometry_component_type, SpaceSpreadsheet::geometry_id, get_geometry_data_id(), get_tree(), and SpreadsheetTableIDGeometry::layer_index.


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