Blender
V3.3
|
#include <memory>
#include <type_traits>
#include <variant>
#include "DNA_screen_types.h"
#include "BKE_screen.h"
#include "BLI_listbase.h"
#include "ED_screen.h"
#include "interface_intern.h"
#include "UI_interface.hh"
#include "UI_abstract_view.hh"
#include "UI_grid_view.hh"
#include "UI_tree_view.hh"
Go to the source code of this file.
Classes | |
struct | ViewLink |
Code to manage views as part of the regular screen hierarchy. E.g. managing ownership of views inside blocks (uiBlock.views), looking up items in the region, passing WM notifiers to views, etc.
Blocks and their contained views are reconstructed on every redraw. This file also contains functions related to this recreation of views inside blocks. For example to query state information before the view is done reconstructing (#AbstractView.is_reconstructed() returns false), it may be enough to query the previous version of the block/view/view-item. Since such queries rely on the details of the UI reconstruction process, they should remain internal to interface/
code.
Definition in file interface_view.cc.
AbstractGridView* UI_block_add_view | ( | uiBlock & | block, |
blender::StringRef | idname, | ||
std::unique_ptr< blender::ui::AbstractGridView > | grid_view | ||
) |
Override this for all available view types.
Definition at line 63 of file interface_view.cc.
Referenced by file_create_asset_catalog_tree_view_in_layout(), and blender::ed::spreadsheet::spreadsheet_data_set_panel_draw().
AbstractTreeView* UI_block_add_view | ( | uiBlock & | block, |
StringRef | idname, | ||
std::unique_ptr< AbstractTreeView > | tree_view | ||
) |
Definition at line 70 of file interface_view.cc.
|
static |
Definition at line 50 of file interface_view.cc.
References BLI_addtail(), ViewLink::idname, T, ViewLink::view, view, and uiBlock::views.
Definition at line 77 of file interface_view.cc.
References LISTBASE_FOREACH_MUTABLE, and uiBlock::views.
Referenced by UI_block_free().
|
static |
Definition at line 115 of file interface_view.cc.
References LISTBASE_FOREACH, view, and uiBlock::views.
Referenced by ui_block_view_find_matching_in_old_block_impl().
uiViewHandle* ui_block_view_find_matching_in_old_block | ( | const uiBlock * | new_block, |
const uiViewHandle * | new_view_handle | ||
) |
Definition at line 150 of file interface_view.cc.
References BLI_assert, and ui_block_view_find_matching_in_old_block_impl().
Referenced by blender::ui::AbstractView::update_from_old().
|
static |
Definition at line 128 of file interface_view.cc.
References blender::StringRefBase::is_empty(), LISTBASE_FOREACH, uiBlock::oldblock, T, ui_block_view_find_idname(), and uiBlock::views.
Referenced by ui_block_view_find_matching_in_old_block(), and ui_block_view_find_matching_view_item_but_in_old_block().
uiButViewItem* ui_block_view_find_matching_view_item_but_in_old_block | ( | const uiBlock * | new_block, |
const uiViewItemHandle * | new_item_handle | ||
) |
Definition at line 160 of file interface_view.cc.
References uiBlock::buttons, blender::ui::AbstractViewItem::get_view(), LISTBASE_FOREACH, uiBlock::oldblock, ui_block_view_find_matching_in_old_block_impl(), UI_BTYPE_VIEW_ITEM, UI_view_item_matches(), and uiButViewItem::view_item.
Referenced by blender::ui::AbstractTreeViewItem::is_hovered().
void UI_block_views_listen | ( | const uiBlock * | block, |
const wmRegionListenerParams * | listener_params | ||
) |
Definition at line 84 of file interface_view.cc.
References ED_region_tag_redraw(), LISTBASE_FOREACH, wmRegionListenerParams::notifier, wmRegionListenerParams::region, and uiBlock::views.
uiViewItemHandle* UI_region_views_find_active_item | ( | const ARegion * | region | ) |
Definition at line 105 of file interface_view.cc.
References ui_view_item_find_active(), and uiButViewItem::view_item.
uiViewItemHandle* UI_region_views_find_item_at | ( | const ARegion * | region, |
const int | xy[2] | ||
) |
Definition at line 95 of file interface_view.cc.
References ui_view_item_find_mouse_over(), uiButViewItem::view_item, and xy.