|
Blender V4.3
|
#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_report.hh"#include "BKE_screen.hh"#include "WM_api.hh"#include "WM_types.hh"#include "UI_interface.hh"#include "interface_intern.hh"Go to the source code of this file.
Classes | |
| struct | uiPopover |
Functions | |
Popup Menu with Callback or String | |
| static void | ui_popover_create_block (bContext *C, ARegion *region, uiPopover *pup, wmOperatorCallContext opcontext) |
| static uiBlock * | ui_block_func_POPOVER (bContext *C, uiPopupBlockHandle *handle, void *arg_pup) |
| static void | ui_block_free_func_POPOVER (void *arg_pup) |
| uiPopupBlockHandle * | ui_popover_panel_create (bContext *C, ARegion *butregion, uiBut *but, uiPopoverCreateFunc popover_func, const PanelType *panel_type) |
Standard Popover Panels | |
| int | UI_popover_panel_invoke (bContext *C, const char *idname, bool keep_open, ReportList *reports) |
Popup Menu API with begin & end | |
| uiPopover * | UI_popover_begin (bContext *C, int ui_menu_width, bool from_active_button) |
| static void | popover_keymap_fn (wmKeyMap *, wmKeyMapItem *, void *user_data) |
| void | UI_popover_end (bContext *C, uiPopover *pup, wmKeyMap *keymap) |
| uiLayout * | UI_popover_layout (uiPopover *pup) |
| void | UI_popover_once_clear (uiPopover *pup) |
Pop-Over Region
interface_region_menu_popup.cc.We could even merge them, however menu logic is already over-loaded. PopOver's have the following differences.
Definition in file interface_region_popover.cc.
|
static |
Definition at line 381 of file interface_region_popover.cc.
References uiPopover::block, uiBlock::handle, uiPopupBlockHandle::menuretval, and UI_RETURN_OK.
Referenced by UI_popover_end().
|
static |
Definition at line 243 of file interface_region_popover.cc.
References uiPopover::keymap, wmWindow::modalhandlers, uiPopover::window, and WM_event_remove_keymap_handler().
Referenced by UI_popover_end(), and ui_popover_panel_create().
|
static |
Definition at line 109 of file interface_region_popover.cc.
References BLI_findindex(), BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_size_x(), uiBut::block, uiPopover::block, uiBlock::bounds_offset, uiPopover::but, uiBlock::buttons, copy_v2_v2_int(), CTX_wm_region(), uiBlock::direction, uiBlock::handle, int, uiPopover::layout, LISTBASE_FOREACH, uiBlock::minbounds, PanelType::offset_units_xy, uiPopover::panel_type, uiPopover::popover_func, uiBut::rect, RGN_ALIGN_BOTTOM, RGN_ALIGN_ENUM_FROM_MASK, RGN_TYPE_IS_HEADER_ANY, UI_block_bounds_set_normal(), UI_block_bounds_set_popup(), UI_block_direction_set(), UI_block_flag_enable(), ui_block_is_menu(), UI_block_layout_resolve(), UI_BLOCK_LOOP, UI_block_region_set(), UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), ui_block_to_window_fl(), ui_but_is_editable(), UI_DIR_CENTER_X, UI_DIR_DOWN, UI_DIR_RIGHT, UI_DIR_UP, UI_MENU_WIDTH_MIN, ui_popover_create_block(), UI_SELECT, UI_SELECT_DRAW, uiPopover::ui_size_x, UI_UNIT_X, UI_UNIT_Y, WM_OP_INVOKE_REGION_WIN, and rctf::xmin.
Referenced by UI_popover_end(), and ui_popover_panel_create().
Only return handler, and set optional title.
| from_active_button | Use the active button for positioning, use when the popover is activated from an operator instead of directly from the button. |
Definition at line 349 of file interface_region_popover.cc.
References uiPopover::block, uiPopover::but, uiPopover::butregion, CTX_wm_region(), uiBlock::handle, ui_popover_create_block(), UI_POPOVER_WIDTH_UNITS, UI_region_active_but_get(), uiPopover::ui_size_x, and WM_OP_EXEC_REGION_WIN.
Referenced by UI_popover_panel_invoke().
|
static |
| region | Optional, the region the block will be placed in. Must be set if the popover is supposed to support refreshing. |
Definition at line 79 of file interface_region_popover.cc.
References BLI_assert, uiPopover::block, uiPopover::but, uiBut::context, uiPopover::is_once, uiPopover::layout, UI_block_begin(), UI_block_flag_enable(), UI_BLOCK_KEEP_OPEN, UI_block_layout(), UI_BLOCK_POPOVER, UI_BLOCK_POPOVER_ONCE, UI_EMBOSS, UI_LAYOUT_PANEL, UI_LAYOUT_VERTICAL, uiPopover::ui_size_x, UI_style_get_dpi(), uiLayoutContextCopy(), and uiLayoutSetOperatorContext().
Referenced by ui_block_func_POPOVER(), and UI_popover_begin().
Set the whole structure to work.
Definition at line 387 of file interface_region_popover.cc.
References BLI_addhead(), BLI_remlink(), uiPopover::block, uiPopover::but, uiPopover::butregion, CTX_wm_window(), uiPopover::keymap, uiPopover::keymap_handler, wmWindow::modalhandlers, popover_keymap_fn(), UI_block_flag_disable(), UI_block_flag_enable(), ui_block_free_func_POPOVER(), ui_block_func_POPOVER(), UI_BLOCK_KEEP_OPEN, UI_BLOCK_SHOW_SHORTCUT_ALWAYS, ui_popup_block_create(), UI_popup_handlers_add(), uiPopover::window, WM_event_add_keymap_handler_priority(), WM_event_add_mousemove(), and WM_event_set_keymap_handler_post_callback().
Referenced by UI_popover_panel_invoke().
Definition at line 429 of file interface_region_popover.cc.
References uiPopover::layout.
Referenced by UI_popover_panel_invoke().
| void UI_popover_once_clear | ( | uiPopover * | pup | ) |
Definition at line 435 of file interface_region_popover.cc.
References uiPopover::is_once.
Referenced by ui_handle_menu_event().
| uiPopupBlockHandle * ui_popover_panel_create | ( | bContext * | C, |
| ARegion * | butregion, | ||
| uiBut * | but, | ||
| uiPopoverCreateFunc | popover_func, | ||
| const PanelType * | panel_type ) |
Definition at line 253 of file interface_region_popover.cc.
References uiPopover::but, CTX_wm_window(), wmWindow::eventstate, float, uiPopover::is_once, KM_PRESS, LEFTMOUSE, wmWindow::modalhandlers, uiPopover::panel_type, uiFontStyle::points, uiPopover::popover_func, ui_block_free_func_POPOVER(), ui_block_func_POPOVER(), UI_DEFAULT_TEXT_POINTS, UI_POPOVER_WIDTH_UNITS, ui_popup_block_create(), UI_popup_handlers_add(), uiPopover::ui_size_x, UI_style_get_dpi(), PanelType::ui_units_x, uiStyle::widget, and WM_event_add_mousemove().
Referenced by blender::ui::asset_shelf_popover_invoke(), ui_block_open_begin(), and UI_popover_panel_invoke().
| int UI_popover_panel_invoke | ( | bContext * | C, |
| const char * | idname, | ||
| bool | keep_open, | ||
| ReportList * | reports ) |
Definition at line 307 of file interface_region_popover.cc.
References BKE_reportf(), uiPopover::block, uiBlock::handle, OPERATOR_CANCELLED, OPERATOR_INTERFACE, OPERATOR_PASS_THROUGH, PanelType::poll, RPT_ERROR, UI_block_active_only_flagged_buttons(), ui_item_paneltype_func(), UI_paneltype_draw(), UI_popover_begin(), UI_popover_end(), UI_popover_layout(), ui_popover_panel_create(), PanelType::ui_units_x, and WM_paneltype_find().
Referenced by add_driver_button_invoke(), edit_driver_button_exec(), and wm_call_panel_exec().