4
* ***** BEGIN GPL LICENSE BLOCK *****
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software Foundation,
18
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
* The Original Code is Copyright (C) 2008, Blender Foundation
21
* All rights reserved.
23
* The Original Code is: all of this file.
25
* Contributor(s): none yet.
27
* ***** END GPL LICENSE BLOCK *****
29
#ifndef BKE_SUGGESTIONS_H
30
#define BKE_SUGGESTIONS_H
36
/* ****************************************************************************
37
Suggestions should be added in sorted order although a linear sorting method is
38
implemented. The list is then divided up based on the prefix provided by
49
**************************************************************************** */
53
typedef struct SuggItem {
54
struct SuggItem *prev, *next;
59
typedef struct SuggList {
60
SuggItem *first, *last;
61
SuggItem *firstmatch, *lastmatch;
66
/* Free all text tool memory */
67
void free_texttools();
69
/* Used to identify which Text object the current tools should appear against */
70
void texttool_text_set_active(Text *text);
71
void texttool_text_clear();
72
short texttool_text_is_active(Text *text);
75
void texttool_suggest_add(const char *name, char type);
76
void texttool_suggest_prefix(const char *prefix);
77
void texttool_suggest_clear();
78
SuggItem *texttool_suggest_first();
79
SuggItem *texttool_suggest_last();
80
void texttool_suggest_select(SuggItem *sel);
81
SuggItem *texttool_suggest_selected();
82
int *texttool_suggest_top();
85
void texttool_docs_show(const char *docs);
86
char *texttool_docs_get();
87
void texttool_docs_clear();