|
Blender V5.0
|
#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_screen_types.h"#include "BLI_fileops.h"#include "BLI_path_utils.hh"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_idprop.hh"#include "BKE_screen.hh"#include "ED_asset.hh"#include "ED_buttons.hh"#include "ED_keyframing.hh"#include "ED_screen.hh"#include "UI_abstract_view.hh"#include "UI_interface_layout.hh"#include "interface_intern.hh"#include "RNA_access.hh"#include "RNA_path.hh"#include "RNA_prototypes.hh"#include "WM_api.hh"#include "WM_types.hh"Go to the source code of this file.
Macros | |
| #define | USE_KEYMAP_ADD_HACK |
Functions | |
Panel Context Menu | |
| void | ui_popup_context_menu_for_panel (bContext *C, ARegion *region, Panel *panel) |
Generic context popup menus.
Definition in file interface_context_menu.cc.
| #define USE_KEYMAP_ADD_HACK |
Definition at line 52 of file interface_context_menu.cc.
|
static |
Definition at line 141 of file interface_context_menu.cc.
References C, uiBut::opcontext, shortcut_free_operator_property(), shortcut_get_operator_property(), ui_but_add_shortcut(), and WM_key_event_operator_string().
Referenced by menu_add_shortcut(), menu_change_shortcut(), and remove_shortcut_func().
Definition at line 217 of file interface_context_menu.cc.
References blender::ui::block_layout(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, but_shortcut_name_func(), C, CTX_IFACE_, CTX_wm_manager(), blender::ui::Emboss, EVT_AKEY, g_kmi_id_hack, wmKeyMapItem::id, KM_ANY, KM_PRESS, uiLayout::label(), blender::ui::Panel, params, uiLayout::prop(), ptr, RNA_pointer_create_discrete(), shortcut_get_operator_property(), U, UI_block_begin(), UI_block_bounds_set_popup(), UI_block_direction_set(), UI_block_func_handle_set(), UI_DIR_CENTER_Y, UI_ITEM_R_FULL_EVENT, UI_ITEM_R_IMMEDIATE, UI_SCALE_FAC, UI_style_get_dpi(), blender::ui::Vertical, WM_keyconfig_update(), WM_keymap_add_item(), WM_keymap_guess_opname(), WM_keymap_item_find_id(), and WM_keymap_item_properties_reset().
Referenced by ui_popup_context_menu_for_button().
|
static |
Definition at line 275 of file interface_context_menu.cc.
References C, g_kmi_id_hack, uiBut::opcontext, shortcut_free_operator_property(), shortcut_get_operator_property(), UNUSED_VARS, WM_keymap_guess_opname(), WM_keymap_item_find_id(), and WM_keymap_remove_item().
Referenced by ui_popup_context_menu_for_button().
Definition at line 165 of file interface_context_menu.cc.
References BLI_assert, blender::ui::block_layout(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, but_shortcut_name_func(), C, CTX_IFACE_, CTX_wm_manager(), blender::ui::Emboss, EVT_TYPE_MASK_HOTKEY_EXCLUDE, EVT_TYPE_MASK_HOTKEY_INCLUDE, uiLayout::label(), uiBut::opcontext, blender::ui::Panel, uiLayout::prop(), ptr, RNA_pointer_create_discrete(), shortcut_free_operator_property(), shortcut_get_operator_property(), U, UI_block_begin(), UI_block_bounds_set_popup(), UI_block_direction_set(), UI_block_flag_enable(), UI_block_func_handle_set(), UI_BLOCK_MOVEMOUSE_QUIT, UI_DIR_CENTER_Y, UI_ITEM_R_FULL_EVENT, UI_ITEM_R_IMMEDIATE, UI_SCALE_FAC, UI_style_get_dpi(), blender::ui::Vertical, and WM_key_event_operator().
Referenced by ui_popup_context_menu_for_button().
Definition at line 296 of file interface_context_menu.cc.
References BLI_assert, but_shortcut_name_func(), C, EVT_TYPE_MASK_HOTKEY_EXCLUDE, EVT_TYPE_MASK_HOTKEY_INCLUDE, uiBut::opcontext, shortcut_free_operator_property(), shortcut_get_operator_property(), U, WM_key_event_operator(), and WM_keymap_remove_item().
Referenced by ui_popup_context_menu_for_button().
Definition at line 512 of file interface_context_menu.cc.
References C, uiBut::context, uiLayout::context_copy(), uiLayout::context_store(), and CTX_store_set().
Referenced by ui_popup_context_menu_for_button().
|
static |
Definition at line 134 of file interface_context_menu.cc.
References IDP_FreeProperty().
Referenced by but_shortcut_name_func(), menu_add_shortcut_cancel(), menu_change_shortcut(), remove_shortcut_func(), and ui_popup_context_menu_for_button().
|
static |
Definition at line 77 of file interface_context_menu.cc.
References C, blender::bke::idprop::create(), blender::bke::idprop::create_group(), PointerRNA::data, wmOperatorType::idname, IDP_AddToGroup(), IDP_CopyProperty(), uiBut::opptr, uiBut::optype, PROP_BOOLEAN, PROP_ENUM, RNA_property_type(), uiBut::rnaprop, shortcut_property_from_rna(), UI_but_asset_shelf_type_idname_get(), UI_but_menutype_get(), and UI_but_paneltype_get().
Referenced by but_shortcut_name_func(), menu_add_shortcut(), menu_add_shortcut_cancel(), menu_change_shortcut(), remove_shortcut_func(), and ui_popup_context_menu_for_button().
|
static |
Definition at line 58 of file interface_context_menu.cc.
References C, blender::bke::idprop::create(), blender::bke::idprop::create_group(), IDP_AddToGroup(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, and WM_context_path_resolve_property_full().
Referenced by shortcut_get_operator_property().
Definition at line 318 of file interface_context_menu.cc.
References C, uiBut::optype, PROP_BOOLEAN, result, RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, UI_but_menutype_get(), UI_but_operatortype_get_from_enum_menu(), and WM_context_path_resolve_full().
Referenced by ui_but_user_menu_add(), and ui_popup_context_menu_for_button().
|
static |
Definition at line 468 of file interface_context_menu.cc.
References ARRAY_SIZE, BLI_assert, BLI_exists(), BLI_is_file(), BLI_path_slash_ensure(), BLI_path_split_dir_file(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, CTX_IFACE_, ELEM, FILE_MAX, FILE_MAXDIR, FILE_MAXFILE, blender::wm::InvokeDefault, uiLayout::op(), ot, PROP_DIRPATH, PROP_FILEPATH, ptr, RNA_property_string_get(), RNA_property_subtype(), RNA_string_set(), UI_ITEM_NONE, UNUSED_VARS_NDEBUG, and WM_operatortype_find().
Referenced by ui_popup_context_menu_for_button().
Definition at line 383 of file interface_context_menu.cc.
References BLI_assert, BLI_assert_unreachable, BPY_run_string_as_string(), C, PointerRNA::data, ED_screen_user_menu_item_add_menu(), ED_screen_user_menu_item_add_operator(), ED_screen_user_menu_item_add_prop(), bUserMenu::items, MEM_freeN(), uiBut::opcontext, uiBut::opptr, uiBut::optype, ot, RNA_path_property_py(), RNA_property_identifier(), RNA_property_is_idprop(), RNA_string_get(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, SNPRINTF_UTF8, uiBut::tip_quick_func, ui_but_drawstr_without_sep_char(), UI_but_is_tool(), ui_but_is_user_menu_compatible(), UI_but_menutype_get(), UI_but_operatortype_get_from_enum_menu(), WM_context_path_resolve_full(), and WM_operatortype_name().
Referenced by ui_popup_context_menu_for_button().
|
static |
Definition at line 342 of file interface_context_menu.cc.
References BLI_assert_unreachable, C, PointerRNA::data, ED_screen_user_menu_item_find_menu(), ED_screen_user_menu_item_find_operator(), ED_screen_user_menu_item_find_prop(), bUserMenu::items, uiBut::opcontext, uiBut::opptr, uiBut::optype, ot, RNA_path_property_py(), RNA_property_identifier(), RNA_property_is_idprop(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, UI_but_menutype_get(), UI_but_operatortype_get_from_enum_menu(), UNLIKELY, and WM_context_path_resolve_full().
Referenced by ui_popup_context_menu_for_button().
Definition at line 521 of file interface_context_menu.cc.
References ANIM_driver_can_paste(), uiBut::apply_func, ID::asset_data, BLI_assert, BLI_exists(), BLI_path_split_dir_part(), uiBut::block, uiLayout::block(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, blender::ui::AbstractViewItem::build_context_menu(), But, C, blender::ed::asset::can_mark_single_from_context(), uiLayout::column(), uiBut::context, uiLayout::context_set_from_but(), CTX_data_main(), CTX_data_pointer_get_type(), CTX_IFACE_, CTX_store_get(), CTX_store_set(), CTX_wm_area(), CTX_wm_region(), CTX_wm_region_popup(), PointerRNA::data, ED_buttons_navbar_menu(), ED_buttons_visible_tabs_menu(), ED_screen_user_menu_ensure(), ED_screen_user_menu_item_remove(), ED_screen_user_menus_find(), ED_screens_footer_tools_menu_create(), ED_screens_header_tools_menu_create(), ELEM, uiLayout::enabled_set(), EVT_TYPE_MASK_ALL, blender::wm::ExecDefault, FILE_MAX, FILE_MAXDIR, uiBut::flag, IFACE_, Image, blender::wm::InvokeDefault, is_disabled, ISKEYBOARD, ISNDOF_BUTTON, bUserMenu::items, Label, MEM_freeN(), uiButTab::menu, uiLayout::menu(), menu_add_shortcut(), menu_add_shortcut_cancel(), menu_change_shortcut(), uiBut::menu_create_func, uiLayout::menu_fn(), nullptr, uiLayout::op(), uiBut::opcontext, uiLayout::operator_context_set(), uiBut::opptr, uiBut::optype, ot, MenuType::poll, PROP_BOOLEAN, PROP_DIRPATH, PROP_ENUM, PROP_FILEPATH, PROP_FLOAT, PROP_INT, PROP_POINTER, PROP_STRING, ptr, ARegion::regiontype, remove_shortcut_func(), RGN_TYPE_FOOTER, RGN_TYPE_HEADER, RGN_TYPE_NAV_BAR, RGN_TYPE_TOOL_HEADER, RNA_boolean_set(), RNA_OVERRIDE_STATUS_OVERRIDABLE, RNA_property_anim_editable(), RNA_property_array_length(), RNA_property_is_idprop(), RNA_property_override_library_status(), RNA_property_path_from_ID_check(), RNA_property_string_get(), RNA_property_subtype(), RNA_property_type(), RNA_string_set(), RNA_struct_find_property(), RNA_struct_property_is_set(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, SearchMenu, uiLayout::separator(), set_layout_context_from_button(), shortcut_free_operator_property(), shortcut_get_operator_property(), SPACE_PROPERTIES, ScrArea::spacetype, Tab, TIP_, PointerRNA::type, uiBut::type, wmKeyMapItem::type, U, ui_block_is_menu(), ui_block_is_popup_any(), UI_BUT_ANIMATED, UI_BUT_ANIMATED_KEY, UI_but_context_menu_title_from_button(), UI_BUT_DISABLED, UI_BUT_DRIVEN, UI_but_flag_enable(), UI_but_func_set(), ui_but_is_user_menu_compatible(), ui_but_menu_add_path_operators(), UI_but_online_manual_id(), UI_BUT_OVERRIDDEN, ui_but_user_menu_add(), ui_but_user_menu_find(), UI_ITEM_NONE, ui_jump_to_target_button_poll(), ui_list_find_mouse_over(), ui_list_row_find_mouse_over(), UI_menutype_draw(), UI_popup_block_ex(), UI_popup_block_invoke(), UI_popup_menu_begin(), UI_popup_menu_end_or_cancel(), UI_popup_menu_layout(), ui_rna_collection_search_update_fn(), UI_UNIT_Y, ui_view_item_find_mouse_over(), uiDefBlockBut(), uiDefIconTextBut(), USER_DEVELOPER_UI, uiButViewItem::view_item, ViewItem, w(), uiLayout::width(), WM_key_event_operator(), WM_keymap_guess_opname(), WM_menutype_find(), WM_operatortype_find(), and wmEvent::xy.
Referenced by ui_do_button(), ui_screen_region_find_mouse_over_ex(), and ui_search_menu_create_context_menu().
menu to show when right clicking on the panel header
Definition at line 1293 of file interface_context_menu.cc.
References uiLayout::block(), uiBlock::buttons, C, CTX_wm_screen(), uiBut::flag, bScreen::id, IFACE_, Vector< T, InlineBufferCapacity, Allocator >::last(), PanelType::parent, uiLayout::prop(), ptr, RNA_pointer_create_discrete(), SNPRINTF_UTF8, Panel::type, UI_BUT_HAS_SEP_CHAR, UI_ITEM_NONE, UI_panel_can_be_pinned(), UI_panel_category_is_visible(), UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and UI_SEP_CHAR_S.
Referenced by ui_handler_panel_region(), and ui_screen_region_find_mouse_over_ex().
|
static |
Definition at line 214 of file interface_context_menu.cc.
Referenced by menu_add_shortcut(), and menu_add_shortcut_cancel().