|
Blender V4.3
|
Go to the source code of this file.
Functions | |
| void | UI_but_drag_set_id (uiBut *but, ID *id) |
| void | UI_but_drag_attach_image (uiBut *but, const ImBuf *imb, const float scale) |
| void | UI_but_drag_set_asset (uiBut *but, const blender::asset_system::AssetRepresentation *asset, int import_method, int icon, const ImBuf *imb, float scale) |
| void | UI_but_drag_set_rna (uiBut *but, PointerRNA *ptr) |
| void | UI_but_drag_set_path (uiBut *but, const char *path) |
| void | UI_but_drag_set_name (uiBut *but, const char *name) |
| void | UI_but_drag_set_image (uiBut *but, const char *path, int icon, const ImBuf *imb, float scale) |
| void | ui_but_drag_free (uiBut *but) |
| bool | ui_but_drag_is_draggable (const uiBut *but) |
| void | ui_but_drag_start (bContext *C, uiBut *but) |
Set an image to display while dragging. This works for any drag type (WM_DRAG_XXX). Not to be confused with UI_but_drag_set_image(), which sets up dragging of an image.
Sets UI_BUT_DRAG_FULL_BUT so the full button can be dragged.
Definition at line 25 of file interface_drag.cc.
References uiBut::imb, uiBut::imb_scale, UI_BUT_DRAG_FULL_BUT, and UI_but_dragflag_enable().
Referenced by file_but_enable_drag(), UI_but_drag_set_asset(), and UI_but_drag_set_image().
| void ui_but_drag_free | ( | uiBut * | but | ) |
Definition at line 88 of file interface_drag.cc.
References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, UI_BUT_DRAGPOIN_FREE, and WM_drag_data_free().
Referenced by ui_but_free().
| bool ui_but_drag_is_draggable | ( | const uiBut * | but | ) |
Definition at line 95 of file interface_drag.cc.
References uiBut::dragpoin.
Referenced by ui_but_is_interactive_ex(), ui_do_but_BLOCK(), ui_do_but_COLOR(), ui_do_but_EXIT(), ui_list_is_hovering_draggable_but(), and widget_draw_icon().
| void UI_but_drag_set_asset | ( | uiBut * | but, |
| const blender::asset_system::AssetRepresentation * | asset, | ||
| int | import_method, | ||
| int | icon, | ||
| const ImBuf * | imb, | ||
| float | scale ) |
Sets UI_BUT_DRAG_FULL_BUT so the full button can be dragged.
| asset | May be passed from a temporary variable, drag data only stores a copy of this. |
Definition at line 32 of file interface_drag.cc.
References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, UI_but_drag_attach_image(), UI_BUT_DRAGPOIN_FREE, ui_def_but_icon(), WM_DRAG_ASSET, WM_drag_create_asset_data(), and WM_drag_data_free().
Referenced by asset_view_item_but_drag_set(), and file_but_enable_drag().
Definition at line 15 of file interface_drag.cc.
References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, UI_BUT_DRAGPOIN_FREE, WM_drag_data_free(), and WM_DRAG_ID.
Referenced by asset_view_item_but_drag_set(), file_but_enable_drag(), template_add_button_search_menu(), template_ID_tabs(), and uiItemLDrag().
| void UI_but_drag_set_image | ( | uiBut * | but, |
| const char * | path, | ||
| int | icon, | ||
| const ImBuf * | imb, | ||
| float | scale ) |
Sets UI_BUT_DRAG_FULL_BUT so the full button can be dragged.
| path | The path to drag. The passed string may be destructed, button keeps a copy. |
Definition at line 81 of file interface_drag.cc.
References UI_but_drag_attach_image(), UI_but_drag_set_path(), and ui_def_but_icon().
Referenced by file_but_enable_drag().
| void UI_but_drag_set_name | ( | uiBut * | but, |
| const char * | name ) |
Definition at line 71 of file interface_drag.cc.
References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, UI_BUT_DRAGPOIN_FREE, WM_drag_data_free(), and WM_DRAG_NAME.
| void UI_but_drag_set_path | ( | uiBut * | but, |
| const char * | path ) |
Enable dragging a path from this button.
| path | The path to drag. The passed string may be destructed, button keeps a copy. |
Definition at line 61 of file interface_drag.cc.
References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, UI_BUT_DRAGPOIN_FREE, WM_drag_create_path_data(), WM_drag_data_free(), and WM_DRAG_PATH.
Referenced by file_but_enable_drag(), and UI_but_drag_set_image().
| void UI_but_drag_set_rna | ( | uiBut * | but, |
| PointerRNA * | ptr ) |
Definition at line 51 of file interface_drag.cc.
References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, ptr, UI_BUT_DRAGPOIN_FREE, WM_drag_data_free(), and WM_DRAG_RNA.
Definition at line 100 of file interface_drag.cc.
References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, ELEM, uiBut::icon, uiBut::imb, uiBut::imb_scale, UI_BUT_DRAGPOIN_FREE, WM_DRAG_ASSET, WM_DRAG_ASSET_LIST, WM_drag_data_create(), WM_DRAG_FREE_DATA, WM_DRAG_ID, WM_DRAG_NOP, WM_event_drag_image(), WM_event_start_drag(), and WM_event_start_prepared_drag().
Referenced by ui_but_drag_init().