|
Blender V4.3
|
#include <cstdarg>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_userdef_types.h"#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_rect.h"#include "BLI_utildefines.h"#include "BKE_context.hh"#include "BKE_screen.hh"#include "WM_api.hh"#include "WM_types.hh"#include "UI_interface.hh"#include "ED_screen.hh"#include "interface_intern.hh"#include "interface_regions_intern.hh"Go to the source code of this file.
PopUp Region (Generic)
Definition in file interface_region_popup.cc.
Definition at line 447 of file interface_region_popup.cc.
References LISTBASE_FOREACH, and UI_block_draw().
Referenced by ui_popup_block_create().
|
static |
Use to refresh centered popups on screen resizing (for splash).
Definition at line 457 of file interface_region_popup.cc.
References wmNotifier::action, wmNotifier::category, ED_region_tag_refresh_ui(), NA_EDITED, NC_WINDOW, and params.
Referenced by ui_popup_block_create().
Definition at line 410 of file interface_region_popup.cc.
References BLI_assert, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), ARegion::do_draw, LISTBASE_FOREACH_MUTABLE, RGN_REFRESH_UI, RGN_TYPE_TEMPORARY, and ui_popup_block_refresh().
Referenced by ui_popup_block_create().
Apply scroll to layout panels when the main panel is used in popups.
Definition at line 596 of file interface_region_popup.cc.
References LayoutPanels::bodies, LayoutPanels::headers, Panel_Runtime::layout_panels, and Panel::runtime.
Referenced by ui_menu_scroll_apply_offset_y(), and ui_popup_block_refresh().
Definition at line 476 of file interface_region_popup.cc.
References uiBlock::buttons, uiBlock::flag, LISTBASE_FOREACH, uiBlock::rect, UI_BLOCK_NO_WIN_CLIP, UI_POPUP_MENU_TOP, UI_SCREEN_MARGIN, WM_window_native_pixel_size(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_popup_block_refresh().
| uiPopupBlockHandle * ui_popup_block_create | ( | bContext * | C, |
| ARegion * | butregion, | ||
| uiBut * | but, | ||
| uiBlockCreateFunc | create_func, | ||
| uiBlockHandleCreateFunc | handle_create_func, | ||
| void * | arg, | ||
| uiFreeArgFunc | arg_free, | ||
| const bool | can_refresh ) |
Definition at line 869 of file interface_region_popup.cc.
References uiBlock::bounds_type, copy_v2_v2_int(), create_func(), CTX_wm_area(), CTX_wm_region(), CTX_wm_region_popup(), CTX_wm_region_popup_set(), CTX_wm_screen(), CTX_wm_window(), wmWindow::eventstate, uiBlock::handle, RGN_TYPE_TEMPORARY, uiBlock::tooltipdisabled, UI_BLOCK_BOUNDS_POPUP_CENTER, ui_block_region_draw(), ui_block_region_popup_window_listener(), ui_block_region_refresh(), UI_but_tooltip_timer_remove(), UI_context_active_but_get(), ui_popup_block_refresh(), UI_region_handlers_add(), ui_region_temp_add(), WM_CURSOR_DEFAULT, WM_cursor_set(), and wmEvent::xy.
Referenced by ui_block_open_begin(), UI_pie_menu_end(), UI_popover_end(), ui_popover_panel_create(), UI_popup_block_ex(), UI_popup_block_invoke_ex(), ui_popup_menu_create_impl(), and UI_popup_menu_end().
| void ui_popup_block_free | ( | bContext * | C, |
| uiPopupBlockHandle * | handle ) |
Definition at line 961 of file interface_region_popup.cc.
References BKE_panel_free(), ED_workspace_status_text(), LISTBASE_FOREACH, MEM_freeN(), uiPopupBlockHandle::menuretval, ui_block_is_menu(), UI_BLOCK_KEEP_OPEN, UI_BLOCK_POPOVER, ui_popup_block_remove(), and UI_RETURN_OK.
Referenced by ui_block_open_end(), UI_popup_block_close(), ui_popup_handler(), and ui_popup_handler_remove().
|
static |
Definition at line 63 of file interface_region_popup.cc.
References uiBlock::aspect, BLI_addhead(), BLI_assert, BLI_duplicatelist(), BLI_freelistN(), BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_init_minmax(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rctf_translate(), BLI_rctf_union(), uiBut::block, uiBlock::buttons, uiBlock::content_hints, uiBlock::direction, uiBut::drawflag, ELEM, ListBase::first, uiBlock::handle, LISTBASE_FOREACH, max_ff(), uiBlock::panel, uiSafetyRct::parent, uiBlock::rect, uiBut::rect, uiBlock::saferct, uiBlock::safety, uiSafetyRct::safety, uiBut::type, UI_BLOCK_CONTAINS_SUBMENU_BUT, ui_block_to_window_rctf(), UI_BTYPE_COLOR, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, UI_BUT_ALIGN_LEFT, UI_BUT_ALIGN_TOP, ui_but_menu_draw_as_popover(), ui_but_update(), UI_DIR_ALL, UI_DIR_CENTER_X, UI_DIR_CENTER_Y, UI_DIR_DOWN, UI_DIR_LEFT, UI_DIR_RIGHT, UI_DIR_UP, UI_MENU_PADDING, UI_MENU_SUBMENU_PADDING, UI_POPUP_MENU_TOP, UI_SCALE_FAC, UI_SCREEN_MARGIN, UI_UNIT_X, UI_UNIT_Y, WM_window_native_pixel_size(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_popup_block_refresh().
| uiBlock * ui_popup_block_refresh | ( | bContext * | C, |
| uiPopupBlockHandle * | handle, | ||
| ARegion * | butregion, | ||
| uiBut * | but ) |
Called for creating new popups and refreshing existing ones.
Definition at line 628 of file interface_region_popup.cc.
References uiBlock::aspect, BLI_addhead(), BLI_assert, BLI_rctf_recenter(), BLI_rctf_size_x(), BLI_rctf_size_y(), uiBut::block, uiBlock::bounds_type, uiBlock::buttons, copy_v2_v2(), create_func(), CTX_wm_window(), uiBlock::direction, ED_region_floating_init(), ED_region_tag_redraw(), ED_region_update_rect(), ELEM, uiBlock::endblock, wmWindow::event_last_handled, wmWindow::eventstate, uiBlock::flag, PieMenuData::flags, FLT_MAX, uiBlock::handle, LISTBASE_FOREACH, max_ff(), MEM_freeN(), min_ff(), uiBlock::oldblock, uiBlock::panel, PieMenuData::pie_center_init, PieMenuData::pie_center_spawned, uiBlock::pie_data, uiBlock::rect, uiBlock::saferct, uiBlock::safety, uiSafetyRct::safety, UI_BLOCK_BOUNDS_POPUP_CENTER, ui_block_calc_pie_segment(), UI_block_end_ex(), ui_block_is_menu(), UI_BLOCK_LOOP, UI_BLOCK_NO_ACCELERATOR_KEYS, UI_BLOCK_PIE_MENU, UI_BLOCK_POPOVER, UI_BLOCK_POPUP, UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), UI_block_translate(), UI_block_update_from_old(), UI_blocklist_free_inactive(), UI_DIR_DOWN, UI_DIR_UP, ui_layout_panel_popup_scroll_apply(), UI_MENU_SCROLL_PAD, UI_PIE_INITIAL_DIRECTION, ui_popup_block_clip(), ui_popup_block_position(), ui_popup_block_scrolltest(), UI_POPUP_MARGIN, UI_POPUP_MENU_TOP, UI_RADIAL_NONE, UI_SCREEN_MARGIN, UI_UNIT_Y, UNPACK2, uiBlock::winmat, WM_window_native_pixel_size(), wmGetProjectionMatrix(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_block_region_refresh(), and ui_popup_block_create().
|
static |
Definition at line 554 of file interface_region_popup.cc.
References BLI_assert, BLI_findindex(), BLI_listbase_is_empty(), CTX_wm_area(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_screen(), CTX_wm_window(), CTX_wm_window_set(), LISTBASE_FOREACH, wmWindow::tag_cursor_refresh, ui_region_temp_remove(), wmWindowManager::windows, WM_event_timer_remove(), and WM_window_get_active_screen().
Referenced by ui_popup_block_free().
| void ui_popup_block_scrolltest | ( | uiBlock * | block | ) |
Definition at line 515 of file interface_region_popup.cc.
References uiBlock::buttons, ListBase::first, uiBlock::flag, ListBase::last, LISTBASE_FOREACH, uiBlock::rect, UI_BLOCK_CLIPBOTTOM, UI_BLOCK_CLIPTOP, UI_MENU_SCROLL_ARROW, UI_SCROLLED, rctf::ymax, and rctf::ymin.
Referenced by ui_menu_scroll_apply_offset_y(), and ui_popup_block_refresh().
Set a dummy panel in the popup block to support using layout panels, the panel is linked to the popup region so layout panels state can be persistent until the popup is closed.
Definition at line 611 of file interface_region_popup.cc.
References BKE_panel_new(), Panel_Runtime::block, LayoutPanels::clear(), PanelType::flag, Panel_Runtime::layout_panels, uiBlock::panel, PANEL_TYPE_NO_HEADER, and Panel::runtime.
Referenced by ui_paneltype_draw_impl(), wm_block_create_redo(), wm_block_dialog_create(), and wm_operator_ui_create().
Translate any popup regions (so we can drag them).
Definition at line 41 of file interface_region_popup.cc.
References BLI_rctf_init(), BLI_rctf_translate(), BLI_rcti_translate(), ED_region_tag_redraw(), ED_region_update_rect(), LISTBASE_FOREACH, and UNPACK2.
Referenced by ui_handle_menu_event().