78static char32_t findaccent(
char32_t char1,
const char code)
80 char32_t new_char = 0;
86 else if (code == 39) {
89 else if (code ==
'^') {
92 else if (code ==
'~') {
95 else if (code ==
'"') {
98 else if (code ==
'o') {
101 else if (code ==
'e') {
104 else if (code ==
'-') {
108 else if (char1 ==
'c') {
112 else if (code ==
'|') {
115 else if (code ==
'o') {
119 else if (char1 ==
'e') {
123 else if (code == 39) {
126 else if (code ==
'^') {
129 else if (code ==
'"') {
133 else if (char1 ==
'i') {
137 else if (code == 39) {
140 else if (code ==
'^') {
143 else if (code ==
'"') {
147 else if (char1 ==
'n') {
152 else if (char1 ==
'o') {
156 else if (code == 39) {
159 else if (code ==
'^') {
162 else if (code ==
'~') {
165 else if (code ==
'"') {
168 else if (code ==
'/') {
171 else if (code ==
'-') {
174 else if (code ==
'e') {
177 else if (code ==
'c') {
180 else if (code ==
'r') {
184 else if (char1 ==
'r') {
189 else if (char1 ==
's') {
194 else if (char1 ==
't') {
199 else if (char1 ==
'u') {
203 else if (code == 39) {
206 else if (code ==
'^') {
209 else if (code ==
'"') {
213 else if (char1 ==
'y') {
217 else if (code ==
'"') {
221 else if (char1 ==
'A') {
225 else if (code == 39) {
228 else if (code ==
'^') {
231 else if (code ==
'~') {
234 else if (code ==
'"') {
237 else if (code ==
'o') {
240 else if (code ==
'e') {
244 else if (char1 ==
'C') {
249 else if (char1 ==
'E') {
253 else if (code == 39) {
256 else if (code ==
'^') {
259 else if (code ==
'"') {
263 else if (char1 ==
'I') {
267 else if (code == 39) {
270 else if (code ==
'^') {
273 else if (code ==
'"') {
277 else if (char1 ==
'N') {
282 else if (char1 ==
'O') {
286 else if (code == 39) {
289 else if (code ==
'^') {
292 else if (code ==
'~') {
295 else if (code ==
'"') {
298 else if (code ==
'/') {
301 else if (code ==
'e') {
305 else if (char1 ==
'U') {
309 else if (code == 39) {
312 else if (code ==
'^') {
315 else if (code ==
'"') {
319 else if (char1 ==
'Y') {
324 else if (char1 ==
'1') {
332 else if (char1 ==
'3') {
337 else if (char1 ==
':') {
342 else if (char1 ==
'-') {
353 else if (char1 ==
'|') {
361 else if (char1 ==
'=') {
366 else if (char1 ==
'+') {
437 int selend, selstart, direction;
443 if (ef->
pos >= selstart) {
444 ef->
pos = selstart + ins;
446 if ((direction == -1) && ins) {
450 getfrom = selend + 1;
454 ef->
len -= ((selend - selstart) + 1);
471 if (buf ==
nullptr) {
486 const size_t str_len,
492 int selend, selstart;
495 selstart = selend = 0;
499 if ((ef->
len + str_len) - (selend - selstart) <=
MAXTEXT) {
513 const short mat_nr_max = std::max(0, obedit->
totcol - 1);
514 const CharInfo *info_src = str_info;
517 for (
int i = 0;
i < str_len;
i++, info_src++, info_dst++) {
518 *info_dst = *info_src;
563 int selstart, selend;
568 const char32_t *text_buf = ef->
textbuf + selstart;
569 const size_t text_buf_len = selend - selstart;
591 if (strp ==
nullptr) {
640 ot->name =
"Paste File";
641 ot->description =
"Paste contents from file";
642 ot->idname =
"FONT_OT_text_paste_from_file";
677 char *edit_string =
static_cast<char *
>(arg_string);
679 if (edit_string[0] == 0) {
685 uint val = strtoul(edit_string,
nullptr, 16);
686 if (val > 31 && val < 0x10FFFF) {
689 const char32_t utf32[2] = {val, 0};
704 char *edit_string =
static_cast<char *
>(arg_string);
719 uiItemL_ex(&layout,
IFACE_(
"Insert Unicode Character"), ICON_NONE,
true,
false);
720 layout.
label(
RPT_(
"Enter a Unicode codepoint hex value"), ICON_NONE);
733 TIP_(
"Unicode codepoint hex value"));
743 const bool windows_layout =
true;
745 const bool windows_layout =
false;
748 uiBut *confirm =
nullptr;
749 uiBut *cancel =
nullptr;
751 split->column(
false);
753 if (windows_layout) {
755 block,
ButType::But, 0, 0,
IFACE_(
"Insert"), 0, 0, 0,
UI_UNIT_Y,
nullptr, std::nullopt);
756 split->column(
false);
760 block,
ButType::But, 0, 0,
IFACE_(
"Cancel"), 0, 0, 0,
UI_UNIT_Y,
nullptr, std::nullopt);
762 if (!windows_layout) {
763 split->column(
false);
765 block,
ButType::But, 0, 0,
IFACE_(
"Insert"), 0, 0, 0,
UI_UNIT_Y,
nullptr, std::nullopt);
775 int bounds_offset[2];
776 bounds_offset[0] = layout.
width() * -0.2f;
796 ot->name =
"Insert Unicode";
797 ot->description =
"Insert Unicode Character";
798 ot->idname =
"FONT_OT_text_insert_unicode";
817 const float offset[3])
827 int nchars = 0, nbytes = 0;
830 const float rot[3] = {0.0f, 0.0f, 0.0f};
847 for (tmp = firstline, a = 0; nbytes <
MAXTEXT && a < totline; tmp = tmp->
next, a++) {
848 size_t nchars_line, nbytes_line;
850 nchars += nchars_line + 1;
851 nbytes += nbytes_line + 1;
870 for (tmp = firstline, a = 0; cu->
len <
MAXTEXT && a < totline; tmp = tmp->
next, a++) {
871 size_t nchars_line_dummy, nbytes_line;
873 (void)nchars_line_dummy;
875 memcpy(s, tmp->
line, nbytes_line);
877 cu->
len += nbytes_line;
906 if (line->line[0] ==
'\0') {
913 offset[1] = -linenum;
951 {0,
nullptr, 0,
nullptr,
nullptr},
959 int i, selstart, selend;
965 for (
i = selstart;
i <= selend;
i++) {
991 ot->name =
"Set Style";
992 ot->description =
"Set font style";
993 ot->idname =
"FONT_OT_style_set";
1005 RNA_def_boolean(
ot->srna,
"clear",
false,
"Clear",
"Clear style rather than setting it");
1018 int style,
clear, selstart, selend;
1032 ot->name =
"Toggle Style";
1033 ot->description =
"Toggle font style";
1034 ot->idname =
"FONT_OT_style_toggle";
1076 ot->name =
"Select All";
1077 ot->description =
"Select all text";
1078 ot->idname =
"FONT_OT_select_all";
1097 int selstart, selend;
1101 char *buf =
nullptr;
1132 ot->name =
"Copy Text";
1133 ot->description =
"Copy selected text to clipboard";
1134 ot->idname =
"FONT_OT_text_copy";
1151 int selstart, selend;
1168 ot->name =
"Cut Text";
1169 ot->description =
"Cut selected text to clipboard";
1170 ot->idname =
"FONT_OT_text_cut";
1216 } clipboard_system = {
nullptr}, clipboard_vfont = {
nullptr};
1221 if (clipboard_system.buf ==
nullptr) {
1230 if (clipboard_vfont.buf ==
nullptr) {
1238 if (clipboard_vfont.buf &&
STREQ(clipboard_vfont.buf, clipboard_system.buf)) {
1242 if ((clipboard_system.len <=
MAXTEXT) &&
1262 if (clipboard_vfont.buf) {
1274 ot->name =
"Paste Text";
1275 ot->description =
"Paste text from clipboard";
1276 ot->idname =
"FONT_OT_text_paste";
1291 "Paste text selected elsewhere rather than copied (X11/Wayland only)");
1302 {
LINE_BEGIN,
"LINE_BEGIN", 0,
"Line Begin",
""},
1303 {
LINE_END,
"LINE_END", 0,
"Line End",
""},
1304 {
TEXT_BEGIN,
"TEXT_BEGIN", 0,
"Text Begin",
""},
1305 {
TEXT_END,
"TEXT_END", 0,
"Text End",
""},
1306 {
PREV_CHAR,
"PREVIOUS_CHARACTER", 0,
"Previous Character",
""},
1307 {
NEXT_CHAR,
"NEXT_CHARACTER", 0,
"Next Character",
""},
1308 {
PREV_WORD,
"PREVIOUS_WORD", 0,
"Previous Word",
""},
1309 {
NEXT_WORD,
"NEXT_WORD", 0,
"Next Word",
""},
1310 {
PREV_LINE,
"PREVIOUS_LINE", 0,
"Previous Line",
""},
1311 {
NEXT_LINE,
"NEXT_LINE", 0,
"Next Line",
""},
1312 {
PREV_PAGE,
"PREVIOUS_PAGE", 0,
"Previous Page",
""},
1313 {
NEXT_PAGE,
"NEXT_PAGE", 0,
"Next Page",
""},
1314 {0,
nullptr, 0,
nullptr,
nullptr},
1325 int selstart, selend;
1334 else if (dir == 1) {
1335 ef->
pos = selend + 1;
1440 if (cursmove == -1) {
1450 else if (ef->
pos < 0) {
1488 ot->name =
"Move Cursor";
1489 ot->description =
"Move cursor to position type";
1490 ot->idname =
"FONT_OT_move";
1519 ot->name =
"Move Select";
1520 ot->description =
"Move the cursor while selecting";
1521 ot->idname =
"FONT_OT_move_select";
1536 "Where to move cursor to, to make a selection");
1551 int selstart, selend;
1552 bool changed =
false;
1559 selstart = selend = ef->
pos - 1;
1561 selstart =
max_ii(0, selstart);
1563 for (
int i = selstart;
i <= selend;
i++) {
1583 ot->name =
"Change Spacing";
1584 ot->description =
"Change font spacing";
1585 ot->idname =
"FONT_OT_change_spacing";
1601 "Amount to decrease or increase character spacing with",
1625 CLAMP(character, 0, 255);
1641 ot->name =
"Change Character";
1642 ot->description =
"Change font character code";
1643 ot->idname =
"FONT_OT_change_character";
1659 "Number to increase or decrease character code with",
1688 ot->name =
"Line Break";
1689 ot->description =
"Insert line break at cursor position";
1690 ot->idname =
"FONT_OT_line_break";
1708 {
DEL_PREV_CHAR,
"PREVIOUS_CHARACTER", 0,
"Previous Character",
""},
1712 {
DEL_NEXT_SEL,
"NEXT_OR_SELECTION", 0,
"Next or Selection",
""},
1713 {
DEL_PREV_SEL,
"PREVIOUS_OR_SELECTION", 0,
"Previous or Selection",
""},
1714 {0,
nullptr, 0,
nullptr,
nullptr},
1723 int range[2] = {0, 0};
1724 bool has_select =
false;
1764 if (ef->
pos >= ef->
len) {
1794 if (range[0] != range[1]) {
1796 int len_remove = range[1] - range[0];
1797 int len_tail = ef->
len - range[1];
1799 for (
int i = 0;
i < 2;
i++) {
1801 if (*sel <= range[0]) {
1804 else if (*sel >= range[1]) {
1820 ef->
len -= len_remove;
1834 ot->name =
"Delete";
1835 ot->description =
"Delete text by cursor position";
1836 ot->idname =
"FONT_OT_delete";
1851 "Which part of the text to delete");
1863 char32_t *inserted_text;
1876 for (a = 0; a <
len; a++) {
1893 static bool accentcode =
false;
1894 const bool alt =
event->modifier &
KM_ALT;
1895 const bool shift =
event->modifier &
KM_SHIFT;
1896 const bool ctrl =
event->modifier &
KM_CTRL;
1897 char32_t insert_char_override = 0;
1898 char32_t inserted_text[2] = {0};
1905 if (ef->
len != 0 && ef->
pos > 0) {
1912 if (alt && ef->
len != 0 && ef->
pos > 0) {
1920 if ((alt || ctrl || shift) == 0) {
1923 insert_char_override =
'\t';
1926 if (insert_char_override || event->
utf8_buf[0]) {
1927 if (insert_char_override) {
1929 inserted_text[0] = insert_char_override;
1960 if (inserted_text[0]) {
1962 char inserted_utf8[8] = {0};
1974 ot->name =
"Insert Text";
1975 ot->description =
"Insert text at cursor position";
1976 ot->idname =
"FONT_OT_text_insert";
1987 RNA_def_string(
ot->srna,
"text",
nullptr, 0,
"Text",
"Text to insert at the cursor position");
1993 "Next typed character will strike through previous, for special character input");
2007 plane, obedit->object_to_world().location(), obedit->object_to_world().ptr()[2]);
2015 mul_m4_v3(obedit->world_to_object().ptr(), mouse_loc);
2031 if (string_offset > ef->
len || string_offset < 0) {
2047 ef->
selend = string_offset;
2048 ef->
pos = string_offset;
2074 switch (event->
type) {
2097 ot->name =
"Set Selection";
2098 ot->idname =
"FONT_OT_selection_set";
2099 ot->description =
"Set cursor selection";
2134 ot->name =
"Select Word";
2135 ot->idname =
"FONT_OT_select_word";
2136 ot->description =
"Select word under cursor";
2157 cu->
tb[
i] = cu->
tb[
i - 1];
2172 ot->name =
"Add Text Box";
2173 ot->description =
"Add a new text box";
2174 ot->idname =
"FONT_OT_textbox_add";
2199 cu->
tb[
i] = cu->
tb[
i + 1];
2202 if (cu->
actbox >= index) {
2216 ot->name =
"Remove Text Box";
2217 ot->description =
"Remove the text box";
2218 ot->idname =
"FONT_OT_textbox_remove";
2227 RNA_def_int(
ot->srna,
"index", 0, 0, INT_MAX,
"Index",
"The current text box", 0, INT_MAX);
2241 if (ef ==
nullptr) {
2244 ef->
textbuf =
static_cast<char32_t *
>(
2253 ef->
len = len_char32;
2321 {0,
nullptr, 0,
nullptr,
nullptr},
2328 int selstart, selend;
2334 for (
int len = (selend - selstart) + 1;
len;
len--,
str++) {
2355 ot->name =
"Set Case";
2356 ot->description =
"Set font case";
2357 ot->idname =
"FONT_OT_case_set";
2386 if (*
str >=
'a' && *
str <=
'z') {
2400 ot->name =
"Toggle Case";
2401 ot->description =
"Toggle font case";
2402 ot->idname =
"FONT_OT_case_toggle";
2418 op->
customdata = pprop = MEM_new<PropertyPointerRNA>(
"OpenPropertyPointerRNA");
2469 VFont *vfont =
nullptr;
2509 ot->name =
"Open Font";
2510 ot->idname =
"FONT_OT_open";
2511 ot->description =
"Load a new font from a file";
2539 VFont *builtin_font;
2545 if (pprop.
prop ==
nullptr) {
2562 ot->name =
"Unlink";
2563 ot->idname =
"FONT_OT_unlink";
2564 ot->description =
"Unlink active font data-block";
2580 const float active_bias_px = 4.0f;
2581 const float mval_fl[2] = {
float(mval[0]),
float(mval[1])};
2583 int i_iter, actbox_select = -1;
2585 float dist_sq_best = dist * dist;
2594 for (i_iter = 0; i_iter < cu->
totbox; i_iter++) {
2595 int i = (i_iter + i_actbox) % cu->
totbox;
2599 float obedit_co[4][3];
2600 float screen_co[4][2];
2611 for (j = 0; j < 4; j++) {
2615 project_ok |= (1 << j);
2619 dist_sq_min = dist_sq_best;
2620 for (j = 0, j_prev = 3; j < 4; j_prev = j++) {
2621 if ((project_ok & (1 << j)) && (project_ok & (1 << j_prev))) {
2623 mval_fl, screen_co[j_prev], screen_co[j]);
2624 dist_sq_min = std::min(dist_sq_min, dist_test_sq);
2630 dist_sq_min += active_bias_px;
2633 if (dist_sq_min < dist_sq_best) {
2634 dist_sq_best = dist_sq_min;
2635 actbox_select =
i + 1;
2639 if (actbox_select != -1) {
2640 if (cu->
actbox != actbox_select) {
2641 cu->
actbox = actbox_select;
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
Main * CTX_data_main(const bContext *C)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_curve_editfont_free(Curve *cu)
void BKE_curve_rect_from_textbox(const Curve *cu, const TextBox *tb, rctf *r_rect)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
General operations, lookup, etc. for blender objects.
Object * BKE_object_add(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name) ATTR_NONNULL(1
void BKE_object_where_is_calc(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
int BKE_vfont_select_get(const Curve *cu, int *r_start, int *r_end)
void BKE_vfont_clipboard_set(const char32_t *text_buf, const CharInfo *info_buf, size_t len)
#define FO_CURS_IS_MOTION(mode)
VFont * BKE_vfont_load(Main *bmain, const char *filepath)
bool BKE_vfont_is_builtin(const VFont *vfont)
void BKE_vfont_select_clamp(Curve *cu)
void BKE_vfont_clipboard_get(char32_t **r_text_buf, CharInfo **r_info_buf, size_t *r_len_utf8, size_t *r_len_utf32)
VFont * BKE_vfont_builtin_ensure()
bool BKE_vfont_to_curve(Object *ob, eEditFontMode mode)
int BKE_vfont_cursor_to_text_index(Object *ob, const blender::float2 &cursor_location)
void BKE_vfont_clipboard_free()
#define BLI_assert_unreachable()
File and directory operations.
void * BLI_file_read_text_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size)
#define LISTBASE_FOREACH(type, var, list)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
void mul_m4_v3(const float M[4][4], float r[3])
void mul_mat3_m4_v3(const float mat[4][4], float r[3])
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
MINLINE void add_v3_v3(float r[3], const float a[3])
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
int BLI_path_slash_ensure(char *path, size_t path_maxncpy) ATTR_NONNULL(1)
char * STRNCPY(char(&dst)[N], const char *src)
bool BLI_str_cursor_step_prev_utf32(const char32_t *str, int str_maxlen, int *pos)
void BLI_str_cursor_step_utf32(const char32_t *str, int str_maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
void BLI_str_cursor_step_bounds_utf32(const char32_t *str, int str_maxlen, int pos, int *r_start, int *r_end)
bool BLI_str_cursor_step_next_utf32(const char32_t *str, int str_maxlen, int *pos)
size_t size_t size_t BLI_str_utf32_as_utf8_len_ex(const char32_t *src, size_t src_maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_str_utf32_as_utf8_len(const char32_t *src) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char32_t BLI_str_utf32_char_to_lower(char32_t wc)
size_t BLI_strlen_utf8(const char *strc) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
size_t size_t BLI_str_utf32_as_utf8(char *__restrict dst, const char32_t *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
char32_t BLI_str_utf32_char_to_upper(char32_t wc)
size_t BLI_str_utf8_as_utf32(char32_t *__restrict dst_w, const char *__restrict src_c, size_t dst_w_maxncpy) ATTR_NONNULL(1
unsigned int BLI_str_utf8_as_unicode_or_error(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_strlen_utf8_ex(const char *strc, size_t *r_len_bytes) ATTR_NONNULL(1
#define BLT_I18NCONTEXT_ID_TEXT
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
Object is a sort of wrapper for general info.
void ED_outliner_select_sync_from_object_tag(bContext *C)
bool ED_operator_object_active_editable_font(bContext *C)
bool ED_operator_editfont(bContext *C)
float ED_view3d_select_dist_px()
eV3DProjStatus ED_view3d_project_float_object(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void ED_view3d_init_mats_rv3d(const Object *ob, RegionView3D *rv3d)
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
bool ED_view3d_win_to_3d_on_plane(const ARegion *region, const float plane[4], const float mval[2], bool do_clip, float r_out[3])
static void split(const char *text, const char *seps, char ***str, int *count)
Read Guarded memory(de)allocation.
void UI_but_func_set(uiBut *but, std::function< void(bContext &)> func)
uiBut * uiDefIconTextBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, std::optional< blender::StringRef > tip)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
uiBlock * UI_block_begin(const bContext *C, ARegion *region, std::string name, blender::ui::EmbossType emboss)
@ UI_BUT_ACTIVATE_ON_INIT
void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2])
const uiStyle * UI_style_get_dpi()
void UI_popup_block_invoke_ex(bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free, bool can_refresh)
void UI_popup_block_close(bContext *C, wmWindow *win, uiBlock *block)
void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2)
void UI_but_drawflag_disable(uiBut *but, int flag)
void UI_context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
@ UI_BLOCK_THEME_STYLE_POPUP
void UI_block_flag_enable(uiBlock *block, int flag)
uiBut * uiDefBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_flag_enable(uiBut *but, int flag)
uiBut * uiItemL_ex(uiLayout *layout, blender::StringRef name, int icon, bool highlight, bool redalert)
@ WM_CAPABILITY_CLIPBOARD_PRIMARY
BPy_StructRNA * depsgraph
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static uiBlock * wm_block_insert_unicode_create(bContext *C, ARegion *region, void *arg_string)
void FONT_OT_textbox_add(wmOperatorType *ot)
static void font_open_cancel(bContext *, wmOperator *op)
static wmOperatorStatus set_style_exec(bContext *C, wmOperator *op)
void FONT_OT_style_toggle(wmOperatorType *ot)
void ED_text_to_object(bContext *C, const Text *text, const bool split_lines)
static wmOperatorStatus set_style(bContext *C, const int style, const bool clear)
void FONT_OT_text_copy(wmOperatorType *ot)
static wmOperatorStatus font_select_all_exec(bContext *C, wmOperator *)
void FONT_OT_line_break(wmOperatorType *ot)
void FONT_OT_select_word(wmOperatorType *ot)
static void copy_selection(Object *obedit)
void FONT_OT_unlink(wmOperatorType *ot)
static wmOperatorStatus delete_exec(bContext *C, wmOperator *op)
static void font_select_update_primary_clipboard(Object *obedit)
static int kill_selection(Object *obedit, int ins)
static void text_insert_unicode_confirm(bContext *C, void *arg_block, void *arg_string)
static wmOperatorStatus line_break_exec(bContext *C, wmOperator *)
void ED_curve_editfont_make(Object *obedit)
void FONT_OT_select_all(wmOperatorType *ot)
void FONT_OT_move(wmOperatorType *ot)
static bool font_paste_wchar(Object *obedit, const char32_t *str, const size_t str_len, const CharInfo *str_info)
bool ED_curve_editfont_select_pick(bContext *C, const int mval[2], const SelectPick_Params ¶ms)
static int font_cursor_text_index_from_event(bContext *C, Object *obedit, const wmEvent *event)
static wmOperatorStatus change_spacing_exec(bContext *C, wmOperator *op)
static wmOperatorStatus paste_from_file_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus change_character_exec(bContext *C, wmOperator *op)
void FONT_OT_text_cut(wmOperatorType *ot)
static wmOperatorStatus cut_text_exec(bContext *C, wmOperator *)
static wmOperatorStatus insert_text_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void FONT_OT_change_spacing(wmOperatorType *ot)
static wmOperatorStatus font_open_exec(bContext *C, wmOperator *op)
static void txt_add_object(bContext *C, const TextLine *firstline, int totline, const float offset[3])
void FONT_OT_text_insert_unicode(wmOperatorType *ot)
void ED_curve_editfont_load(Object *obedit)
static wmOperatorStatus paste_from_file_exec(bContext *C, wmOperator *op)
void FONT_OT_change_character(wmOperatorType *ot)
static const EnumPropertyItem style_items[]
void FONT_OT_delete(wmOperatorType *ot)
void FONT_OT_textbox_remove(wmOperatorType *ot)
static wmOperatorStatus paste_from_file(bContext *C, ReportList *reports, const char *filepath)
static wmOperatorStatus font_select_word_exec(bContext *C, wmOperator *)
static wmOperatorStatus text_insert_unicode_invoke(bContext *C, wmOperator *, const wmEvent *)
static wmOperatorStatus set_case_exec(bContext *C, wmOperator *op)
static bool paste_selection(Object *obedit, ReportList *reports)
static const EnumPropertyItem delete_type_items[]
static void text_insert_unicode_cancel(bContext *C, void *arg_block, void *)
static wmOperatorStatus textbox_remove_exec(bContext *C, wmOperator *op)
void FONT_OT_open(wmOperatorType *ot)
static wmOperatorStatus move_exec(bContext *C, wmOperator *op)
static wmOperatorStatus font_selection_set_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void FONT_OT_text_paste_from_file(wmOperatorType *ot)
static wmOperatorStatus toggle_case_exec(bContext *C, wmOperator *)
static char32_t findaccent(char32_t char1, const char code)
void FONT_OT_move_select(wmOperatorType *ot)
static const EnumPropertyItem case_items[]
static void text_update_edited(bContext *C, Object *obedit, const eEditFontMode mode)
static wmOperatorStatus set_case(bContext *C, int ccase)
static wmOperatorStatus insert_text_exec(bContext *C, wmOperator *op)
static void font_cursor_set_apply(bContext *C, const wmEvent *event)
static wmOperatorStatus copy_text_exec(bContext *C, wmOperator *)
void FONT_OT_case_set(wmOperatorType *ot)
static bool move_cursor_drop_select(Object *obedit, int dir)
void FONT_OT_case_toggle(wmOperatorType *ot)
void ED_curve_editfont_free(Object *obedit)
static void font_ui_template_init(bContext *C, wmOperator *op)
static wmOperatorStatus toggle_style_exec(bContext *C, wmOperator *op)
static char * font_select_to_buffer(Object *obedit)
void FONT_OT_selection_set(wmOperatorType *ot)
void FONT_OT_text_paste(wmOperatorType *ot)
static int insert_into_textbuf(Object *obedit, uintptr_t c)
static wmOperatorStatus paste_text_exec(bContext *C, wmOperator *op)
static wmOperatorStatus move_select_exec(bContext *C, wmOperator *op)
static wmOperatorStatus move_cursor(bContext *C, int type, const bool select)
void FONT_OT_text_insert(wmOperatorType *ot)
static wmOperatorStatus font_unlink_exec(bContext *C, wmOperator *op)
static wmOperatorStatus open_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus font_selection_set_modal(bContext *C, wmOperator *, const wmEvent *event)
void FONT_OT_style_set(wmOperatorType *ot)
static const EnumPropertyItem move_type_items[]
static bool font_paste_utf8(bContext *C, const char *str, const size_t str_len)
static wmOperatorStatus textbox_add_exec(bContext *C, wmOperator *)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
static void clear(Message &msg)
bool material_active_index_set(Object *ob, int index)
void init_transform_on_add(Object *object, const float loc[3], const float rot[3])
uiLayout & block_layout(uiBlock *block, LayoutDirection direction, LayoutType type, int x, int y, int size, int em, int padding, const uiStyle *style)
VecBase< float, 2 > float2
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)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
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_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
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)
struct EditFont * editfont
struct CharInfo * strinfo
EditFontSelBox * selboxes
void label(blender::StringRef name, int icon)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
uiLayout & split(float percentage, bool align)
struct ReportList * reports
struct wmOperatorType * type
void WM_event_add_fileselect(bContext *C, wmOperator *op)
bool WM_operator_poll_or_report_error(bContext *C, wmOperatorType *ot, ReportList *reports)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
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)
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()