|
Blender
V2.93
|
#include <string.h>#include "MEM_guardedalloc.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "BLI_path_util.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "BKE_addon.h"#include "BKE_context.h"#include "BKE_idprop.h"#include "BKE_screen.h"#include "ED_asset.h"#include "ED_keyframing.h"#include "ED_screen.h"#include "UI_interface.h"#include "interface_intern.h"#include "RNA_access.h"#include "WM_api.h"#include "WM_types.h"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.c.
| #define USE_KEYMAP_ADD_HACK |
Definition at line 61 of file interface_context_menu.c.
|
static |
Definition at line 143 of file interface_context_menu.c.
References C, NULL, 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 220 of file interface_context_menu.c.
References BLT_I18NCONTEXT_OPERATOR_DEFAULT, but_shortcut_name_func(), C, CTX_IFACE_, CTX_wm_manager(), EVT_AKEY, g_kmi_id_hack, wmWindowManager::id, wmKeyMapItem::id, KM_PRESS, ptr, RNA_KeyMapItem, 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_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 popup_add_shortcut_func().
|
static |
Definition at line 274 of file interface_context_menu.c.
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 popup_add_shortcut_func().
Definition at line 167 of file interface_context_menu.c.
References BLI_assert, BLT_I18NCONTEXT_OPERATOR_DEFAULT, but_shortcut_name_func(), C, CTX_IFACE_, CTX_wm_manager(), EVT_TYPE_MASK_HOTKEY_EXCLUDE, EVT_TYPE_MASK_HOTKEY_INCLUDE, wmWindowManager::id, NULL, uiBut::opcontext, ptr, RNA_KeyMapItem, 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_style_get_dpi(), uiItemL(), uiItemR(), and WM_key_event_operator().
Referenced by popup_change_shortcut_func(), and ui_popup_context_menu_for_button().
|
static |
Definition at line 324 of file interface_context_menu.c.
References C, menu_add_shortcut(), menu_add_shortcut_cancel(), NULL, and UI_popup_block_ex().
Referenced by ui_popup_context_menu_for_button().
|
static |
Definition at line 295 of file interface_context_menu.c.
References C, menu_change_shortcut(), NULL, and UI_popup_block_invoke().
Referenced by ui_popup_context_menu_for_button().
|
static |
Definition at line 442 of file interface_context_menu.c.
References C, ED_screen_user_menu_ensure(), and ui_but_user_menu_add().
Referenced by ui_popup_context_menu_for_button().
|
static |
Definition at line 450 of file interface_context_menu.c.
References ED_screen_user_menu_item_remove(), and bUserMenu::items.
Referenced by ui_popup_context_menu_for_button().
|
static |
Definition at line 301 of file interface_context_menu.c.
References BLI_assert, but_shortcut_name_func(), C, EVT_TYPE_MASK_HOTKEY_EXCLUDE, EVT_TYPE_MASK_HOTKEY_INCLUDE, NULL, 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().
|
static |
Definition at line 136 of file interface_context_menu.c.
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 103 of file interface_context_menu.c.
References C, PointerRNA::data, wmOperatorType::idname, IDP_CopyProperty(), NULL, uiBut::opptr, uiBut::optype, PROP_BOOLEAN, PROP_ENUM, RNA_property_type(), uiBut::rnaprop, and shortcut_property_from_rna().
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 67 of file interface_context_menu.c.
References BLI_sprintfN(), C, IDP_AddToGroup(), IDP_GROUP, IDP_New(), IDP_NewString(), MEM_freeN, NULL, RNA_path_from_ID_to_struct(), RNA_property_identifier(), uiBut::rnapoin, uiBut::rnaprop, and WM_context_member_from_ptr().
Referenced by shortcut_get_operator_property().
Definition at line 330 of file interface_context_menu.c.
References C, NULL, uiBut::optype, PROP_BOOLEAN, RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, UI_but_menutype_get(), and WM_context_member_from_ptr().
Referenced by ui_but_user_menu_add(), and ui_popup_context_menu_for_button().
|
static |
Definition at line 458 of file interface_context_menu.c.
References BLI_assert, BLI_split_dirfile(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, CTX_IFACE_, ELEM, file, FILE_MAX, FILE_MAXDIR, FILE_MAXFILE, NULL, ot, PROP_DIRPATH, PROP_FILEPATH, ptr, RNA_property_string_get(), RNA_property_subtype(), RNA_string_set(), uiItemFullO_ptr(), UNUSED_VARS_NDEBUG, WM_OP_INVOKE_DEFAULT, and WM_operatortype_find().
Referenced by ui_popup_context_menu_for_button().
Definition at line 371 of file interface_context_menu.c.
References BLI_assert, BLI_sprintfN(), BPY_run_string_as_string(), C, PointerRNA::data, uiBut::drawstr, ED_screen_user_menu_item_add_menu(), ED_screen_user_menu_item_add_operator(), ED_screen_user_menu_item_add_prop(), uiBut::flag, bUserMenu::items, MEM_freeN, NULL, uiBut::opcontext, uiBut::opptr, uiBut::optype, RNA_path_from_ID_to_struct(), RNA_property_identifier(), RNA_string_get(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, SNPRINTF, STRNCPY, UI_BUT_HAS_SEP_CHAR, UI_but_is_tool(), ui_but_is_user_menu_compatible(), UI_but_menutype_get(), UI_SEP_CHAR, and WM_context_member_from_ptr().
Referenced by popup_user_menu_add_or_replace_func().
|
static |
Definition at line 338 of file interface_context_menu.c.
References BLI_sprintfN(), 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, MEM_freeN, NULL, uiBut::opcontext, uiBut::opptr, uiBut::optype, return(), RNA_path_from_ID_to_struct(), RNA_property_identifier(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, UI_but_menutype_get(), and WM_context_member_from_ptr().
Referenced by ui_popup_context_menu_for_button().
Definition at line 497 of file interface_context_menu.c.
References ANIM_driver_can_paste(), ID::asset_data, BKE_addon_find(), uiBut::block, BLT_I18NCONTEXT_OPERATOR_DEFAULT, BUT_GET_LABEL, C, uiBut::context, CTX_data_main(), CTX_data_pointer_get_type(), CTX_IFACE_, CTX_store_get(), CTX_store_set(), CTX_wm_region(), PointerRNA::data, ED_asset_can_make_single_from_context(), ED_screen_user_menus_find(), ED_screens_footer_tools_menu_create(), ED_screens_header_tools_menu_create(), ED_screens_navigation_bar_tools_menu_create(), ELEM, EVT_TYPE_MASK_ALL, uiBut::flag, wmOperatorType::flag, id, IFACE_, is_disabled, ISKEYBOARD, label, MEM_freeN, uiButTab::menu, menu_change_shortcut(), NULL, uiBut::opcontext, uiBut::optype, ot, PointerRNA::owner_id, popup_add_shortcut_func(), popup_change_shortcut_func(), popup_user_menu_add_or_replace_func(), popup_user_menu_remove_func(), 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_ID, RNA_NlaStrip, RNA_OVERRIDE_STATUS_OVERRIDABLE, RNA_property_animateable(), RNA_property_array_length(), RNA_property_is_idprop(), RNA_property_override_library_status(), RNA_property_path_from_ID_check(), RNA_property_subtype(), RNA_property_type(), RNA_string_set(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, shortcut_free_operator_property(), shortcut_get_operator_property(), TIP_, uiBut::type, type, wmKeyMapItem::type, PointerRNA::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_BUT_ANIMATED, UI_BUT_ANIMATED_KEY, 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_string_info_get(), ui_but_user_menu_find(), ui_jump_to_target_button_poll(), UI_menutype_draw(), UI_popup_menu_begin(), UI_popup_menu_end_or_cancel(), UI_popup_menu_layout(), ui_rna_collection_search_update_fn(), UI_UNIT_Y, uiDefBlockBut(), uiDefIconTextBut(), uiItemBooleanO(), uiItemFullO(), uiItemFullO_ptr(), uiItemMenuF(), uiItemO(), uiItemS(), uiLayoutColumn(), uiLayoutContextCopy(), uiLayoutGetBlock(), uiLayoutGetContextStore(), uiLayoutGetWidth(), uiLayoutSetContextFromBut(), uiLayoutSetEnabled(), uiLayoutSetOperatorContext(), USER_DEVELOPER_UI, w(), WM_key_event_operator(), WM_keymap_guess_opname(), WM_menutype_find(), WM_OP_EXEC_DEFAULT, WM_OP_INVOKE_DEFAULT, and WM_operatortype_find().
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 1250 of file interface_context_menu.c.
References BLI_snprintf(), uiBlock::buttons, C, CTX_wm_screen(), uiBut::drawflag, uiBut::flag, bScreen::id, IFACE_, ListBase::last, NULL, PanelType::parent, ptr, RNA_Panel, RNA_pointer_create(), Panel::type, UI_BUT_HAS_SEP_CHAR, UI_BUT_HAS_SHORTCUT, 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 217 of file interface_context_menu.c.
Referenced by menu_add_shortcut(), and menu_add_shortcut_cancel().