Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_buttons/space_buttons.c
| Show First 20 Lines • Show All 347 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| WM_operatortype_append(BUTTONS_OT_context_menu); | WM_operatortype_append(BUTTONS_OT_context_menu); | ||||
| WM_operatortype_append(BUTTONS_OT_file_browse); | WM_operatortype_append(BUTTONS_OT_file_browse); | ||||
| WM_operatortype_append(BUTTONS_OT_directory_browse); | WM_operatortype_append(BUTTONS_OT_directory_browse); | ||||
| } | } | ||||
| static void buttons_keymap(struct wmKeyConfig *keyconf) | static void buttons_keymap(struct wmKeyConfig *keyconf) | ||||
| { | { | ||||
| wmKeyMap *keymap = WM_keymap_ensure(keyconf, "Property Editor", SPACE_BUTS, 0); | WM_keymap_ensure(keyconf, "Property Editor", SPACE_BUTS, 0); | ||||
| wmKeyMapItem *kmi; | |||||
| WM_keymap_add_item(keymap, "BUTTONS_OT_context_menu", RIGHTMOUSE, KM_PRESS, 0, 0); | |||||
| kmi = WM_keymap_add_item(keymap, "SCREEN_OT_space_context_cycle", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0); | |||||
| RNA_enum_set(kmi->ptr, "direction", SPACE_CONTEXT_CYCLE_PREV); | |||||
| kmi = WM_keymap_add_item(keymap, "SCREEN_OT_space_context_cycle", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0); | |||||
| RNA_enum_set(kmi->ptr, "direction", SPACE_CONTEXT_CYCLE_NEXT); | |||||
| } | } | ||||
| /* add handlers, stuff you only do once or on area/region changes */ | /* add handlers, stuff you only do once or on area/region changes */ | ||||
| static void buttons_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) | static void buttons_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) | ||||
| { | { | ||||
| #ifdef USE_HEADER_CONTEXT_PATH | #ifdef USE_HEADER_CONTEXT_PATH | ||||
| /* Reinsert context buttons header-type at the end of the list so it's drawn last. */ | /* Reinsert context buttons header-type at the end of the list so it's drawn last. */ | ||||
| HeaderType *context_ht = BLI_findstring(&ar->type->headertypes, "BUTTONS_HT_context", offsetof(HeaderType, idname)); | HeaderType *context_ht = BLI_findstring(&ar->type->headertypes, "BUTTONS_HT_context", offsetof(HeaderType, idname)); | ||||
| ▲ Show 20 Lines • Show All 374 Lines • Show Last 20 Lines | |||||