|
Blender V4.3
|
#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "BLI_fileops.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_addon.h"#include "BKE_context.hh"#include "BKE_idprop.hh"#include "BKE_screen.hh"#include "ED_asset.hh"#include "ED_keyframing.hh"#include "ED_screen.hh"#include "UI_abstract_view.hh"#include "UI_interface.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 53 of file interface_context_menu.cc.
Definition at line 142 of file interface_context_menu.cc.
References 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 218 of file interface_context_menu.cc.
References BLT_I18NCONTEXT_OPERATOR_DEFAULT, but_shortcut_name_func(), CTX_IFACE_, CTX_wm_manager(), EVT_AKEY, g_kmi_id_hack, wmKeyMapItem::id, wmWindowManager::id, int, KM_ANY, KM_PRESS, params, ptr, RNA_pointer_create(), shortcut_get_operator_property(), UI_block_begin(), UI_block_bounds_set_popup(), UI_block_direction_set(), UI_block_func_handle_set(), UI_block_layout(), UI_DIR_CENTER_Y, UI_EMBOSS, UI_ITEM_R_FULL_EVENT, UI_ITEM_R_IMMEDIATE, UI_LAYOUT_PANEL, UI_LAYOUT_VERTICAL, UI_SCALE_FAC, UI_style_get_dpi(), uiItemL(), uiItemR(), 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 276 of file interface_context_menu.cc.
References 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 166 of file interface_context_menu.cc.
References BLI_assert, BLT_I18NCONTEXT_OPERATOR_DEFAULT, but_shortcut_name_func(), CTX_IFACE_, CTX_wm_manager(), EVT_TYPE_MASK_HOTKEY_EXCLUDE, EVT_TYPE_MASK_HOTKEY_INCLUDE, wmWindowManager::id, int, uiBut::opcontext, ptr, RNA_pointer_create(), shortcut_free_operator_property(), shortcut_get_operator_property(), UI_block_begin(), UI_block_bounds_set_popup(), UI_block_direction_set(), UI_block_flag_enable(), UI_block_func_handle_set(), UI_block_layout(), UI_BLOCK_MOVEMOUSE_QUIT, UI_DIR_CENTER_Y, UI_EMBOSS, UI_ITEM_R_FULL_EVENT, UI_ITEM_R_IMMEDIATE, UI_LAYOUT_PANEL, UI_LAYOUT_VERTICAL, UI_SCALE_FAC, UI_style_get_dpi(), uiItemL(), uiItemR(), and WM_key_event_operator().
Referenced by ui_popup_context_menu_for_button().
Definition at line 297 of file interface_context_menu.cc.
References BLI_assert, but_shortcut_name_func(), EVT_TYPE_MASK_HOTKEY_EXCLUDE, EVT_TYPE_MASK_HOTKEY_INCLUDE, uiBut::opcontext, shortcut_free_operator_property(), shortcut_get_operator_property(), WM_key_event_operator(), and WM_keymap_remove_item().
Referenced by ui_popup_context_menu_for_button().
Definition at line 519 of file interface_context_menu.cc.
References uiBut::context, CTX_store_set(), uiLayoutContextCopy(), and uiLayoutGetContextStore().
Referenced by ui_popup_context_menu_for_button().
|
static |
Definition at line 135 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 78 of file interface_context_menu.cc.
References 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 59 of file interface_context_menu.cc.
References IDP_AddToGroup(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, and WM_context_path_resolve_property_full().
Referenced by shortcut_get_operator_property().
Definition at line 319 of file interface_context_menu.cc.
References 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 469 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, ot, PROP_DIRPATH, PROP_FILEPATH, ptr, RNA_property_string_get(), RNA_property_subtype(), RNA_string_set(), UI_ITEM_NONE, uiItemFullO_ptr(), UNUSED_VARS_NDEBUG, WM_OP_INVOKE_DEFAULT, and WM_operatortype_find().
Referenced by ui_popup_context_menu_for_button().
Definition at line 384 of file interface_context_menu.cc.
References BLI_assert, BLI_assert_unreachable, BPY_run_string_as_string(), 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, STRNCPY, uiBut::tip_label_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 343 of file interface_context_menu.cc.
References BLI_assert_unreachable, 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 528 of file interface_context_menu.cc.
References ANIM_driver_can_paste(), uiBut::apply_func, BLI_assert, BLI_exists(), BLI_path_split_dir_part(), uiBut::block, BLT_I18NCONTEXT_OPERATOR_DEFAULT, blender::ui::AbstractViewItem::build_context_menu(), uiBut::context, CTX_data_main(), CTX_data_pointer_get_type(), CTX_IFACE_, CTX_store_get(), CTX_store_set(), CTX_wm_region(), CTX_wm_region_popup(), PointerRNA::data, 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(), ED_screens_region_flip_menu_create(), ELEM, EVT_TYPE_MASK_ALL, FILE_MAX, FILE_MAXDIR, uiBut::flag, wmOperatorType::flag, IFACE_, is_disabled, ISKEYBOARD, ISNDOF_BUTTON, bUserMenu::items, MEM_freeN(), uiButTab::menu, menu_add_shortcut(), menu_add_shortcut_cancel(), menu_change_shortcut(), uiBut::menu_create_func, uiBut::opcontext, uiBut::opptr, uiBut::optype, ot, PointerRNA::owner_id, MenuType::poll, PROP_BOOLEAN, PROP_DIRPATH, PROP_ENUM, PROP_FILEPATH, PROP_FLOAT, PROP_INT, PROP_POINTER, PROP_STRING, ptr, 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, set_layout_context_from_button(), shortcut_free_operator_property(), shortcut_get_operator_property(), TIP_, PointerRNA::type, uiBut::type, wmKeyMapItem::type, ui_block_is_menu(), ui_block_is_popup_any(), UI_BTYPE_BUT, UI_BTYPE_IMAGE, UI_BTYPE_LABEL, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TAB, UI_BTYPE_VIEW_ITEM, 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(), uiItemBooleanO(), uiItemFullO(), uiItemFullO_ptr(), uiItemM_ptr(), uiItemMenuF(), uiItemO(), uiItemS(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutGetWidth(), uiLayoutSetContextFromBut(), uiLayoutSetEnabled(), uiLayoutSetOperatorContext(), USER_DEVELOPER_UI, uiButViewItem::view_item, w(), WM_key_event_operator(), WM_keymap_guess_opname(), WM_menutype_find(), WM_OP_EXEC_DEFAULT, WM_OP_INVOKE_DEFAULT, WM_operatortype_find(), and wmEvent::xy.
Referenced by ui_do_button(), and ui_search_menu_create_context_menu().
menu to show when right clicking on the panel header
Definition at line 1420 of file interface_context_menu.cc.
References uiBlock::buttons, CTX_wm_screen(), uiBut::flag, IFACE_, ListBase::last, PanelType::parent, ptr, RNA_pointer_create(), SNPRINTF, 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(), UI_SEP_CHAR_S, uiItemR(), and uiLayoutGetBlock().
Referenced by ui_handler_panel_region().
|
static |
Definition at line 215 of file interface_context_menu.cc.
Referenced by menu_add_shortcut(), and menu_add_shortcut_cancel().