|
Blender V5.0
|
#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_screen_types.h"#include "DNA_userdef_types.h"#include "BLI_listbase.h"#include "BLI_rect.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BKE_context.hh"#include "BKE_screen.hh"#include "WM_api.hh"#include "WM_types.hh"#include "UI_interface_layout.hh"#include "UI_view2d.hh"#include "BLT_translation.hh"#include "ED_screen.hh"#include "GPU_framebuffer.hh"#include "interface_intern.hh"Go to the source code of this file.
Classes | |
| struct | HudRegionData |
Functions | |
Utilities | |
| static int | area_calc_region_type_index (const ScrArea *area, const ARegion *region) |
| static ARegion * | area_find_region_by_type_and_index_hint (const ScrArea *area, const short region_type, int index_hint) |
| static bool | last_redo_poll (const bContext *C, short region_type, int region_index_hint) |
| static void | hud_region_hide (ARegion *region) |
Redo Panel | |
| static bool | hud_panel_operator_redo_poll (const bContext *C, PanelType *) |
| static void | hud_panel_operator_redo_draw_header (const bContext *C, Panel *panel) |
| static void | hud_panel_operator_redo_draw (const bContext *C, Panel *panel) |
| static void | hud_panels_register (ARegionType *art, int space_type, int region_type) |
Callbacks for Floating Region | |
| static void | hud_region_init (wmWindowManager *wm, ARegion *region) |
| static void | hud_region_free (ARegion *region) |
| static void | hud_region_layout (const bContext *C, ARegion *region) |
| static void | hud_region_draw (const bContext *C, ARegion *region) |
| static void | hud_region_listener (const wmRegionListenerParams *params) |
| ARegionType * | ED_area_type_hud (int space_type) |
| static ARegion * | hud_region_add (ScrArea *area) |
| void | ED_area_type_hud_clear (wmWindowManager *wm, ScrArea *area_keep) |
| void | ED_area_type_hud_ensure (bContext *C, ScrArea *area) |
| ARegion * | ED_area_type_hud_redo_region_find (const ScrArea *area, const ARegion *hud_region) |
Floating Persistent Region
Definition in file interface_region_hud.cc.
Return the index of region of other regions in the area (of the same type).
Definition at line 46 of file interface_region_hud.cc.
References BLI_assert_unreachable, LISTBASE_FOREACH, ScrArea::regionbase, and ARegion::regiontype.
Referenced by ED_area_type_hud_ensure().
|
static |
Find the areas region by type and index, or just by type (if the index isn't found).
Definition at line 69 of file interface_region_hud.cc.
References LISTBASE_FOREACH, and ScrArea::regionbase.
Referenced by ED_area_type_hud_redo_region_find(), and last_redo_poll().
| ARegionType * ED_area_type_hud | ( | int | space_type | ) |
Definition at line 294 of file interface_region_hud.cc.
References AREAMINX, ARegionType::draw, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, ARegionType::free, HEADERY, hud_panels_register(), hud_region_draw(), hud_region_free(), hud_region_init(), hud_region_layout(), hud_region_listener(), ARegionType::init, ARegionType::keymapflag, ARegionType::layout, ARegionType::listener, ARegionType::lock, MEM_callocN(), ARegionType::prefsizex, ARegionType::prefsizey, REGION_DRAW_LOCK_ALL, ARegionType::regionid, and RGN_TYPE_HUD.
Referenced by ED_spacetype_action(), ED_spacetype_clip(), ED_spacetype_image(), ED_spacetype_ipo(), ED_spacetype_nla(), blender::ed::vse::ED_spacetype_sequencer(), and ED_spacetype_view3d().
| void ED_area_type_hud_clear | ( | wmWindowManager * | wm, |
| ScrArea * | area_keep ) |
Definition at line 334 of file interface_region_hud.cc.
References bScreen::areabase, ED_area_tag_redraw(), ED_region_tag_redraw(), hud_region_hide(), LISTBASE_FOREACH, RGN_FLAG_HIDDEN, RGN_TYPE_HUD, wmWindowManager::windows, and WM_window_get_active_screen().
Referenced by ED_area_type_hud_ensure(), and wm_operator_finished().
Definition at line 354 of file interface_region_hud.cc.
References area_calc_region_type_index(), BKE_area_find_region_type(), BKE_regiontype_from_id(), BLI_assert, C, CTX_wm_manager(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_window(), View2D::cur, ED_area_tag_region_size_update(), ED_area_type_hud_clear(), ED_area_update_region_sizes(), ED_region_floating_init(), ED_region_tag_redraw(), ARegion::flag, hud_region_add(), hud_region_hide(), hud_region_layout(), init(), last_redo_poll(), View2D::maxzoom, MEM_callocN(), View2D::minzoom, HudRegionData::region_index_hint, ARegion::regiondata, HudRegionData::regionid, ARegion::regiontype, RGN_FLAG_HIDDEN, RGN_FLAG_HIDDEN_BY_USER, RGN_FLAG_TOO_SMALL, RGN_TYPE_HUD, RGN_TYPE_WINDOW, ARegion::runtime, View2D::tot, ScrArea::type, UI_view2d_scroller_size_get(), ARegion::v2d, ARegion::winx, View2D::winx, ARegion::winy, View2D::winy, x, rctf::xmax, y, and rctf::ymax.
Referenced by wm_operator_finished().
Lookup the region the operation was executed in, and which should be used to redo the operation. The lookup is based on the region type, so it can return a different region when the same region type is present multiple times.
Definition at line 467 of file interface_region_hud.cc.
References area_find_region_by_type_and_index_hint(), BLI_assert, HudRegionData::region_index_hint, ARegion::regiondata, HudRegionData::regionid, ARegion::regiontype, and RGN_TYPE_HUD.
Referenced by ED_undo_operator_repeat().
Definition at line 168 of file interface_region_hud.cc.
References C, col, uiLayout::column(), uiLayout::enabled_set(), Panel::layout, wmOperatorType::name, wmOperator::type, uiTemplateOperatorRedoProperties(), WM_operator_check_ui_enabled(), and WM_operator_last_redo().
Referenced by hud_panels_register().
Definition at line 161 of file interface_region_hud.cc.
References C, wmOperator::ptr, wmOperator::type, UI_panel_drawname_set(), WM_operator_last_redo(), and WM_operatortype_name().
Referenced by hud_panels_register().
Definition at line 148 of file interface_region_hud.cc.
References BKE_area_find_region_type(), C, CTX_wm_area(), last_redo_poll(), HudRegionData::region_index_hint, ARegion::regiondata, HudRegionData::regionid, and RGN_TYPE_HUD.
Referenced by hud_panels_register().
|
static |
Definition at line 181 of file interface_region_hud.cc.
References BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, PanelType::draw, PanelType::draw_header, PanelType::flag, hud_panel_operator_redo_draw(), hud_panel_operator_redo_draw_header(), hud_panel_operator_redo_poll(), PanelType::idname, PanelType::label, MEM_callocN(), N_, PANEL_TYPE_DEFAULT_CLOSED, ARegionType::paneltypes, PanelType::poll, PanelType::region_type, PanelType::space_type, STRNCPY_UTF8, and PanelType::translation_context.
Referenced by ED_area_type_hud().
Definition at line 316 of file interface_region_hud.cc.
References ARegion::alignment, BKE_area_find_region_type(), BKE_area_region_new(), BLI_addtail(), BLI_insertlinkbefore(), ARegion::flag, ARegion::overlap, ScrArea::regionbase, ARegion::regiontype, RGN_ALIGN_FLOAT, RGN_FLAG_DYNAMIC_SIZE, RGN_TYPE_HUD, and RGN_TYPE_WINDOW.
Referenced by ED_area_type_hud_ensure().
Definition at line 265 of file interface_region_hud.cc.
References C, ED_region_panels_draw(), ARegion::flag, GPU_clear_color(), RGN_FLAG_HIDDEN, ui_draw_menu_back(), UI_view2d_view_ortho(), ARegion::v2d, ARegion::winx, ARegion::winy, wmOrtho2_region_pixelspace(), rcti::xmax, and rcti::ymax.
Referenced by ED_area_type_hud().
|
static |
Definition at line 214 of file interface_region_hud.cc.
References MEM_SAFE_FREE, and ARegion::regiondata.
Referenced by ED_area_type_hud().
|
static |
Definition at line 134 of file interface_region_hud.cc.
References BLI_rcti_init(), ARegion::flag, RGN_FLAG_HIDDEN, and ARegion::winrct.
Referenced by ED_area_type_hud_clear(), ED_area_type_hud_ensure(), and hud_region_layout().
|
static |
Definition at line 202 of file interface_region_hud.cc.
References ED_region_panels_init(), ARegion::flag, View2D::maxzoom, View2D::minzoom, RGN_FLAG_TEMP_REGIONDATA, ARegion::runtime, UI_region_handlers_add(), and ARegion::v2d.
Referenced by ED_area_type_hud().
Definition at line 219 of file interface_region_hud.cc.
References AREA_FLAG_REGION_SIZE_UPDATE, C, CLAMP_MAX, CTX_wm_area(), ED_region_panels_layout(), ED_region_tag_redraw(), ListBase::first, ARegion::flag, ScrArea::flag, hud_region_hide(), last_redo_poll(), ARegion::panels, HudRegionData::region_index_hint, ARegion::regiondata, HudRegionData::regionid, RGN_FLAG_SIZE_CLAMP_X, RGN_FLAG_SIZE_CLAMP_Y, ARegion::sizex, ARegion::sizey, UI_SCALE_FAC, UI_view2d_region_reinit(), UI_view2d_view_restore(), ARegion::v2d, V2D_COMMONVIEW_LIST, ARegion::winrct, ARegion::winx, ARegion::winy, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ED_area_type_hud(), and ED_area_type_hud_ensure().
|
static |
Definition at line 280 of file interface_region_hud.cc.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NC_WM, ND_HISTORY, and params.
Referenced by ED_area_type_hud().
|
static |
Definition at line 106 of file interface_region_hud.cc.
References area_find_region_by_type_and_index_hint(), C, CTX_wm_area(), CTX_wm_region(), CTX_wm_region_set(), wmOperator::ptr, wmOperator::type, WM_operator_last_redo(), WM_operator_poll(), WM_operator_repeat_check(), and WM_operator_ui_poll().
Referenced by ED_area_type_hud_ensure(), hud_panel_operator_redo_poll(), and hud_region_layout().