Blender
V3.3
|
#include <WM_types.h>
Public Attributes | |
struct wmDropBox * | next |
struct wmDropBox * | prev |
bool(* | poll )(struct bContext *C, struct wmDrag *drag, const wmEvent *event) |
void(* | on_drag_start )(struct bContext *C, struct wmDrag *drag) |
void(* | copy )(struct bContext *C, struct wmDrag *drag, struct wmDropBox *drop) |
void(* | cancel )(struct Main *bmain, struct wmDrag *drag, struct wmDropBox *drop) |
void(* | draw_droptip )(struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2]) |
void(* | draw_in_view )(struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2]) |
void(* | draw_activate )(struct wmDropBox *drop, struct wmDrag *drag) |
void(* | draw_deactivate )(struct wmDropBox *drop, struct wmDrag *drag) |
void * | draw_data |
WMDropboxTooltipFunc | tooltip |
wmOperatorType * | ot |
struct IDProperty * | properties |
struct 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 1175 of file WM_types.h.
If the operator is canceled (returns OPERATOR_CANCELLED
), this can be used for cleanup of copy()
resources.
Definition at line 1193 of file WM_types.h.
Referenced by WM_dropbox_add().
Before exec, this copies drag info to #wmDrop properties.
Definition at line 1187 of file WM_types.h.
Referenced by wm_drop_prepare(), and WM_dropbox_add().
Called when poll returns true the first time.
Definition at line 1217 of file WM_types.h.
Referenced by sequencer_dropboxes_add_to_lb(), view3d_dropboxes(), and wm_drop_update_active().
void* wmDropBox::draw_data |
Custom data for drawing.
Definition at line 1223 of file WM_types.h.
Referenced by generic_drop_draw_handling(), image_drop_draw_activate(), sequencer_drop_draw_deactivate(), view3d_ob_drop_copy_external_asset(), view3d_ob_drop_draw_activate(), view3d_ob_drop_draw_deactivate(), and wm_drop_update_active().
Called when poll returns false the first time or when the drag event ends.
Definition at line 1220 of file WM_types.h.
Referenced by sequencer_dropboxes_add_to_lb(), view3d_dropboxes(), WM_drag_free(), and wm_drop_update_active().
void(* wmDropBox::draw_droptip) (struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2]) |
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 1200 of file WM_types.h.
Referenced by sequencer_dropboxes_add_to_lb(), and view3d_dropboxes().
void(* wmDropBox::draw_in_view) (struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2]) |
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 1211 of file WM_types.h.
Referenced by sequencer_dropboxes_add_to_lb().
struct wmDropBox* wmDropBox::next |
Definition at line 1176 of file WM_types.h.
Called when the drag action starts. Can be used to prefetch data for previews.
Definition at line 1184 of file WM_types.h.
Referenced by sequencer_dropboxes_add_to_lb().
wmOperatorType* wmDropBox::ot |
If poll succeeds, operator is called. Not saved in file, so can be pointer.
Definition at line 1232 of file WM_types.h.
Referenced by dropbox_tooltip(), wm_drop_prepare(), and WM_dropbox_add().
Test if the dropbox is active.
Definition at line 1179 of file WM_types.h.
Referenced by WM_dropbox_add().
struct wmDropBox * wmDropBox::prev |
Definition at line 1176 of file WM_types.h.
struct IDProperty* wmDropBox::properties |
Operator properties, assigned to ptr->data and can be written to a file.
Definition at line 1235 of file WM_types.h.
Referenced by WM_dropbox_add().
struct PointerRNA* wmDropBox::ptr |
RNA pointer to access properties.
Definition at line 1237 of file WM_types.h.
Referenced by blend_file_drop_copy(), clip_drop_copy(), dropbox_tooltip(), filepath_drop_copy(), id_drop_copy(), image_drop_copy(), 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(), path_drop_copy(), sequencer_drop_copy(), text_drop_copy(), text_drop_paste(), 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_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(), and WM_dropbox_add().
WMDropboxTooltipFunc wmDropBox::tooltip |
Custom tooltip shown during dragging.
Definition at line 1226 of file WM_types.h.
Referenced by dropbox_tooltip(), and WM_dropbox_add().