71 else if (!
ELEM(c,
'\t',
' ')) {
72 *r_last_state =
false;
109 const int line1_char,
111 const int line2_char)
119 if (
txt_get_span(line1, line2) > 0 || (line1 == line2 && line1_char <= line2_char)) {
122 start_char = line1_char;
123 end_char = line2_char;
128 start_char = line2_char;
129 end_char = line1_char;
132 for (
const TextLine *line = start_line; line != end_line->
next; line = line->
next) {
133 const int start = (line == start_line) ? start_char : 0;
134 const int end = (line == end_line) ? end_char : line->len;
136 for (
int i = start; i < end; i++) {
137 if (!
ELEM(line->line[i],
' ',
'\t',
'\n')) {
155 bool line_start =
true;
158 for (
int in_offset = 0; in_buf[in_offset]; in_offset++) {
162 if (in_buf[in_offset] ==
'\t' && line_start) {
168 const int out_size = strlen(in_buf) + num_tabs * (tab_size - 1) + 1;
169 char *out_buf =
static_cast<char *
>(
MEM_mallocN(out_size *
sizeof(
char), __func__));
172 int spaces_until_tab = 0;
176 for (
int in_offset = 0; in_buf[in_offset]; in_offset++) {
180 if (in_buf[in_offset] ==
'\t' && line_start) {
182 int num_spaces = tab_size - (spaces_until_tab % tab_size);
183 spaces_until_tab = 0;
186 memset(&out_buf[out_offset],
' ', num_spaces);
187 out_offset += num_spaces;
190 if (in_buf[in_offset] ==
' ') {
193 else if (in_buf[in_offset] ==
'\n') {
194 spaces_until_tab = 0;
197 out_buf[out_offset++] = in_buf[in_offset];
201 out_buf[out_offset] =
'\0';
202 *r_out_buf_len = out_offset;
209 return (x + (st->
runtime->cwidth_px / 2)) / st->
runtime->cwidth_px;
221 if (buf ==
nullptr) {
354 st->
runtime->scroll_ofs_px[0] = 0;
355 st->
runtime->scroll_ofs_px[1] = 0;
435 st->
runtime->scroll_ofs_px[0] = 0;
436 st->
runtime->scroll_ofs_px[1] = 0;
489 ot->
srna,
"internal",
false,
"Make Internal",
"Make text file internal after loading");
505 const int orig_top = st->
top;
506 const int orig_curl =
BLI_findindex(&text->lines, text->curl);
507 const int orig_curc = text->curc;
511 if (text->filepath ==
nullptr) {
522 if (text->compiled) {
532 text->flags &= ~TXT_ISDIRTY;
547 IFACE_(
"Reload active text file?"),
559 ot->
description =
"Reload active text data-block from its file";
588 st->
text =
static_cast<Text *
>(text->id.prev);
591 else if (text->id.next) {
592 st->
text =
static_cast<Text *
>(text->id.next);
609 IFACE_(
"Delete active text file?"),
655 ot->
name =
"Make Internal";
656 ot->
idname =
"TEXT_OT_make_internal";
679 if (text->filepath ==
nullptr) {
684 STRNCPY(filepath, text->filepath);
690 reports,
RPT_ERROR,
"Cannot save text file, path \"%s\" is not writable", filepath);
698 "Unable to save '%s': %s",
700 errno ? strerror(errno) :
RPT_(
"unknown error writing file"));
705 fputs(tmp->line, fp);
714 text->mtime = st.st_mtime;
723 "Unable to stat '%s': %s",
725 errno ? strerror(errno) :
RPT_(
"unknown error statting file"));
728 text->flags &= ~TXT_ISDIRTY;
749 if (text->filepath ==
nullptr || (text->flags &
TXT_ISMEM)) {
787 if (text->filepath) {
791 text->flags &= ~TXT_ISMEM;
810 const char *filepath;
811 if (text->filepath) {
812 filepath = text->filepath;
815 filepath = text->id.name + 2;
859 const bool is_live = (reports ==
nullptr);
862 void *curl_prev = text->curl;
863 int curc_prev = text->curc;
864 int selc_prev = text->selc;
878 if (text->curl != curl_prev || curc_prev != text->curc || selc_prev != text->selc) {
947 if (data->text == text) {
958 if (data->text == text) {
978 ot->
name =
"Refresh PyConstraints";
979 ot->
idname =
"TEXT_OT_refresh_pyconstraints";
1057 "Paste text selected elsewhere rather than copied (X11/Wayland only)");
1088 ot->
name =
"Duplicate Line";
1089 ot->
idname =
"TEXT_OT_duplicate_line";
1197 bool text_before_cursor = text->curc != 0 && !
ELEM(line->line[text->curc - 1],
' ',
'\t');
1198 if (text_before_cursor && (
txt_has_sel(text) ==
false)) {
1210 ot->
name =
"Indent or Autocomplete";
1211 ot->
idname =
"TEXT_OT_indent_or_autocomplete";
1329 for (a = 0; a < curts; a++) {
1339 if (text->curl->prev) {
1412 {0,
"TOGGLE", 0,
"Toggle Comments",
nullptr},
1413 {1,
"COMMENT", 0,
"Comment",
nullptr},
1414 {-1,
"UNCOMMENT", 0,
"Un-Comment",
nullptr},
1415 {0,
nullptr, 0,
nullptr,
nullptr},
1419 ot->
name =
"Toggle Comments";
1420 ot->
idname =
"TEXT_OT_comment_toggle";
1431 prop =
RNA_def_enum(
ot->
srna,
"type", comment_items, 0,
"Type",
"Add or remove comments");
1443 {
TO_SPACES,
"SPACES", 0,
"To Spaces",
nullptr},
1444 {
TO_TABS,
"TABS", 0,
"To Tabs",
nullptr},
1445 {0,
nullptr, 0,
nullptr,
nullptr},
1453 size_t a, j, max_len = 0;
1456 const int curc_column = text->curl ?
1458 text->curl->line, text->curl->len, text->curc,
TXT_TABSIZE) :
1460 const int selc_column = text->sell ?
1462 text->sell->line, text->sell->len, text->selc,
TXT_TABSIZE) :
1482 tmp->line = new_line;
1483 tmp->len = strlen(new_line);
1484 tmp->format =
nullptr;
1485 if (tmp->len > max_len) {
1491 char *tmp_line =
static_cast<char *
>(
MEM_mallocN(
sizeof(*tmp_line) * (max_len + 1), __func__));
1494 const char *text_check_line = tmp->line;
1495 const int text_check_line_len = tmp->len;
1496 char *tmp_line_cur = tmp_line;
1501 for (a = 0; a < text_check_line_len;) {
1503 if (!(a % tab_len) && (text_check_line[a] ==
' ')) {
1506 (j < tab_len) && (a + j < text_check_line_len) && (text_check_line[a + j] ==
' ');
1514 if ((tmp_line_cur == tmp_line) && a != 0) {
1516 memcpy(tmp_line_cur, text_check_line, a);
1519 *tmp_line_cur =
'\t';
1524 if (tmp_line_cur != tmp_line) {
1525 memcpy(tmp_line_cur, &text_check_line[a], j);
1533 if (tmp_line_cur != tmp_line) {
1534 memcpy(tmp_line_cur, &text_check_line[a],
len);
1535 tmp_line_cur +=
len;
1541 if (tmp_line_cur != tmp_line) {
1542 *tmp_line_cur =
'\0';
1545 BLI_assert(tmp_line_cur - tmp_line <= max_len);
1558 tmp->len = strlen(tmp_line);
1560 tmp->format =
nullptr;
1567 if (curc_column != -1) {
1569 text->curl->line, text->curl->len, curc_column,
TXT_TABSIZE);
1571 if (selc_column != -1) {
1573 text->sell->line, text->sell->len, selc_column,
TXT_TABSIZE);
1587 ot->
name =
"Convert Whitespace";
1588 ot->
idname =
"TEXT_OT_convert_whitespace";
1604 "Type of whitespace to convert to");
1662 ot->
name =
"Select Line";
1663 ot->
idname =
"TEXT_OT_select_line";
1682 text->curl->line, text->curl->len, text->selc, &text->curc, &text->selc);
1695 ot->
name =
"Select Word";
1696 ot->
idname =
"TEXT_OT_select_word";
1735 {0,
nullptr, 0,
nullptr,
nullptr},
1741 ot->
description =
"Move the currently selected line(s) up/down";
1761 {
LINE_BEGIN,
"LINE_BEGIN", 0,
"Line Begin",
""},
1762 {
LINE_END,
"LINE_END", 0,
"Line End",
""},
1763 {
FILE_TOP,
"FILE_TOP", 0,
"File Top",
""},
1764 {
FILE_BOTTOM,
"FILE_BOTTOM", 0,
"File Bottom",
""},
1765 {
PREV_CHAR,
"PREVIOUS_CHARACTER", 0,
"Previous Character",
""},
1766 {
NEXT_CHAR,
"NEXT_CHARACTER", 0,
"Next Character",
""},
1767 {
PREV_WORD,
"PREVIOUS_WORD", 0,
"Previous Word",
""},
1768 {
NEXT_WORD,
"NEXT_WORD", 0,
"Next Word",
""},
1769 {
PREV_LINE,
"PREVIOUS_LINE", 0,
"Previous Line",
""},
1770 {
NEXT_LINE,
"NEXT_LINE", 0,
"Next Line",
""},
1771 {
PREV_PAGE,
"PREVIOUS_PAGE", 0,
"Previous Page",
""},
1772 {
NEXT_PAGE,
"NEXT_PAGE", 0,
"Next Page",
""},
1773 {0,
nullptr, 0,
nullptr,
nullptr},
1782 int i, j, start, end,
max, curs, endj, selc;
1783 bool chop, loop, found;
1788 selc = start = endj = curs = found =
false;
1797 ch = linein->
line[j];
1807 if (rell == 0 && i - start <= relc && i + columns - start > relc) {
1813 else if (i - end <= relc && i + columns - end > relc) {
1816 if (i + columns - start > max) {
1817 end = std::min(end, i);
1822 if (selc > endj && !chop) {
1838 if (rell == 0 && i + columns - start > relc) {
1844 else if (ch ==
'\0') {
1851 else if (
ELEM(ch,
' ',
'-')) {
1857 if (rell == 0 && i + columns - start > relc) {
1881 int offl, offc, visible_lines;
1891 if (*rell - visible_lines + offl >= 0) {
1892 if (!(*linep)->next) {
1893 if (offl < visible_lines - 1) {
1894 *rell = visible_lines - 1;
1898 *charp = (*linep)->len;
1902 *rell -= visible_lines - offl;
1903 *linep = (*linep)->
next;
1911 if (*rell + offl <= 0) {
1912 if (!(*linep)->prev) {
1923 *linep = (*linep)->
prev;
1936 if (*rell + visible_lines >= 0) {
1937 *rell += visible_lines;
1941 if (!(*linep)->prev) {
1946 *rell += visible_lines;
1947 *linep = (*linep)->
prev;
1950 if (*rell - visible_lines < 0) {
1954 if (!(*linep)->next) {
1955 *rell = visible_lines - 1;
1959 *rell -= visible_lines;
1960 *linep = (*linep)->
next;
1972 int oldc, i, j,
max, start, end, endj;
1979 linep = &text->sell;
1980 charp = &text->selc;
1983 linep = &text->curl;
1984 charp = &text->curc;
2001 ch = (*linep)->line[j];
2011 if (i + columns - start > max) {
2012 end = std::min(end, i);
2019 (*linep)->line, (*linep)->len, start,
TXT_TABSIZE);
2033 else if (
ELEM(ch,
' ',
'-',
'\0')) {
2036 (*linep)->line, (*linep)->len, start,
TXT_TABSIZE);
2059 int oldc, i, j,
max, start, end, endj;
2066 linep = &text->sell;
2067 charp = &text->selc;
2070 linep = &text->curl;
2071 charp = &text->curc;
2088 ch = (*linep)->line[j];
2098 if (i + columns - start > max) {
2099 end = std::min(end, i);
2107 *charp = (*linep)->len;
2120 else if (ch ==
'\0') {
2121 *charp = (*linep)->len;
2125 else if (
ELEM(ch,
' ',
'-')) {
2144 int offl, offc,
col;
2149 linep = &text->sell;
2150 charp = &text->selc;
2153 linep = &text->curl;
2154 charp = &text->curc;
2163 if ((*linep)->prev) {
2166 *linep = (*linep)->
prev;
2185 int offl, offc,
col, visible_lines;
2190 linep = &text->sell;
2191 charp = &text->selc;
2194 linep = &text->curl;
2195 charp = &text->curc;
2201 if (offl < visible_lines - 1) {
2205 if ((*linep)->next) {
2206 *linep = (*linep)->
next;
2210 *charp = (*linep)->len;
2233 linep = &text->sell;
2234 charp = &text->selc;
2237 linep = &text->curl;
2238 charp = &text->curc;
2241 if (st && region && st->
wordwrap) {
2250 while (lines > 0 && (*linep)->next) {
2251 *linep = (*linep)->
next;
2254 while (lines < 0 && (*linep)->prev) {
2255 *linep = (*linep)->
prev;
2260 if (*charp > (*linep)->len) {
2261 *charp = (*linep)->
len;
2285 if (st && st->
wordwrap && region) {
2297 if (st && st->
wordwrap && region) {
2348 if (st && st->
wordwrap && region) {
2357 if (st && st->
wordwrap && region) {
2404 ot->
name =
"Move Cursor";
2432 ot->
name =
"Move Select";
2433 ot->
idname =
"TEXT_OT_move_select";
2446 "Where to move cursor to, to make a selection");
2460 static_cast<TextLine *
>(text->lines.last)) +
2466 else if (line > nlines) {
2498 ot->
srna,
"line", 1, 1, INT_MAX,
"Line",
"Line number to jump to", 1, 10000);
2510 {
DEL_PREV_CHAR,
"PREVIOUS_CHARACTER", 0,
"Previous Character",
""},
2513 {0,
nullptr, 0,
nullptr,
nullptr},
2550 text->sell = text->curl;
2551 text->selc = text->curc - tabsize;
2557 const char *curr = text->curl->line + text->curc;
2558 if (*curr !=
'\0') {
2560 if ((curr != prev) &&
2583 text->sell = text->curl;
2584 text->selc = text->curc + tabsize;
2627 "Which part of the text to delete");
2651 ot->
name =
"Toggle Overwrite";
2652 ot->
idname =
"TEXT_OT_overwrite_toggle";
2674 last = last - (st->
runtime->viewlines / 2);
2675 if (last > 0 && st->
top > last) {
2757 const int mval[2] = {
event->xy[0],
event->xy[1]};
2782 for (
int i = 0; i < 2; i += 1) {
2791 int scroll_ofs_new[2] = {
2795 int scroll_ofs_px_new[2] = {
2800 for (
int i = 0; i < 2; i += 1) {
2802 while (scroll_ofs_px_new[i] < 0) {
2804 scroll_ofs_new[i] -= 1;
2808 if (scroll_ofs_new[i] < 0) {
2809 scroll_ofs_new[i] = 0;
2810 scroll_ofs_px_new[i] = 0;
2814 scroll_ofs_px_new[i] = 0;
2820 scroll_ofs_new[0] = 0;
2821 scroll_ofs_px_new[0] = 0;
2825 if (scroll_ofs_new[0] != st->
left || scroll_ofs_new[1] != st->
top ||
2828 scroll_ofs_px_new[1] != st->
runtime->scroll_ofs_px[1])
2831 st->
left = scroll_ofs_new[0];
2832 st->
top = scroll_ofs_new[1];
2833 st->
runtime->scroll_ofs_px[0] = scroll_ofs_px_new[0];
2834 st->
runtime->scroll_ofs_px[1] = scroll_ofs_px_new[1];
2847 st->
flags &= ~ST_SCROLL_SELECT;
2853 st->
runtime->scroll_ofs_px[0] = 0;
2854 st->
runtime->scroll_ofs_px[1] = 0;
2866 switch (event->
type) {
2923 tsc->
mval_delta[0] = (
event->xy[0] -
event->prev_xy[0]) * st->
runtime->cwidth_px / 4;
2924 tsc->
mval_delta[1] = (
event->xy[1] -
event->prev_xy[1]) * st->
runtime->lheight_px / 4;
2958 ot->
srna,
"lines", 1, INT_MIN, INT_MAX,
"Lines",
"Number of lines to scroll", -100, 100);
2991 const int *mval =
event->mval;
2999 if (mval[0] > st->
runtime->scroll_region_handle.xmin &&
3000 mval[0] < st->
runtime->scroll_region_handle.xmax)
3002 if (mval[1] >= st->
runtime->scroll_region_handle.ymin &&
3003 mval[1] <= st->
runtime->scroll_region_handle.ymax)
3009 if (mval[1] < st->
runtime->scroll_region_handle.ymin) {
3067 ot->
srna,
"lines", 1, INT_MIN, INT_MAX,
"Lines",
"Number of lines to scroll", -100, 100);
3100 while (*(
str + j)) {
3103 if (i +
col > index) {
3125 for (i = -st->
top; i <= *y && linep; linep = linep->
next, i += lines) {
3128 if (i + lines > *y) {
3150 int i = 0, start = 0, end =
max;
3151 int j, curs = 0, endj = 0;
3155 for (j = 0; !found && ((ch = linep->
line[j]) !=
'\0');
3179 if (y == 0 && i - start <= x && i + columns - start > x) {
3186 else if (i - end <= x && i + columns - end > x) {
3189 if (i + columns - start > max) {
3190 end = std::min(end, i);
3195 if (charp > endj && !chop && ch !=
'\0') {
3207 if (j < linep->
len) {
3212 if (y == 0 && i + columns - start > x) {
3218 else if (
ELEM(ch,
' ',
'-',
'\0')) {
3223 if (y == 0 && i + columns - start > x) {
3286 linep = &text->sell;
3287 charp = &text->selc;
3290 linep = &text->curl;
3291 charp = &text->curc;
3298 if ((*linep)->next) {
3299 *linep = (*linep)->
next;
3305 if ((*linep)->prev) {
3306 *linep = (*linep)->
prev;
3316 *charp = (*linep)->len;
3326 if (ssel->
timer ==
nullptr) {
3342 ssel->
timer =
nullptr;
3351 if (event->
mval[1] < 0 || event->
mval[1] > region->winy) {
3360 else if (!st->
wordwrap && (event->
mval[0] < 0 || event->
mval[0] > region->winx)) {
3365 st, region, std::clamp(event->
mval[0], 0,
int(region->winx)), event->
mval[1],
true);
3403 if (event->
mval[0] >= st->
runtime->scroll_region_handle.xmin) {
3425 switch (event->
type) {
3448 ot->
name =
"Set Selection";
3449 ot->
idname =
"TEXT_OT_selection_set";
3484 if (event->
mval[0] >= st->
runtime->scroll_region_handle.xmin) {
3522 const int *mval =
event->mval;
3524 static int jump_to = 0;
3525 static double last_jump = 0;
3533 if (!(mval[0] > 2 &&
3535 mval[1] > 2 && mval[1] < region->winy - 2))
3541 if (!(event_ascii >=
'0' && event_ascii <=
'9')) {
3546 if (last_jump < time - 1) {
3551 jump_to +=
int(event_ascii -
'0');
3565 ot->
name =
"Line Number";
3566 ot->
idname =
"TEXT_OT_line_number";
3629 bool do_auto_close =
false;
3630 bool do_auto_close_select =
false;
3632 uint auto_close_char_input = 0;
3633 uint auto_close_char_match = 0;
3640 } auto_close_select = {
nullptr}, auto_close_select_backup = {
nullptr};
3661 if (isascii(auto_close_char_input)) {
3663 if (auto_close_char_match != 0) {
3664 do_auto_close =
true;
3669 do_auto_close_select =
true;
3671 auto_close_select_backup.curl = st->
text->
curl;
3672 auto_close_select_backup.curc = st->
text->
curc;
3673 auto_close_select_backup.sell = st->
text->
sell;
3674 auto_close_select_backup.selc = st->
text->
selc;
3679 auto_close_select.curl = st->
text->
curl;
3680 auto_close_select.curc = st->
text->
curc;
3681 auto_close_select.sell = st->
text->
sell;
3682 auto_close_select.selc = st->
text->
selc;
3693 if (do_auto_close) {
3697 if (do_auto_close_select) {
3699 if (auto_close_select.curl == auto_close_select.sell) {
3700 auto_close_select.selc += auto_close_char_len;
3703 st->
text->
curl = auto_close_select.sell;
3704 st->
text->
curc = auto_close_select.selc;
3712 if (do_auto_close_select) {
3714 if (auto_close_select.curl != auto_close_select.sell) {
3715 TextLine *line = auto_close_select.curl;
3719 }
while (line != auto_close_select.sell);
3721 st->
text->
curl = auto_close_select.curl;
3722 st->
text->
curc = auto_close_select.curc + auto_close_char_len;
3723 st->
text->
sell = auto_close_select.sell;
3724 st->
text->
selc = auto_close_select.selc;
3729 if (do_auto_close_select) {
3730 st->
text->
curl = auto_close_select_backup.curl;
3731 st->
text->
curc = auto_close_select_backup.curc;
3732 st->
text->
sell = auto_close_select_backup.sell;
3733 st->
text->
selc = auto_close_select_backup.selc;
3765 ot->
srna,
"text",
nullptr, 0,
"Text",
"Text to insert at the cursor position");
3796 flags &= ~ST_FIND_WRAP;
3814 if (text->curl && text->curl->format) {
3816 text->curl->format =
nullptr;
3833 if (text->id.next) {
3834 text = st->
text =
static_cast<Text *
>(text->id.next);
3879 const int flags = st->
flags;
3886 const int orig_curl =
BLI_findindex(&text->lines, text->curl);
3887 const int orig_curc = text->curc;
3898 if (text->curl && text->curl->format) {
3900 text->curl->format =
nullptr;
3972 ot->
name =
"Find & Set Selection";
3973 ot->
idname =
"TEXT_OT_find_set_selected";
3974 ot->
description =
"Find specified text and set as selected";
4003 ot->
name =
"Replace & Set Selection";
4004 ot->
idname =
"TEXT_OT_replace_set_selected";
4005 ot->
description =
"Replace text with specified text and set as selected";
4023 const char *filepath,
4024 const int line_index,
4025 const int column_index)
4027 bool success =
false;
4033 const char *expr_imports[] = {
"bl_text_utils",
"bl_text_utils.external_editor",
"os",
nullptr};
4036 std::stringstream expr_stream;
4037 expr_stream <<
"bl_text_utils.external_editor.open_external_editor(os.fsdecode(b'";
4038 for (
const char *ch = filepath; *ch; ch++) {
4039 expr_stream <<
"\\x" << std::hex <<
int(*ch);
4041 expr_stream <<
"'), " << std::dec << line_index <<
", " << std::dec << column_index <<
")";
4042 expr = expr_stream.str();
4045 char *expr_result =
nullptr;
4048 if (expr_result[0] ==
'\0') {
4059 UNUSED_VARS(C, reports, filepath, line_index, column_index);
4066 const char *filepath,
4067 const int line_index,
4068 const int column_index)
4071 Text *text =
nullptr;
4074 if (text_iter->filepath &&
BLI_path_cmp(text_iter->filepath, filepath) == 0) {
4080 if (text ==
nullptr) {
4084 if (text ==
nullptr) {
4089 txt_move_to(text, line_index, column_index,
false);
4110 if (text->filepath !=
nullptr) {
4112 const int line_index =
BLI_findindex(&text->lines, text->curl);
4127 if (filepath[0] ==
'\0') {
4133 printf(
"%s:%d:%d\n", filepath, line_index + 1, column_index);
4136 if (
U.text_editor[0] !=
'\0') {
4138 C, op->
reports, filepath, line_index, column_index);
4142 C, op->
reports, filepath, line_index, column_index);
4153 ot->
name =
"Jump to File at Point";
4154 ot->
idname =
"TEXT_OT_jump_to_file_at_point";
4165 prop =
RNA_def_int(
ot->
srna,
"line", 0, 0, INT_MAX,
"Line",
"Line to jump to", 1, 10000);
4167 prop =
RNA_def_int(
ot->
srna,
"column", 0, 0, INT_MAX,
"Column",
"Column to jump to", 1, 10000);
4183 {0,
nullptr, 0,
nullptr,
nullptr},
4194 return ((text->filepath !=
nullptr) && !(text->flags &
TXT_ISMEM));
4202 switch (resolution) {
4228 C,
IFACE_(
"File Modified Outside and Inside Blender"), ICON_NONE);
4232 IFACE_(
"Reload from disk (ignore local changes)"),
4238 IFACE_(
"Save to disk (ignore outside changes)"),
4244 IFACE_(
"Make text internal (separate copy)"),
4257 IFACE_(
"Make text internal (separate copy)"),
4271 IFACE_(
"Make text internal"),
4287 ot->
name =
"Resolve Conflict";
4288 ot->
idname =
"TEXT_OT_resolve_conflict";
4289 ot->
description =
"When external text is out of sync, resolve the conflict";
4302 "How to solve conflict due to differences in internal and external text");
4324 ot->
name =
"To 3D Object";
4325 ot->
idname =
"TEXT_OT_to_3d_object";
4326 ot->
description =
"Create 3D text object from active text data-block";
4337 ot->
srna,
"split_lines",
false,
"Split Lines",
"Create one object per line in the text");
SpaceText * CTX_wm_space_text(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Text * CTX_data_edit_text(const bContext *C)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_id_delete(Main *bmain, void *idv) ATTR_NONNULL()
bool BKE_id_is_editable(const Main *bmain, const ID *id)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
void txt_move_down(struct Text *text, bool sel)
void void txt_split_curline(struct Text *text)
int txt_setcurr_tab_spaces(struct Text *text, int space)
bool txt_has_sel(const struct Text *text)
void txt_move_eof(struct Text *text, bool sel)
void txt_delete_selected(struct Text *text)
void txt_delete_char(struct Text *text)
bool txt_cursor_is_line_end(const struct Text *text)
void txt_sel_line(struct Text *text)
void txt_move_toline(struct Text *text, unsigned int line, bool sel)
bool txt_replace_char(struct Text *text, unsigned int add)
int txt_calc_tab_right(const struct TextLine *tl, int ch)
void txt_backspace_char(struct Text *text)
void txt_sel_clear(struct Text *text)
void txt_move_left(struct Text *text, bool sel)
bool txt_add_char(struct Text *text, unsigned int add)
int txt_calc_tab_left(const struct TextLine *tl, int ch)
void txt_delete_word(struct Text *text)
void txt_move_bof(struct Text *text, bool sel)
void txt_move_right(struct Text *text, bool sel)
int txt_get_span(const struct TextLine *from, const struct TextLine *to)
int txt_find_string(struct Text *text, const char *findstr, int wrap, int match_case)
void txt_move_lines(struct Text *text, int direction)
struct Text * BKE_text_add(struct Main *bmain, const char *name)
void txt_comment(struct Text *text, const char *prefix)
struct Text struct Text * BKE_text_load(struct Main *bmain, const char *filepath, const char *relbase) ATTR_NONNULL(1
void txt_jump_left(struct Text *text, bool sel, bool use_init_step)
void int BKE_text_file_modified_check(const struct Text *text)
void txt_move_eol(struct Text *text, bool sel)
void txt_backspace_word(struct Text *text)
void txt_jump_right(struct Text *text, bool sel, bool use_init_step)
void txt_move_up(struct Text *text, bool sel)
void BKE_text_file_modified_ignore(struct Text *text)
void txt_move_bol(struct Text *text, bool sel)
struct Text * BKE_text_load_ex(struct Main *bmain, const char *filepath, const char *relbase, bool is_internal) ATTR_NONNULL(1
void txt_sel_all(struct Text *text)
void txt_order_cursors(struct Text *text, bool reverse)
bool txt_unindent(struct Text *text)
void txt_indent(struct Text *text)
void txt_duplicate_line(struct Text *text)
char * txt_sel_to_buf(const struct Text *text, size_t *r_buf_strlen)
void txt_insert_buf(struct Text *text, const char *in_buffer, int in_buffer_len) ATTR_NONNULL(1
void txt_move_to(struct Text *text, unsigned int line, unsigned int ch, bool sel)
bool txt_cursor_is_line_start(const struct Text *text)
void txt_pop_sel(struct Text *text)
bool BKE_text_reload(struct Text *text)
bool txt_uncomment(struct Text *text, const char *prefix)
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_file_is_writable(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
FILE * BLI_fopen(const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_stat(const char *path, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
#define LISTBASE_FOREACH(type, var, list)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
MINLINE void sub_v2_v2v2_int(int r[2], const int a[2], const int b[2])
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
BLI_INLINE int BLI_rcti_cent_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
#define STRNCPY(dst, src)
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int char char int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void BLI_str_cursor_step_bounds_utf8(const char *str, int str_maxlen, int pos, int *r_start, int *r_end)
int BLI_str_utf8_char_width_safe(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_str_utf8_size_safe(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t size_t size_t int BLI_str_utf8_offset_to_index(const char *str, size_t str_len, int offset_target) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
const char * BLI_str_find_prev_char_utf8(const char *p, const char *str_start) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(1
unsigned int BLI_str_utf8_as_unicode_step_safe(const char *__restrict p, size_t p_len, size_t *__restrict index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
unsigned int unsigned int size_t BLI_str_utf8_from_unicode_len(unsigned int c) ATTR_WARN_UNUSED_RESULT
unsigned int BLI_str_utf8_as_unicode_or_error(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_str_utf8_offset_from_column_with_tabs(const char *str, size_t str_len, int column_target, int tab_width) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_str_utf8_offset_to_column_with_tabs(const char *str, size_t str_len, int offset_target, int tab_width) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Platform independent time functions.
double BLI_time_now_seconds(void)
#define BLT_I18NCONTEXT_ID_TEXT
void BPY_pyconstraint_update(Object *owner, bConstraint *con)
void BPY_text_free_code(Text *text)
bool bool BPY_run_text(bContext *C, Text *text, ReportList *reports, bool do_jump) ATTR_NONNULL(1
bool bool bool bool BPY_run_string_as_string(bContext *C, const char *imports[], const char *expr, BPy_RunErrInfo *err_info, char **r_value) ATTR_NONNULL(1
void DEG_id_tag_update(ID *id, unsigned int flags)
@ USER_TEXT_EDIT_AUTO_CLOSE
void ED_area_tag_redraw(ScrArea *area)
bool ED_text_activate_in_screen(bContext *C, Text *text)
const char * ED_text_format_comment_line_prefix(Text *text)
UndoStep * ED_text_undo_push_init(bContext *C)
void ED_space_text_scroll_to_cursor(SpaceText *st, ARegion *region, bool center)
Read Guarded memory(de)allocation.
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void UI_context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
void uiItemEnumO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, const char *propname, int value)
@ WM_CAPABILITY_PRIMARY_CLIPBOARD
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void ED_text_to_object(bContext *C, const Text *text, const bool split_lines)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
static void update(bNodeTree *ntree)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen, int *r_len)
int RNA_string_length(PointerRNA *ptr, const char *name)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_id_pointer_create(ID *id)
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
const char * report_prefix
SpaceText_Runtime * runtime
struct TextScroll::@527 state
struct bConstraint * next
struct bPoseChannel * next
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* cancel)(bContext *C, wmOperator *op)
struct ReportList * reports
struct wmOperatorType * type
int flatten_string(const SpaceText *st, FlattenString *fs, const char *in)
void flatten_string_free(FlattenString *fs)
void space_text_drawcache_tag_update(SpaceText *st, bool full)
int space_text_wrap_width(const SpaceText *st, const ARegion *region)
#define TXT_LINE_HEIGHT(st)
#define TXT_NUMCOL_WIDTH(st)
void space_text_update_cursor_moved(bContext *C)
void space_text_update_character_width(SpaceText *st)
int space_text_get_visible_lines(const SpaceText *st, const ARegion *region, const char *str)
void space_text_wrap_offset_in_line(const SpaceText *st, const ARegion *region, TextLine *linein, int cursin, int *offl, int *offc)
#define TXT_BODY_LEFT(st)
int space_text_get_total_lines(SpaceText *st, const ARegion *region)
int space_text_get_char_pos(const SpaceText *st, const char *line, int cur)
static int text_scroll_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int text_replace_exec(bContext *C, wmOperator *op)
void TEXT_OT_replace_set_selected(wmOperatorType *ot)
static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool text_edit_poll(bContext *C)
static int text_replace_all(bContext *C)
static int text_save_as_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
static bool text_span_is_blank(TextLine *line1, const int line1_char, TextLine *line2, const int line2_char)
static bool text_data_poll(bContext *C)
static int text_to_3d_object_exec(bContext *C, wmOperator *op)
void TEXT_OT_unlink(wmOperatorType *ot)
static int text_insert_exec(bContext *C, wmOperator *op)
void TEXT_OT_overwrite_toggle(wmOperatorType *ot)
static void text_cursor_set_to_pos(SpaceText *st, const ARegion *region, int x, int y, const bool sel)
static int text_line_break_exec(bContext *C, wmOperator *)
static void space_text_screen_clamp(SpaceText *st, const ARegion *region)
void TEXT_OT_reload(wmOperatorType *ot)
void TEXT_OT_open(wmOperatorType *ot)
static int text_save_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void text_update_edited(Text *text)
static int cursor_skip_find_line(const SpaceText *st, const ARegion *region, int lines, TextLine **linep, int *charp, int *rell, int *relc)
static void text_open_init(bContext *C, wmOperator *op)
static int text_resolve_conflict_exec(bContext *C, wmOperator *op)
void TEXT_OT_replace(wmOperatorType *ot)
static const EnumPropertyItem resolution_items[]
@ SCROLLHANDLE_MIN_OUTSIDE
@ SCROLLHANDLE_MAX_OUTSIDE
@ SCROLLHANDLE_INVALID_OUTSIDE
void TEXT_OT_run_script(wmOperatorType *ot)
static int text_run_script(bContext *C, ReportList *reports)
static TextLine * space_text_get_line_pos_wrapped(const SpaceText *st, const ARegion *region, int *y)
static void text_scroll_apply(bContext *C, wmOperator *op, const wmEvent *event)
static void text_scroll_state_init(TextScroll *tsc, SpaceText *st, ARegion *region)
void TEXT_OT_copy(wmOperatorType *ot)
static int text_toggle_overwrite_exec(bContext *C, wmOperator *)
static int text_find_exec(bContext *C, wmOperator *op)
static int text_selection_set_modal(bContext *C, wmOperator *op, const wmEvent *event)
static int text_copy_exec(bContext *C, wmOperator *)
void TEXT_OT_select_line(wmOperatorType *ot)
static void text_selection_set_cancel(bContext *C, wmOperator *op)
static int text_unlink_exec(bContext *C, wmOperator *)
static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
void TEXT_OT_new(wmOperatorType *ot)
void TEXT_OT_indent_or_autocomplete(wmOperatorType *ot)
void TEXT_OT_scroll(wmOperatorType *ot)
static int text_cursor_set_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void TEXT_OT_line_break(wmOperatorType *ot)
static int text_selection_set_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int text_delete_exec(bContext *C, wmOperator *op)
static bool text_region_edit_poll(bContext *C)
void TEXT_OT_save_as(wmOperatorType *ot)
static int text_jump_to_file_at_point_exec(bContext *C, wmOperator *op)
static bool text_region_scroll_poll(bContext *C)
static void txt_copy_clipboard(const Text *text)
static int text_select_word_exec(bContext *C, wmOperator *)
static int text_open_exec(bContext *C, wmOperator *op)
static int move_lines_exec(bContext *C, wmOperator *op)
static void text_cursor_set_exit(bContext *C, wmOperator *op)
void TEXT_OT_paste(wmOperatorType *ot)
static int text_new_exec(bContext *C, wmOperator *)
static int text_save_exec(bContext *C, wmOperator *op)
void TEXT_OT_make_internal(wmOperatorType *ot)
void TEXT_OT_to_3d_object(wmOperatorType *ot)
void TEXT_OT_indent(wmOperatorType *ot)
bool text_space_edit_poll(bContext *C)
void TEXT_OT_select_all(wmOperatorType *ot)
static void txt_wrap_move_eol(SpaceText *st, ARegion *region, const bool sel)
static bool text_jump_to_file_at_point_external(bContext *C, ReportList *reports, const char *filepath, const int line_index, const int column_index)
static int text_duplicate_line_exec(bContext *C, wmOperator *)
void TEXT_OT_select_word(wmOperatorType *ot)
void TEXT_OT_save(wmOperatorType *ot)
static int text_unlink_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int text_replace_set_selected_exec(bContext *C, wmOperator *)
BLI_INLINE int space_text_pixel_x_to_column(const SpaceText *st, const int x)
static int text_scroll_bar_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void TEXT_OT_move_lines(wmOperatorType *ot)
static int text_scroll_exec(bContext *C, wmOperator *op)
static int text_make_internal_exec(bContext *C, wmOperator *)
void TEXT_OT_cursor_set(wmOperatorType *ot)
static int text_move_exec(bContext *C, wmOperator *op)
static char * buf_tabs_to_spaces(const char *in_buf, const int tab_size, int *r_out_buf_len)
static int text_cursor_set_exec(bContext *C, wmOperator *op)
static int text_comment_exec(bContext *C, wmOperator *op)
static int text_cut_exec(bContext *C, wmOperator *)
static int text_indent_exec(bContext *C, wmOperator *)
static int text_jump_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem delete_type_items[]
static void space_text_cursor_set_to_pos_wrapped(const SpaceText *st, const ARegion *region, int x, int y, const bool sel)
void TEXT_OT_scroll_bar(wmOperatorType *ot)
void TEXT_OT_find(wmOperatorType *ot)
static int text_move_cursor(bContext *C, int type, bool select)
void TEXT_OT_duplicate_line(wmOperatorType *ot)
void TEXT_OT_move_select(wmOperatorType *ot)
static int flatten_width(SpaceText *st, const char *str)
static int text_jump_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int text_reload_exec(bContext *C, wmOperator *op)
static int text_run_script_exec(bContext *C, wmOperator *op)
static void text_cursor_timer_ensure(bContext *C, SetSelection *ssel)
static bool text_new_poll(bContext *)
void TEXT_OT_jump(wmOperatorType *ot)
static int text_scroll_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void text_cursor_timer_remove(bContext *C, SetSelection *ssel)
static int text_move_select_exec(bContext *C, wmOperator *op)
void TEXT_OT_delete(wmOperatorType *ot)
void TEXT_OT_selection_set(wmOperatorType *ot)
static bool text_scroll_poll(bContext *C)
static int flatten_column_to_offset(SpaceText *st, const char *str, int index)
static int text_open_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int text_select_line_exec(bContext *C, wmOperator *)
static int text_refresh_pyconstraints_exec(bContext *, wmOperator *)
void TEXT_OT_find_set_selected(wmOperatorType *ot)
static int text_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void txt_wrap_move_bol(SpaceText *st, ARegion *region, const bool sel)
void TEXT_OT_unindent(wmOperatorType *ot)
void TEXT_OT_insert(wmOperatorType *ot)
static const EnumPropertyItem whitespace_type_items[]
void TEXT_OT_comment_toggle(wmOperatorType *ot)
static int text_reload_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int space_text_get_cursor_rel(const SpaceText *st, const ARegion *region, TextLine *linein, int rell, int relc)
void TEXT_OT_jump_to_file_at_point(wmOperatorType *ot)
static void space_text_cursor_skip(const SpaceText *st, const ARegion *region, Text *text, int lines, const bool sel)
static char text_closing_character_pair_get(const char character)
static bool text_unlink_poll(bContext *C)
static int text_line_number_invoke(bContext *C, wmOperator *, const wmEvent *event)
static int text_find_set_selected_exec(bContext *C, wmOperator *op)
void TEXT_OT_resolve_conflict(wmOperatorType *ot)
void TEXT_OT_move(wmOperatorType *ot)
static int text_select_all_exec(bContext *C, wmOperator *)
static void space_text_screen_skip(SpaceText *st, ARegion *region, int lines)
static void text_open_cancel(bContext *, wmOperator *op)
void TEXT_OT_line_number(wmOperatorType *ot)
void text_update_line_edited(TextLine *line)
static void test_line_start(char c, bool *r_last_state)
static int text_save_as_exec(bContext *C, wmOperator *op)
static bool text_resolve_conflict_poll(bContext *C)
void TEXT_OT_convert_whitespace(wmOperatorType *ot)
static void text_select_update_primary_clipboard(const Text *text)
static void txt_wrap_move_down(SpaceText *st, ARegion *region, const bool sel)
void TEXT_OT_cut(wmOperatorType *ot)
static int text_indent_or_autocomplete_exec(bContext *C, wmOperator *)
static int text_unindent_exec(bContext *C, wmOperator *)
static bool text_jump_to_file_at_point_internal(bContext *C, ReportList *reports, const char *filepath, const int line_index, const int column_index)
void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot)
static void txt_wrap_move_up(SpaceText *st, ARegion *region, const bool sel)
static void text_cursor_set_apply(bContext *C, wmOperator *op, const wmEvent *event)
static int text_paste_exec(bContext *C, wmOperator *op)
static void text_scroll_cancel(bContext *C, wmOperator *op)
static void scroll_exit(bContext *C, wmOperator *op)
static const EnumPropertyItem move_type_items[]
static void txt_write_file(Main *bmain, Text *text, ReportList *reports)
char WM_event_utf8_to_ascii(const wmEvent *event)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
int WM_operator_confirm_ex(bContext *C, wmOperator *op, const char *title, const char *message, const char *confirm_text, int icon, bool cancel_default)
int WM_operator_props_dialog_popup(bContext *C, wmOperator *op, int width, std::optional< std::string > title, std::optional< std::string > confirm_text, const bool cancel_default)
void WM_clipboard_text_set(const char *buf, bool selection)
char * WM_clipboard_text_get(bool selection, bool ensure_utf8, int *r_len)
eWM_CapabilitiesFlag WM_capabilities_flag()
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)
wmTimer * WM_event_timer_add(wmWindowManager *wm, wmWindow *win, const int event_type, const double time_step)