diff options
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 4ead0b2699c..4d6cb941347 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -114,6 +114,7 @@ struct bContext; struct wmEvent; struct wmOperator; struct wmWindowManager; +struct wmDrag; #include "BLI_compiler_attrs.h" #include "DNA_listBase.h" @@ -934,6 +935,10 @@ typedef struct wmDragAsset { int import_type; /* eFileAssetImportType */ } wmDragAsset; +typedef char *(*WMDropboxTooltipFunc)(struct bContext *, + struct wmDrag *, + const struct wmEvent *event); + typedef struct wmDrag { struct wmDrag *next, *prev; @@ -949,8 +954,8 @@ typedef struct wmDrag { float scale; int sx, sy; - /** If set, draws operator name. */ - char opname[200]; + /** If filled, draws operator tooltip/operator name. */ + char tooltip[200]; unsigned int flags; /** List of wmDragIDs, all are guaranteed to have the same ID type. */ @@ -964,8 +969,8 @@ typedef struct wmDrag { typedef struct wmDropBox { struct wmDropBox *next, *prev; - /** Test if the dropbox is active, then can print optype name. */ - bool (*poll)(struct bContext *, struct wmDrag *, const wmEvent *, const char **); + /** Test if the dropbox is active. */ + bool (*poll)(struct bContext *, struct wmDrag *, const wmEvent *); /** Before exec, this copies drag info to #wmDrop properties. */ void (*copy)(struct wmDrag *, struct wmDropBox *); @@ -976,6 +981,9 @@ typedef struct wmDropBox { */ void (*cancel)(struct Main *, struct wmDrag *, struct wmDropBox *); + /** Custom tooltip shown during dragging. */ + WMDropboxTooltipFunc tooltip; + /** * If poll succeeds, operator is called. * Not saved in file, so can be pointer. |