|
Blender V4.3
|
#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 (WM_OP_INVOKE_DEFAULT), 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 1307 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 1332 of file WM_types.hh.
Referenced by WM_dropbox_add().
Before exec, this copies drag info to #wmDrop properties.
Definition at line 1326 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 1350 of file WM_types.hh.
Referenced by generic_drop_draw_handling(), image_drop_on_enter(), sequencer_drop_on_exit(), view3d_ob_drop_copy_external_asset(), view3d_ob_drop_on_enter(), view3d_ob_drop_on_exit(), 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 1339 of file WM_types.hh.
Referenced by 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 1347 of file WM_types.hh.
Referenced by sequencer_dropboxes_add_to_lb(), and wm_drags_draw().
| wmDropBox* wmDropBox::next |
Definition at line 1308 of file WM_types.hh.
Called when the drag action starts. Can be used to prefetch data for previews.
Definition at line 1316 of file WM_types.hh.
Referenced by 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 1319 of file WM_types.hh.
Referenced by 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 1323 of file WM_types.hh.
Referenced by 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 1363 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 1361 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 1311 of file WM_types.hh.
Referenced by dropbox_active(), and WM_dropbox_add().
| wmDropBox * wmDropBox::prev |
Definition at line 1308 of file WM_types.hh.
| IDProperty* wmDropBox::properties |
Operator properties, assigned to ptr->data and can be written to a file.
Definition at line 1366 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 1368 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(), 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 1353 of file WM_types.hh.
Referenced by dropbox_tooltip(), and WM_dropbox_add().