Blender  V3.3
BKE_text_suggestions.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 #pragma once
4 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /* ****************************************************************************
14  * Suggestions should be added in sorted order although a linear sorting method is
15  * implemented. The list is then divided up based on the prefix provided by
16  * update_suggestions:
17  *
18  * Example:
19  * Prefix: ab
20  * aaa <-- first
21  * aab
22  * aba <-- firstmatch
23  * abb <-- lastmatch
24  * baa
25  * bab <-- last
26  **************************************************************************** */
27 
28 struct Text;
29 
30 typedef struct SuggItem {
31  struct SuggItem *prev, *next;
32  char type;
33  char name[0];
35 
36 typedef struct SuggList {
40  int top;
42 
43 /* Free all text tool memory */
44 void free_texttools(void);
45 
46 /* Used to identify which Text object the current tools should appear against */
47 void texttool_text_set_active(struct Text *text);
48 void texttool_text_clear(void);
49 short texttool_text_is_active(struct Text *text);
50 
51 /* Suggestions */
52 void texttool_suggest_add(const char *name, char type);
53 void texttool_suggest_prefix(const char *prefix, int prefix_len);
54 void texttool_suggest_clear(void);
59 int *texttool_suggest_top(void);
60 
61 /* Documentation */
62 void texttool_docs_show(const char *docs);
63 char *texttool_docs_get(void);
64 void texttool_docs_clear(void);
65 
66 #ifdef __cplusplus
67 }
68 #endif
void texttool_docs_show(const char *docs)
short texttool_text_is_active(struct Text *text)
void texttool_text_clear(void)
SuggItem * texttool_suggest_last(void)
char * texttool_docs_get(void)
void texttool_suggest_prefix(const char *prefix, int prefix_len)
void texttool_suggest_select(SuggItem *sel)
void texttool_docs_clear(void)
struct SuggItem SuggItem
void texttool_suggest_add(const char *name, char type)
void texttool_text_set_active(struct Text *text)
struct SuggList SuggList
SuggItem * texttool_suggest_selected(void)
void texttool_suggest_clear(void)
SuggItem * texttool_suggest_first(void)
int * texttool_suggest_top(void)
void free_texttools(void)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
struct SuggItem * prev
struct SuggItem * next
SuggItem * first
SuggItem * firstmatch
SuggItem * selected
SuggItem * lastmatch
SuggItem * last