Blender
V3.3
|
#include <cstring>
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BLT_translation.h"
#include "BLI_bitmap.h"
#include "BLI_blenlib.h"
#include "BLI_math_color.h"
#include "BIF_glutil.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_idtype.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#include "GHOST_C-api.h"
#include "BLO_readfile.h"
#include "ED_asset.h"
#include "ED_screen.h"
#include "GPU_shader.h"
#include "GPU_state.h"
#include "GPU_viewport.h"
#include "IMB_imbuf_types.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_event_system.h"
#include "wm_window.h"
Go to the source code of this file.
Classes | |
struct | wmDropBoxMap |
Variables | |
static ListBase | dropboxes = {nullptr, nullptr} |
Our own drag-and-drop, drag state and drop boxes.
Definition in file wm_dragdrop.cc.
|
static |
Definition at line 355 of file wm_dragdrop.cc.
References C, CTX_store_set(), CTX_wm_operator_poll_msg_get(), wmDragActiveDropState::disabled_info, wmDrag::drop_state, wmEventHandler_Dropbox::dropboxes, wmDragActiveDropState::free_disabled_info, LISTBASE_FOREACH, MEM_SAFE_FREE, wmDragActiveDropState::ui_context, wm_drop_operator_context_get(), WM_HANDLER_TYPE_DROPBOX, and WM_operator_poll_context().
Referenced by wm_dropbox_active().
|
static |
Definition at line 341 of file wm_dragdrop.cc.
References BLI_strdup(), C, wmDropBox::ot, wmDropBox::ptr, wmDropBox::tooltip, WM_operatortype_name(), and xy.
Referenced by wm_drag_draw_tooltip().
void WM_drag_add_asset_list_item | ( | wmDrag * | drag, |
const bContext * | C, | ||
const AssetLibraryReference * | asset_library_ref, | ||
const AssetHandle * | asset | ||
) |
Definition at line 719 of file wm_dragdrop.cc.
References wmDragAssetListItem::asset_data, wmDrag::asset_items, BLI_addtail(), BLI_assert, BLI_strdup(), C, ED_asset_handle_get_full_library_path(), ED_asset_handle_get_local_id(), ED_asset_handle_get_metadata(), wmDragAssetListItem::external_info, FILE_ASSET_IMPORT_APPEND, FILE_MAX_LIBEXTRA, wmDragAssetListItem::is_external, wmDragAssetListItem::local_id, wmDrag::type, WM_DRAG_ASSET_LIST, and WM_drag_create_asset_data().
Referenced by WM_drag_data_create().
Definition at line 508 of file wm_dragdrop.cc.
References BLI_addtail(), BLI_assert_msg, wmDragID::from_parent, GS, id, wmDragID::id, wmDrag::ids, LISTBASE_FOREACH, and ID::name.
Referenced by outliner_item_drag_drop_invoke(), and WM_drag_data_create().
ID* WM_drag_asset_id_import | ( | wmDragAsset * | asset_drag, |
int | flag_extra | ||
) |
flag_extra | Additional linking flags (from eFileSel_Params_Flag). |
Definition at line 608 of file wm_dragdrop.cc.
References BLI_assert, BLI_assert_unreachable, BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR, BLO_LIBLINK_APPEND_LOCAL_ID_REUSE, BLO_LIBLINK_APPEND_RECURSIVE, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), wmDragAsset::evil_C, FILE_ACTIVE_COLLECTION, FILE_ASSET_IMPORT_APPEND, FILE_ASSET_IMPORT_APPEND_REUSE, FILE_ASSET_IMPORT_LINK, FILE_AUTOSELECT, G_MAIN, wmDragAsset::id_type, wmDragAsset::import_type, wmDragAsset::name, wmDragAsset::path, scene, WM_file_append_datablock(), and WM_file_link_datablock().
Referenced by view3d_collection_drop_copy_external_asset(), view3d_ob_drop_copy_external_asset(), and WM_drag_get_local_ID_or_import_from_asset().
Definition at line 748 of file wm_dragdrop.cc.
References wmDrag::asset_items, wmDrag::type, and WM_DRAG_ASSET_LIST.
Referenced by blender::ed::asset_browser::AssetCatalogDropController::drop_assets_into_catalog(), and blender::ed::asset_browser::AssetCatalogDropController::has_droppable_asset().
Definition at line 657 of file wm_dragdrop.cc.
References FILE_ASSET_IMPORT_LINK, wmDragAsset::import_type, wmDrag::type, WM_DRAG_ASSET, and WM_drag_get_asset_data().
Referenced by view3d_ob_drop_draw_activate().
wmDragAsset* WM_drag_create_asset_data | ( | const AssetHandle * | asset, |
AssetMetaData * | metadata, | ||
const char * | path, | ||
int | import_type | ||
) |
Definition at line 561 of file wm_dragdrop.cc.
References BLI_strncpy(), ED_asset_handle_get_id_type(), ED_asset_handle_get_name(), wmDragAsset::id_type, wmDragAsset::import_type, wmDragAsset::metadata, wmDragAsset::name, and wmDragAsset::path.
Referenced by UI_but_drag_set_asset(), and WM_drag_add_asset_list_item().
wmDrag* WM_drag_data_create | ( | struct bContext * | C, |
int | icon, | ||
int | type, | ||
void * | poin, | ||
double | value, | ||
unsigned int | flags | ||
) |
Create and fill the dragging data, but don't start dragging just yet (unlike WM_event_start_drag()). Must be followed up by WM_event_start_prepared_drag(), otherwise the returned pointer will leak memory.
Note that poin should be valid allocated and not on stack.
Definition at line 177 of file wm_dragdrop.cc.
References BLI_freelistN(), BLI_strncpy(), C, CTX_data_collection_get(), CTX_wm_asset_library_ref(), FILE_MAX, wmDrag::flags, wmDrag::icon, LISTBASE_FOREACH, MEM_freeN, wmDrag::path, wmDrag::poin, type, wmDrag::type, wmDrag::value, WM_drag_add_asset_list_item(), WM_drag_add_local_ID(), WM_DRAG_ASSET, WM_DRAG_ASSET_CATALOG, WM_DRAG_ASSET_LIST, WM_DRAG_FREE_DATA, WM_DRAG_ID, and WM_DRAG_PATH.
Referenced by outliner_item_drag_drop_invoke(), ui_but_drag_start(), and WM_event_start_drag().
Definition at line 294 of file wm_dragdrop.cc.
References MEM_freeN, WM_DRAG_ASSET, and wm_drag_free_asset_data().
Referenced by ui_but_drag_free(), UI_but_drag_set_asset(), UI_but_drag_set_id(), UI_but_drag_set_image(), UI_but_drag_set_name(), UI_but_drag_set_path(), UI_but_drag_set_rna(), and WM_drag_free().
|
static |
Definition at line 938 of file wm_dragdrop.cc.
References C, wmDrag::imb, UI_DPI_FAC, UI_DPI_ICON_SIZE, UNPACK2, wm_drag_draw_icon(), wm_drag_draw_item_name(), wm_drag_draw_tooltip(), wm_drag_imbuf_icon_height_get(), wm_drag_imbuf_icon_width_get(), and xy.
Referenced by WM_drag_draw_default_fn(), and wm_drags_draw().
Definition at line 961 of file wm_dragdrop.cc.
References C, wm_drag_draw_default(), and xy.
|
static |
Definition at line 823 of file wm_dragdrop.cc.
References col, GPU_RGBA8, GPU_SHADER_2D_IMAGE_COLOR, wmDrag::icon, wmDrag::imb, wmDrag::imbuf_scale, immDrawPixelsTexSetup(), immDrawPixelsTexTiled_scaling(), padding(), ImBuf::rect, state, UI_DPI_FAC, UI_icon_draw_ex(), wm_drag_imbuf_icon_height_get(), wm_drag_imbuf_icon_width_get(), x, ImBuf::x, xy, y, and ImBuf::y.
Referenced by wm_drag_draw_default().
Definition at line 865 of file wm_dragdrop.cc.
References UI_fontstyle_draw_simple(), UI_FSTYLE_WIDGET, WM_drag_get_item_name(), x, and y.
Referenced by wm_drag_draw_default(), and WM_drag_draw_item_name_fn().
void WM_drag_draw_item_name_fn | ( | bContext * | UNUSEDC, |
wmWindow * | UNUSEDwin, | ||
wmDrag * | drag, | ||
const int | xy[2] | ||
) |
Definition at line 872 of file wm_dragdrop.cc.
References UI_DPI_FAC, wm_drag_draw_item_name(), x, xy, and y.
Referenced by view3d_dropboxes().
|
static |
Definition at line 883 of file wm_dragdrop.cc.
References wmDragActiveDropState::active_dropbox, C, CTX_wm_region(), wmDragActiveDropState::disabled_info, wmDrag::drop_state, dropbox_tooltip(), wmDrag::imb, MEM_freeN, padding(), UI_DPI_FAC, UI_DPI_ICON_SIZE, wm_drag_imbuf_icon_height_get(), wm_drag_imbuf_icon_width_get(), wm_drop_operator_draw(), wm_drop_redalert_draw(), WM_window_pixels_y(), x, xy, and y.
Referenced by wm_drag_draw_default().
Definition at line 311 of file wm_dragdrop.cc.
References wmDragActiveDropState::active_dropbox, wmDrag::asset_items, BLI_freelinkN(), BLI_freelistN(), wmDragActiveDropState::disabled_info, wmDropBox::draw_deactivate, wmDrag::drop_state, wmDrag::flags, wmDragActiveDropState::free_disabled_info, wmDrag::ids, LISTBASE_FOREACH_MUTABLE, MEM_freeN, MEM_SAFE_FREE, wmDrag::poin, wmDrag::type, wmDragActiveDropState::ui_context, WM_drag_data_free(), wm_drag_free_asset_data(), WM_DRAG_FREE_DATA, and wm_drop_ui_context_free().
Referenced by WM_drag_free_list().
|
static |
Definition at line 577 of file wm_dragdrop.cc.
References MEM_freeN, and MEM_SAFE_FREE.
Referenced by WM_drag_data_free(), and WM_drag_free().
void WM_drag_free_imported_drag_ID | ( | struct Main * | bmain, |
struct wmDrag * | drag, | ||
struct wmDropBox * | drop | ||
) |
Free asset ID imported for canceled drop.
If the asset was imported (linked/appended) using WM_drag_get_local_ID_or_import_from_asset()` (typically via a wmDropBox.copy() callback), we want the ID to be removed again if the drop operator cancels. This is for use as wmDropBox.cancel() callback.
Definition at line 686 of file wm_dragdrop.cc.
References BKE_id_free_us(), wmDragAsset::id_type, id_us_plus(), wmDropBox::ptr, wmDrag::type, WM_DRAG_ASSET, WM_drag_get_asset_data(), and WM_operator_properties_id_lookup_from_name_or_session_uuid().
Referenced by ED_dropboxes_ui(), blender::ed::space_node::node_dropboxes(), and view3d_dropboxes().
Definition at line 333 of file wm_dragdrop.cc.
References BLI_pophead(), and WM_drag_free().
Referenced by wm_close_and_free(), wm_event_custom_free(), wm_event_drag_and_drop_test(), and wm_handlers_do_intern().
wmDragAssetCatalog* WM_drag_get_asset_catalog_data | ( | const wmDrag * | drag | ) |
Definition at line 710 of file wm_dragdrop.cc.
References wmDrag::poin, wmDrag::type, and WM_DRAG_ASSET_CATALOG.
Referenced by blender::ed::asset_browser::AssetCatalogDropController::drop_asset_catalog_into_catalog(), and blender::ed::asset_browser::AssetCatalogDropController::get_drag_catalog().
wmDragAsset* WM_drag_get_asset_data | ( | const wmDrag * | drag, |
int | idcode | ||
) |
Definition at line 583 of file wm_dragdrop.cc.
References ELEM, wmDragAsset::id_type, wmDrag::poin, wmDrag::type, and WM_DRAG_ASSET.
Referenced by view3d_collection_drop_copy_external_asset(), view3d_drop_id_in_main_region_poll_get_id_type(), view3d_ob_drop_copy_external_asset(), WM_drag_asset_will_import_linked(), WM_drag_free_imported_drag_ID(), WM_drag_get_asset_meta_data(), WM_drag_get_item_name(), WM_drag_get_local_ID_or_import_from_asset(), and WM_drag_is_ID_type().
AssetMetaData* WM_drag_get_asset_meta_data | ( | const wmDrag * | drag, |
int | idcode | ||
) |
Definition at line 593 of file wm_dragdrop.cc.
References ID::asset_data, wmDragAsset::metadata, WM_drag_get_asset_data(), and WM_drag_get_local_ID().
Referenced by view3d_ob_drop_draw_activate().
const char* WM_drag_get_item_name | ( | wmDrag * | drag | ) |
Definition at line 787 of file wm_dragdrop.cc.
References BKE_idtype_idcode_to_name_plural(), BLI_listbase_count_at_most(), GS, id, wmDrag::ids, wmDragAsset::name, ID::name, wmDrag::path, wmDrag::type, WM_DRAG_ASSET, WM_drag_get_asset_data(), WM_drag_get_local_ID(), WM_DRAG_ID, WM_DRAG_NAME, and WM_DRAG_PATH.
Referenced by ui_drop_material_tooltip(), view3d_mat_drop_tooltip(), and wm_drag_draw_item_name().
Definition at line 531 of file wm_dragdrop.cc.
References ListBase::first, GS, id, wmDragID::id, wmDrag::ids, ID::name, wmDrag::type, and WM_DRAG_ID.
Referenced by id_drop_copy(), id_drop_poll(), material_drop_poll(), parent_clear_poll(), parent_drop_poll(), scene_drop_poll(), text_drop_paste(), ui_drop_name_copy(), view3d_collection_drop_copy_local_id(), view3d_drop_id_in_main_region_poll_get_id_type(), view3d_ob_drop_copy_local_id(), view3d_ob_drop_draw_activate(), WM_drag_get_asset_meta_data(), WM_drag_get_item_name(), WM_drag_get_local_ID_from_event(), WM_drag_get_local_ID_or_import_from_asset(), and WM_drag_is_ID_type().
Definition at line 546 of file wm_dragdrop.cc.
References wmEvent::custom, EVT_DATA_DRAGDROP, ListBase::first, and WM_drag_get_local_ID().
Referenced by material_drop_invoke(), parent_drop_invoke(), and scene_drop_invoke().
Definition at line 667 of file wm_dragdrop.cc.
References ELEM, wmDrag::type, WM_DRAG_ASSET, WM_drag_asset_id_import(), WM_drag_get_asset_data(), WM_drag_get_local_ID(), and WM_DRAG_ID.
Referenced by get_drag_path(), blender::ed::space_node::node_group_drop_copy(), blender::ed::space_node::node_id_drop_copy(), blender::ed::space_node::node_id_path_drop_copy(), sequencer_drop_copy(), ui_drop_material_copy(), view3d_id_drop_copy(), view3d_id_drop_copy_with_type(), and view3d_id_path_drop_copy().
|
static |
Definition at line 818 of file wm_dragdrop.cc.
References wmDrag::imb, wmDrag::imbuf_scale, round_fl_to_int(), and ImBuf::y.
Referenced by wm_drag_draw_default(), wm_drag_draw_icon(), and wm_drag_draw_tooltip().
|
static |
Definition at line 813 of file wm_dragdrop.cc.
References wmDrag::imb, wmDrag::imbuf_scale, round_fl_to_int(), and ImBuf::x.
Referenced by wm_drag_draw_default(), wm_drag_draw_icon(), and wm_drag_draw_tooltip().
Definition at line 556 of file wm_dragdrop.cc.
References WM_drag_get_asset_data(), and WM_drag_get_local_ID().
Referenced by image_drop_poll(), image_drop_preview_poll(), is_movie(), is_sound(), movie_drop_preview_poll(), blender::ed::space_node::node_collection_drop_poll(), blender::ed::space_node::node_group_drop_poll(), blender::ed::space_node::node_ima_drop_poll(), blender::ed::space_node::node_mask_drop_poll(), blender::ed::space_node::node_object_drop_poll(), sound_drop_preview_poll(), ui_drop_material_poll(), view3d_drop_id_in_main_region_poll(), and view3d_ima_drop_poll().
Called in inner handler loop, region context.
Definition at line 481 of file wm_dragdrop.cc.
References BLI_listbase_is_empty(), C, CTX_wm_manager(), CTX_wm_window(), wmWindowManager::drags, LISTBASE_FOREACH, WM_CURSOR_DEFAULT, WM_cursor_modal_set(), WM_CURSOR_STOP, and wm_drop_update_active().
Referenced by wm_event_do_region_handlers().
Called in wm_draw_window_onscreen.
Definition at line 966 of file wm_dragdrop.cc.
References blender::compositor::area(), BKE_screen_find_area_xy(), BLI_assert, C, CTX_store_set(), CTX_wm_area(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_screen(), wmWindowManager::drags, ED_area_find_region_xy_visual(), ELEM, wmWindow::eventstate, GHOST_kGrabHide, GHOST_kGrabWrap, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, wmWindow::grabcursor, LISTBASE_FOREACH, RGN_TYPE_ANY, SPACE_TYPE_ANY, ARegion::winrct, wm_cursor_position_get(), wm_drag_draw_default(), wmViewport(), wmWindowViewport(), xy, and wmEvent::xy.
Referenced by wm_draw_window_onscreen().
void wm_drags_exit | ( | wmWindowManager * | wm, |
wmWindow * | win | ||
) |
Additional work to cleanly end dragging. Additional because this doesn't actually remove the drag items. Should be called whenever dragging is stopped (successful or not, also when canceled).
Definition at line 244 of file wm_dragdrop.cc.
References wmWindowManager::drags, LISTBASE_FOREACH, wmWindow::tag_cursor_refresh, WM_cursor_modal_restore(), and WM_event_add_mousemove().
Referenced by wm_drop_prepare(), wm_event_drag_and_drop_test(), and wm_handlers_do_intern().
Definition at line 476 of file wm_dragdrop.cc.
References C, and CTX_store_set().
Referenced by wm_handlers_do_intern().
wmOperatorCallContext wm_drop_operator_context_get | ( | const wmDropBox * | UNUSEDdrop | ) |
Definition at line 501 of file wm_dragdrop.cc.
References WM_OP_INVOKE_DEFAULT.
Referenced by dropbox_active(), wm_drop_prepare(), and wm_handlers_do_intern().
|
static |
Definition at line 759 of file wm_dragdrop.cc.
References uiWidgetColors::inner, rgba_uchar_to_float(), uiWidgetColors::text, bTheme::tui, UI_fontstyle_draw_simple_backdrop(), UI_FSTYLE_WIDGET, UI_GetTheme(), ThemeUI::wcol_tooltip, x, and y.
Referenced by wm_drag_draw_tooltip().
Definition at line 458 of file wm_dragdrop.cc.
References C, wmDropBox::copy, CTX_store_set(), CTX_wm_manager(), CTX_wm_window(), wmDrag::drop_state, wmDropBox::ot, wmDragActiveDropState::ui_context, wm_drags_exit(), wm_drop_operator_context_get(), and WM_operator_poll_context().
Referenced by wm_handlers_do_intern().
|
static |
Definition at line 774 of file wm_dragdrop.cc.
References uiWidgetColors::inner, rgba_uchar_to_float(), TH_REDALERT, bTheme::tui, UI_fontstyle_draw_simple_backdrop(), UI_FSTYLE_WIDGET, UI_GetTheme(), UI_GetThemeColor4fv(), ThemeUI::wcol_tooltip, x, and y.
Referenced by wm_drag_draw_tooltip().
|
static |
Definition at line 264 of file wm_dragdrop.cc.
References C, CTX_store_copy(), CTX_wm_region(), UI_but_context_get(), and UI_region_active_but_get().
Referenced by wm_drop_update_active().
|
static |
Definition at line 279 of file wm_dragdrop.cc.
References CTX_store_free().
Referenced by WM_drag_free(), and wm_drop_update_active().
Update dropping information for the current mouse position in event.
Definition at line 422 of file wm_dragdrop.cc.
References wmDragActiveDropState::active_dropbox, wmDragActiveDropState::area_from, BLI_assert, C, CTX_wm_area(), CTX_wm_region(), CTX_wm_window(), wmDropBox::draw_activate, wmDropBox::draw_data, wmDropBox::draw_deactivate, wmDrag::drop_state, wmDragActiveDropState::region_from, wmDragActiveDropState::ui_context, wm_drop_ui_context_create(), wm_drop_ui_context_free(), wm_dropbox_active(), WM_window_pixels_x(), WM_window_pixels_y(), and wmEvent::xy.
Referenced by wm_drags_check_ops().
Definition at line 404 of file wm_dragdrop.cc.
References blender::compositor::area(), C, CTX_wm_area(), CTX_wm_region(), CTX_wm_window(), dropbox_active(), ARegion::handlers, and wmWindow::handlers.
Referenced by wm_drop_update_active().
wmDropBox* WM_dropbox_add | ( | ListBase * | lb, |
const char * | idname, | ||
bool(*)(bContext *, wmDrag *, const wmEvent *) | poll, | ||
void(*)(bContext *, wmDrag *, wmDropBox *) | copy, | ||
void(*)(Main *, wmDrag *, wmDropBox *) | cancel, | ||
WMDropboxTooltipFunc | tooltip | ||
) |
Definition at line 95 of file wm_dragdrop.cc.
References BLI_addtail(), wmDropBox::cancel, copy(), wmDropBox::copy, wmDropBoxMap::idname, MEM_freeN, wmDropBox::ot, wmDropBox::poll, wmDropBox::properties, wmDropBox::ptr, wmDropBox::tooltip, WM_operator_properties_alloc(), and WM_operatortype_find().
Referenced by clip_dropboxes(), console_dropboxes(), ED_dropboxes_ui(), ED_keymap_screen(), file_dropboxes(), image_dropboxes(), blender::ed::space_node::node_dropboxes(), outliner_dropboxes(), sequencer_dropboxes_add_to_lb(), sequencer_preview_dropboxes_add_to_lb(), text_dropboxes(), and view3d_dropboxes().
Definition at line 121 of file wm_dragdrop.cc.
References BLI_freelistN(), dropboxes, LISTBASE_FOREACH, MEM_freeN, and WM_operator_properties_free().
Referenced by WM_exit_ex().
Definition at line 139 of file wm_dragdrop.cc.
References blender::compositor::area(), BLI_assert, C, CTX_store_set(), CTX_wm_manager(), wmDrag::drop_state, dropboxes, ED_screen_areas_iter, LISTBASE_FOREACH, RGN_TYPE_NUM, SPACE_TYPE_NUM, wmDragActiveDropState::ui_context, wmWindowManager::windows, and WM_window_get_active_screen().
Referenced by WM_event_start_prepared_drag().
ListBase* WM_dropboxmap_find | ( | const char * | idname, |
int | spaceid, | ||
int | regionid | ||
) |
spaceid
/ regionid
are zero for window drop maps.
Definition at line 76 of file wm_dragdrop.cc.
References BLI_addtail(), BLI_strncpy(), dropboxes, wmDropBoxMap::dropboxes, wmDropBoxMap::idname, KMAP_MAX_NAME, LISTBASE_FOREACH, wmDropBoxMap::regionid, wmDropBoxMap::spaceid, and STREQLEN.
Referenced by clip_dropboxes(), clip_init(), console_dropboxes(), console_main_region_init(), ed_default_handlers(), ED_dropboxes_ui(), ED_keymap_screen(), file_dropboxes(), image_dropboxes(), image_init(), blender::ed::space_node::node_dropboxes(), blender::ed::space_node::node_main_region_init(), outliner_dropboxes(), outliner_main_region_init(), sequencer_dropboxes(), sequencer_main_region_init(), sequencer_preview_region_init(), text_dropboxes(), text_main_region_init(), view3d_dropboxes(), view3d_main_region_init(), and wm_window_ghostwindow_ensure().
Definition at line 288 of file wm_dragdrop.cc.
References wmDrag::imb, and wmDrag::imbuf_scale.
Referenced by ui_but_drag_start().
void WM_event_start_drag | ( | struct bContext * | C, |
int | icon, | ||
int | type, | ||
void * | poin, | ||
double | value, | ||
unsigned int | flags | ||
) |
Start dragging immediately with the given data. Note that poin should be valid allocated and not on stack.
Definition at line 237 of file wm_dragdrop.cc.
References C, type, WM_drag_data_create(), and WM_event_start_prepared_drag().
Referenced by blender::ui::ViewItemAPIWrapper::drag_start(), ghost_event_proc(), ui_but_drag_init(), and ui_but_drag_start().
Invoke dragging using the given drag data.
Definition at line 229 of file wm_dragdrop.cc.
References BLI_addtail(), C, CTX_wm_manager(), wmWindowManager::drags, and wm_dropbox_invoke().
Referenced by outliner_item_drag_drop_invoke(), ui_but_drag_start(), and WM_event_start_drag().
|
static |
Definition at line 60 of file wm_dragdrop.cc.
Referenced by ed_default_handlers(), wm_dropbox_free(), wm_dropbox_invoke(), WM_dropboxmap_find(), and WM_event_add_dropbox_handler().