108 static void txt_format_text(
SpaceText *st)
117 txt_format_line(st, linep, 0);
125 switch (formatchar) {
206 int i, j, start, end,
max, chop;
223 while (i > 0 && linep) {
227 if (linep == linein) {
239 (*offl) += lines - 1;
259 if (linep == linein && i < cursin) {
269 if (i + columns - start >
max) {
272 if (chop && linep == linein && i >= cursin) {
275 *offc -= end - start;
282 *offc -= end - start;
288 else if (
ELEM(ch,
' ',
'-')) {
291 if (linep == linein && i >= cursin) {
298 if (linep == linein) {
309 int i, j, start, end, chars,
max, chop;
333 ch = linein->
line[j];
346 if (i + columns - start >
max) {
349 if (chop && i >= cursin) {
352 *offc -= end - start;
359 *offc -= end - start;
365 else if (
ELEM(ch,
' ',
'-')) {
382 if (line[i] ==
'\t') {
392 static const char *txt_utf8_forward_columns(
const char *
str,
int columns,
int *
padding)
398 if (columns -
col < 0) {
413 static int text_draw_wrapped(
const SpaceText *st,
428 int mi, ma, mstart, mend;
429 char fmt_prev = 0xff;
449 if (i + columns > end) {
482 if (
y <= clip_min_y) {
486 else if (
ELEM(
str[mi],
' ',
'-')) {
493 for (
a = fstart, ma = mstart;
str[ma] &&
y > clip_min_y;
509 static void text_draw(
const SpaceText *st,
521 const char *in =
NULL;
537 if (maxwidth &&
w + columns > cshift + maxwidth) {
554 int a, str_shift = 0;
555 char fmt_prev = 0xff;
557 for (
a = 0;
a < amount;
a++) {
574 typedef struct DrawCache {
576 int total_lines, nlines;
579 int winx, wordwrap, showlinenrs, tabnumber;
586 int valid_head, valid_tail;
589 static void text_drawcache_init(
SpaceText *st)
591 DrawCache *drawcache =
MEM_callocN(
sizeof(DrawCache),
"text draw cache");
593 drawcache->winx = -1;
595 drawcache->text_id[0] =
'\0';
602 DrawCache *drawcache;
603 int full_update = 0, nlines = 0;
607 text_drawcache_init(st);
613 nlines = drawcache->nlines;
618 full_update |= drawcache->winx != region->
winx;
620 full_update |= drawcache->wordwrap != st->
wordwrap;
622 full_update |= drawcache->showlinenrs != st->
showlinenrs;
624 full_update |= drawcache->tabnumber != st->
tabnumber;
634 if (full_update || !drawcache->line_height) {
635 drawcache->valid_head = 0;
636 drawcache->valid_tail = 0;
637 drawcache->update_flag = 1;
640 if (drawcache->update_flag) {
642 int lineno = 0,
size, lines_count;
643 int *fp = drawcache->line_height, *new_tail, *old_tail;
646 size =
sizeof(int) * nlines;
655 drawcache->valid_tail = drawcache->valid_head = 0;
656 old_tail = fp + drawcache->nlines - drawcache->valid_tail;
657 new_tail = fp + nlines - drawcache->valid_tail;
658 memmove(new_tail, old_tail, drawcache->valid_tail);
660 drawcache->total_lines = 0;
667 if (drawcache->valid_head) {
668 lines_count = fp[lineno];
669 drawcache->valid_head--;
671 else if (lineno > new_tail - fp) {
672 lines_count = fp[lineno];
678 fp[lineno] = lines_count;
682 drawcache->total_lines += lines_count;
685 drawcache->line_height = fp;
689 if (drawcache->line_height) {
691 drawcache->line_height =
NULL;
694 if (full_update || drawcache->update_flag) {
702 drawcache->total_lines = nlines;
705 drawcache->nlines = nlines;
708 drawcache->winx = region->
winx;
718 drawcache->update_flag = 0;
719 drawcache->valid_head = 0;
720 drawcache->valid_tail = 0;
734 if (drawcache->update_flag) {
744 if (curlno < sellno) {
745 drawcache->valid_head = curlno;
746 drawcache->valid_tail = drawcache->nlines - sellno - 1;
749 drawcache->valid_head = sellno;
750 drawcache->valid_tail = drawcache->nlines - curlno - 1;
756 if (drawcache->valid_head > 0) {
757 drawcache->valid_head--;
759 if (drawcache->valid_tail > 0) {
760 drawcache->valid_tail--;
764 drawcache->valid_head = 0;
765 drawcache->valid_tail = 0;
768 drawcache->update_flag = 1;
777 if (drawcache->line_height) {
788 static int text_get_visible_lines_no(
const SpaceText *st,
int lineno)
792 return drawcache->line_height[lineno];
797 int i, j, start, end,
max, lines, chars;
818 if (i + columns - start >
max) {
820 start =
MIN2(end, i);
823 else if (
ELEM(ch,
' ',
'-')) {
856 DrawCache *drawcache;
858 text_update_drawcache(st, region);
861 return drawcache->total_lines;
868 int lhlstart, lhlend, ltexth, sell_off, curl_off;
869 short barheight, barstart, hlstart, hlend, blank_lines;
870 short pix_available, pix_top_margin, pix_bottom_margin, pix_bardiff;
872 pix_top_margin = (0.4 *
U.widget_unit);
873 pix_bottom_margin = (0.4 *
U.widget_unit);
874 pix_available = region->
winy - pix_top_margin - pix_bottom_margin;
879 back->
xmin = region->
winx - (0.6 *
U.widget_unit);
884 scroll->
xmax = region->
winx - (0.2 *
U.widget_unit);
885 scroll->
xmin = scroll->
xmax - (0.4 *
U.widget_unit);
886 scroll->
ymin = pix_top_margin;
887 scroll->
ymax = pix_available;
895 ltexth += blank_lines;
897 barheight = (ltexth > 0) ? (st->
runtime.
viewlines * pix_available) / ltexth : 0;
899 if (barheight < 20) {
900 pix_bardiff = 20 - barheight;
903 barstart = (ltexth > 0) ? ((pix_available - pix_bardiff) * st->
top) / ltexth : 0;
919 lhlstart =
MIN2(curl_off, sell_off);
920 lhlend =
MAX2(curl_off, sell_off);
923 hlstart = (lhlstart * pix_available) / ltexth;
924 hlend = (lhlend * pix_available) / ltexth;
927 if (pix_bardiff > 0) {
932 hlstart = (((pix_available - pix_bardiff) * lhlstart) / ltexth) +
936 hlstart > barstart) {
938 hlstart = barstart + barheight;
940 else if (lhlend > st->
top && lhlstart < st->
top && hlstart > barstart) {
945 if (hlend <= hlstart) {
953 hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) +
956 else if (lhlend < st->
top && hlend >= barstart - 2 && hlend < barstart + barheight) {
963 hlend = barstart + barheight;
966 if (hlend <= hlstart) {
976 if (hlend - hlstart < 2) {
1034 int boxw, boxh,
l,
x,
y ;
1036 if (!st || !st->
text) {
1101 for (p = docs; *p; p++) {
1102 if (*p ==
'\r' && *(++p) !=
'\n') {
1105 if (*p ==
' ' || *p ==
'\t') {
1108 else if (*p ==
'\n') {
1112 text_draw(st, &tdc, buf, 0, 0,
x + 4,
y - 3,
NULL);
1123 text_draw(st, &tdc, buf, 0, 0,
x + 4,
y - 3,
NULL);
1141 SuggItem *item, *first, *last, *sel;
1143 int offl, offc, vcurl, vcurc;
1144 int w, boxw = 0, boxh, i,
x,
y, *
top;
1146 const int margin_x = 2;
1158 if (!first || !last) {
1171 y = region->
winy - (vcurl + 1) * lheight - 2;
1181 if (
x + boxw > region->
winx) {
1207 for (i = 0, item = first; i < *
top && item->
next; i++, item = item->
next) {
1211 for (i = 0; i <
SUGG_LIST_SIZE && item; i++, item = item->next) {
1226 immRecti(posi,
x + margin_x,
y - 3,
x + margin_x +
w,
y + lheight - 3);
1232 text_draw(st, tdc,
str, 0, 0,
x + margin_x,
y - 1,
NULL);
1245 int vcurl, vcurc, vsell, vselc, hidden = 0;
1288 if (vcurl == vsell) {
1289 y -= vcurl * lheight;
1291 if (vcurc < vselc) {
1307 int froml, fromc, tol, toc;
1309 if (vcurl < vsell) {
1322 y -= froml * lheight;
1327 for (i = froml + 1; i < tol; i++) {
1347 y1 = region->
winy - (vsell - offl) * lheight;
1351 y2 =
y1 - (lheight * visible_lines);
1354 y1 = region->
winy - vsell * lheight;
1358 y2 =
y1 - (lheight);
1361 if (!(y1 < 0 || y2 > region->
winy)) {
1362 float highlight_color[4];
1364 highlight_color[3] = 0.1f;
1375 y = region->
winy - vsell * lheight;
1392 pos,
x,
y - lheight -
U.pixelsize,
x +
w +
U.pixelsize,
y - lheight - (3 *
U.pixelsize));
1408 int b, fc, find, stack, viewc, viewl, offl, offc,
x,
y;
1409 int startc, endc,
c;
1418 startl = text->
curl;
1419 startc = text->
curc;
1421 if (b == 0 && startc > 0) {
1447 while (c < linep->
len) {
1459 else if (b == -find) {
1469 linep = linep->
next;
1493 else if (b == -find) {
1505 linep = linep->
prev;
1508 fc = strlen(linep->
format) - 1;
1523 if (!endl || endc == -1) {
1535 ch = startl->
line[startc];
1536 wrap_offset(st, region, startl, startc, &offl, &offc);
1549 ch = endl->
line[endc];
1550 wrap_offset(st, region, endl, endc, &offl, &offc);
1573 int i,
x,
y, winx, linecount = 0, lineno = 0;
1574 int wraplinecount = 0, wrap_skip = 0;
1575 int margin_column_x;
1594 text_update_drawcache(st, region);
1602 calc_text_rcts(st, region, &scroll, &back);
1608 for (i = 0; i < st->
top && tmp; i++) {
1614 int lines = text_get_visible_lines_no(st, lineno);
1616 if (wraplinecount + lines > st->
top) {
1617 wrap_skip = st->
top - wraplinecount;
1621 wraplinecount += lines;
1662 draw_text_decoration(st, region);
1667 for (i = 0;
y > clip_min_y && i < viewlines && tmp; i++, tmp = tmp->
next) {
1687 int lines = text_draw_wrapped(st, &tdc, tmp->line,
x,
y, winx -
x, tmp->format, wrap_skip);
1702 if (margin_column_x >=
x) {
1706 float margin_color[4];
1708 margin_color[3] = 0.2f;
1711 immRecti(
pos, margin_column_x, 0, margin_column_x +
U.pixelsize, region->
winy);
1718 draw_brackets(st, &tdc, region);
1719 draw_textscroll(st, &scroll, &back);
1721 draw_suggestion_list(st, &tdc, region);
1745 int i,
x, winx = region->
winx;
1771 else if (st->
top > i) {
1784 if (x <= 0 || x > winx) {
1792 else if (
x > winx) {
1838 const int cursor_co[2],
1848 if (!line || (cursor_co[1] < 0) || (cursor_co[1] > line->
len)) {
1857 wrap_offset(st, region, line, cursor_co[1], &offl, &offc);
1866 r_pixel_co[0] = r_pixel_co[1] = -1;
struct ScrArea * CTX_wm_area(const bContext *C)
struct SpaceText * CTX_wm_space_text(const bContext *C)
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
void txt_clean_text(struct Text *text)
int txt_get_span(struct TextLine *from, struct TextLine *to)
int text_check_bracket(const char ch)
int text_find_identifier_start(const char *str, int i)
short texttool_text_is_active(struct Text *text)
SuggItem * texttool_suggest_last(void)
char * texttool_docs_get(void)
SuggItem * texttool_suggest_selected(void)
SuggItem * texttool_suggest_first(void)
int * texttool_suggest_top(void)
float BLF_fixed_width(int fontid) ATTR_WARN_UNUSED_RESULT
int BLF_draw_mono(int fontid, const char *str, size_t len, int cwidth) ATTR_NONNULL(2)
void BLF_draw(int fontid, const char *str, size_t len) ATTR_NONNULL(2)
#define BLF_DRAW_STR_DUMMY_MAX
void BLF_size(int fontid, int size, int dpi)
void BLF_position(int fontid, float x, float y, float z)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
MINLINE int integer_digits_i(const int i)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
int BLI_str_utf8_char_width_safe(const char *p) ATTR_NONNULL()
int BLI_str_utf8_size_safe(const char *p) ATTR_NONNULL()
char * BLI_str_prev_char_utf8(const char *p) ATTR_NONNULL()
size_t int BLI_str_utf8_offset_to_index(const char *str, int offset)
int BLI_str_utf8_char_width(const char *p) ATTR_NONNULL()
size_t BLI_strnlen_utf8(const char *strc, const size_t maxlen) ATTR_NONNULL()
int BLI_str_utf8_offset_to_column(const char *str, int offset)
#define STREQLEN(a, b, n)
bool ED_text_is_syntax_highlight_supported(struct Text *text)
bool ED_text_region_location_from_cursor(struct SpaceText *st, struct ARegion *region, const int cursor_co[2], int r_pixel_co[2])
void ED_text_scroll_to_cursor(struct SpaceText *st, struct ARegion *region, bool center)
NSNotificationCenter * center
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble top
@ GPU_SHADER_2D_UNIFORM_COLOR
void GPU_blend(eGPUBlend blend)
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
Group RGB to Bright Vector Camera CLAMP
void UI_draw_roundbox_corner_set(int type)
void UI_draw_roundbox_aa(const struct rctf *rect, bool filled, float rad, const float color[4])
void UI_draw_box_shadow(const struct rctf *rect, unsigned char alpha)
void UI_draw_widget_scroll(struct uiWidgetColors *wcol, const struct rcti *rect, const struct rcti *slider, int state)
void UI_GetThemeColor3fv(int colorid, float col[3])
struct bTheme * UI_GetTheme(void)
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_FontThemeColor(int fontid, int colorid)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void error(const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
static GPUContext * wrap(Context *ctx)
int line_number_display_digits
struct rcti scroll_region_select
struct rcti scroll_region_handle
SpaceText_Runtime runtime
void(* format_line)(SpaceText *st, TextLine *line, const bool do_next)
uiWidgetColors wcol_scroll
void text_pop_suggest_list(void)
static int text_font_draw(const TextDrawContext *tdc, int x, int y, const char *str)
static void text_font_end(const TextDrawContext *UNUSED(tdc))
static int text_font_draw_character(const TextDrawContext *tdc, int x, int y, char c)
struct TextDrawContext TextDrawContext
static void text_font_begin(const TextDrawContext *tdc)
static void text_draw_context_init(const SpaceText *st, TextDrawContext *tdc)
static void format_draw_color(const TextDrawContext *tdc, char formatchar)
static int text_font_draw_character_utf8(const TextDrawContext *tdc, int x, int y, const char *c)
int flatten_string(const SpaceText *st, FlattenString *fs, const char *in)
void flatten_string_free(FlattenString *fs)
TextFormatType * ED_text_format_get(Text *text)
int text_get_span_wrap(const struct SpaceText *st, struct ARegion *region, struct TextLine *from, struct TextLine *to)
#define TXT_LINE_SPACING(st)
void text_free_caches(struct SpaceText *st)
#define TXT_LINE_HEIGHT(st)
int text_get_total_lines(struct SpaceText *st, struct ARegion *region)
#define TXT_NUMCOL_WIDTH(st)
void text_update_cursor_moved(struct bContext *C)
void wrap_offset_in_line(const struct SpaceText *st, struct ARegion *region, struct TextLine *linein, int cursin, int *offl, int *offc)
void wrap_offset(const struct SpaceText *st, struct ARegion *region, struct TextLine *linein, int cursin, int *offl, int *offc)
int wrap_width(const struct SpaceText *st, struct ARegion *region)
void text_scroll_to_cursor__area(struct SpaceText *st, struct ScrArea *area, const bool center)
#define TXT_BODY_LEFT(st)
void draw_text_main(struct SpaceText *st, struct ARegion *region)
int text_get_visible_lines(const struct SpaceText *st, struct ARegion *region, const char *str)
void text_drawcache_tag_update(struct SpaceText *st, int full)
int text_get_char_pos(const struct SpaceText *st, const char *line, int cur)
void text_update_character_width(struct SpaceText *st)