From e68834c75bc3e69641a6332dab071ebaa2d9d1d3 Mon Sep 17 00:00:00 2001 From: Ian Thompson Date: Wed, 25 Jun 2008 13:51:54 +0000 Subject: Added UI for suggestions list. Works with arrow-keys and mouse wheel, accept with Enter, reject with Esc or click elsewhere. Mouse selection not yet supported. The script is called from the File->Text Plugins menu. Tidied python script, the C suggestions functions and fixed some bugs including suggestions not being freed properly. --- source/blender/blenkernel/BKE_suggestions.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source/blender/blenkernel/BKE_suggestions.h') diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h index bc4e18f5a67..d0f982263c0 100644 --- a/source/blender/blenkernel/BKE_suggestions.h +++ b/source/blender/blenkernel/BKE_suggestions.h @@ -57,18 +57,22 @@ typedef struct SuggItem { typedef struct SuggList { SuggItem *first, *last; SuggItem *firstmatch, *lastmatch; + SuggItem *selected; } SuggList; void free_suggestions(); -void add_suggestion(const char *name, char type); -void update_suggestions(const char *prefix); +void suggest_add(const char *name, char type); +void suggest_prefix(const char *prefix); SuggItem *suggest_first(); SuggItem *suggest_last(); -void set_suggest_text(Text *text); -void clear_suggest_text(); -short is_suggest_active(Text *text); +void suggest_set_text(Text *text); +void suggest_clear_text(); +short suggest_is_active(Text *text); + +void suggest_set_selected(SuggItem *sel); +SuggItem *suggest_get_selected(); #ifdef __cplusplus } -- cgit v1.2.3