Blender  V3.3
Functions
interface_drag.cc File Reference
#include "UI_interface.h"
#include "WM_api.h"
#include "interface_intern.h"

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, struct ImBuf *imb, const float scale)
 
void UI_but_drag_set_asset (uiBut *but, const AssetHandle *asset, const char *path, struct AssetMetaData *metadata, int import_type, int icon, struct 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, const bool use_free)
 
void UI_but_drag_set_name (uiBut *but, const char *name)
 
void UI_but_drag_set_value (uiBut *but)
 
void UI_but_drag_set_image (uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale, const bool use_free)
 
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)
 

Function Documentation

◆ UI_but_drag_attach_image()

void UI_but_drag_attach_image ( uiBut but,
struct ImBuf imb,
float  scale 
)

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.

Definition at line 23 of file interface_drag.cc.

References uiBut::imb, and uiBut::imb_scale.

Referenced by file_draw_icon(), file_draw_preview(), UI_but_drag_set_asset(), and UI_but_drag_set_image().

◆ ui_but_drag_free()

void ui_but_drag_free ( uiBut but)

◆ ui_but_drag_is_draggable()

bool ui_but_drag_is_draggable ( const uiBut but)

◆ UI_but_drag_set_asset()

void UI_but_drag_set_asset ( uiBut but,
const AssetHandle asset,
const char *  path,
struct AssetMetaData metadata,
int  import_type,
int  icon,
struct ImBuf imb,
float  scale 
)

◆ UI_but_drag_set_id()

void UI_but_drag_set_id ( uiBut but,
ID id 
)

◆ UI_but_drag_set_image()

void UI_but_drag_set_image ( uiBut but,
const char *  path,
int  icon,
struct ImBuf imb,
float  scale,
const bool  use_free 
)

◆ UI_but_drag_set_name()

void UI_but_drag_set_name ( uiBut but,
const char *  name 
)

◆ UI_but_drag_set_path()

void UI_but_drag_set_path ( uiBut but,
const char *  path,
const bool  use_free 
)

◆ UI_but_drag_set_rna()

void UI_but_drag_set_rna ( uiBut but,
PointerRNA ptr 
)

◆ UI_but_drag_set_value()

void UI_but_drag_set_value ( uiBut but)

Value from button itself.

Definition at line 90 of file interface_drag.cc.

References uiBut::dragtype, and WM_DRAG_VALUE.

◆ ui_but_drag_start()

void ui_but_drag_start ( bContext C,
uiBut but 
)