|
Blender V5.0
|
#include <WM_types.hh>
Public Attributes | |
| wmDropBox * | next |
| wmDropBox * | prev |
| bool(* | poll )(bContext *C, wmDrag *drag, const wmEvent *event) |
| void(* | on_drag_start )(bContext *C, wmDrag *drag) |
| void(* | on_enter )(wmDropBox *drop, wmDrag *drag) |
| void(* | on_exit )(wmDropBox *drop, wmDrag *drag) |
| void(* | copy )(bContext *C, wmDrag *drag, wmDropBox *drop) |
| void(* | cancel )(Main *bmain, wmDrag *drag, wmDropBox *drop) |
| void(* | draw_droptip )(bContext *C, wmWindow *win, wmDrag *drag, const int xy[2]) |
| void(* | draw_in_view )(bContext *C, wmWindow *win, wmDrag *drag, const int xy[2]) |
| void * | draw_data |
| WMDropboxTooltipFunc | tooltip |
| wmOperatorType * | ot |
| char | opname [64] |
| IDProperty * | properties |
| PointerRNA * | ptr |
Drop-boxes are like key-maps, part of the screen/area/region definition. Allocation and free is on startup and exit.
The operator is polled and invoked with the current context (blender::wm::OpCallContext::InvokeDefault), there is no way to override that (by design, since drop-boxes should act on the exact mouse position). So the drop-boxes are supposed to check the required area and region context in their poll.
Definition at line 1359 of file WM_types.hh.
If the operator is canceled (returns OPERATOR_CANCELLED), this can be used for cleanup of copy() resources.
Definition at line 1384 of file WM_types.hh.
Referenced by WM_dropbox_add().
Before exec, this copies drag info to #wmDrop properties.
Definition at line 1378 of file WM_types.hh.
Referenced by wm_drop_prepare(), and WM_dropbox_add().
| void* wmDropBox::draw_data |
Custom data for drawing.
Definition at line 1402 of file WM_types.hh.
Referenced by blender::ed::vse::generic_drop_draw_handling(), blender::ed::vse::image_drop_on_enter(), blender::ed::vse::sequencer_drop_on_exit(), view3d_collection_drop_copy_external_asset(), view3d_drop_snap_exit(), view3d_drop_snap_init(), view3d_ob_drop_copy_external_asset(), and wm_drop_update_active().
Override the default cursor overlay drawing function. Can be used to draw text or thumbnails. IE a tooltip for drag and drop.
| xy | Cursor location in window coordinates (wmEvent.xy compatible). |
Definition at line 1391 of file WM_types.hh.
Referenced by blender::ed::vse::sequencer_dropboxes_add_to_lb(), view3d_dropboxes(), and wm_drags_draw().
Called with the draw buffer (GPUViewport) set up for drawing into the region's view.
| xy | Cursor location in window coordinates (wmEvent.xy compatible). |
Definition at line 1399 of file WM_types.hh.
Referenced by blender::ed::vse::sequencer_dropboxes_add_to_lb(), and wm_drags_draw().
| wmDropBox* wmDropBox::next |
Definition at line 1360 of file WM_types.hh.
Called when the drag action starts. Can be used to prefetch data for previews.
Definition at line 1368 of file WM_types.hh.
Referenced by blender::ed::vse::sequencer_dropboxes_add_to_lb(), and wm_dropbox_invoke().
Called when poll returns true the first time. Typically used to setup some drawing data.
Definition at line 1371 of file WM_types.hh.
Referenced by blender::ed::vse::sequencer_dropboxes_add_to_lb(), view3d_dropboxes(), and wm_drop_update_active().
Called when poll returns false the first time or when the drag event ends (successful drop or canceled). Typically used to cleanup resources or end drawing.
Definition at line 1375 of file WM_types.hh.
Referenced by blender::ed::vse::sequencer_dropboxes_add_to_lb(), view3d_dropboxes(), WM_drag_free(), and wm_drop_update_active().
| char wmDropBox::opname[64] |
wmOperatorType::idname, needed for re-registration.
Definition at line 1415 of file WM_types.hh.
Referenced by WM_dropbox_add(), and wm_dropbox_item_update_ot().
| wmOperatorType* wmDropBox::ot |
If poll succeeds, operator is called. Not saved in file, so can be pointer. This may be null when the operator has been unregistered, where opname can be used to re-initialize it.
Definition at line 1413 of file WM_types.hh.
Referenced by dropbox_active(), dropbox_tooltip(), wm_drop_prepare(), WM_dropbox_add(), and wm_dropbox_item_update_ot().
Test if the dropbox is active.
Definition at line 1363 of file WM_types.hh.
Referenced by dropbox_active(), and WM_dropbox_add().
| wmDropBox * wmDropBox::prev |
Definition at line 1360 of file WM_types.hh.
| IDProperty* wmDropBox::properties |
Operator properties, assigned to ptr->data and can be written to a file.
Definition at line 1418 of file WM_types.hh.
Referenced by wm_drop_item_clear_runtime(), wm_drop_item_free_data(), WM_dropbox_add(), and wm_dropbox_item_update_ot().
| PointerRNA* wmDropBox::ptr |
RNA pointer to access properties.
Definition at line 1420 of file WM_types.hh.
Referenced by blend_file_drop_copy(), clip_drop_copy(), console_drop_id_copy(), console_drop_path_copy(), console_drop_string_copy(), drop_extension_path_copy(), drop_extension_url_copy(), drop_import_file_copy(), dropbox_tooltip(), filepath_drop_copy(), blender::ed::space_node::node_group_drop_copy(), blender::ed::space_node::node_id_drop_copy(), blender::ed::space_node::node_id_im_drop_copy(), blender::ed::space_node::node_import_file_drop_copy(), blender::ed::space_node::node_panel_drop_copy(), blender::ed::space_node::node_socket_drop_copy(), screen_drop_scene_copy(), blender::ed::vse::sequencer_drop_copy(), text_drop_id_copy(), text_drop_path_copy(), text_drop_string_copy(), UI_drop_color_copy(), ui_drop_material_copy(), ui_drop_name_copy(), view3d_collection_drop_copy_external_asset(), view3d_collection_drop_copy_local_id(), view3d_geometry_nodes_drop_copy(), view3d_geometry_nodes_drop_tooltip(), view3d_id_drop_copy(), view3d_id_drop_copy_with_type(), view3d_id_path_drop_copy(), view3d_ob_drop_copy_external_asset(), view3d_ob_drop_copy_local_id(), WM_drag_free_imported_drag_ID(), wm_drop_item_clear_runtime(), wm_drop_item_free_data(), WM_dropbox_add(), and wm_dropbox_item_update_ot().
| WMDropboxTooltipFunc wmDropBox::tooltip |
Custom tooltip shown during dragging.
Definition at line 1405 of file WM_types.hh.
Referenced by dropbox_tooltip(), and WM_dropbox_add().