80static char32_t findaccent(
char32_t char1,
const char code)
82 char32_t new_char = 0;
88 else if (code == 39) {
91 else if (code ==
'^') {
94 else if (code ==
'~') {
97 else if (code ==
'"') {
100 else if (code ==
'o') {
103 else if (code ==
'e') {
106 else if (code ==
'-') {
110 else if (char1 ==
'c') {
114 else if (code ==
'|') {
117 else if (code ==
'o') {
121 else if (char1 ==
'e') {
125 else if (code == 39) {
128 else if (code ==
'^') {
131 else if (code ==
'"') {
135 else if (char1 ==
'i') {
139 else if (code == 39) {
142 else if (code ==
'^') {
145 else if (code ==
'"') {
149 else if (char1 ==
'n') {
154 else if (char1 ==
'o') {
158 else if (code == 39) {
161 else if (code ==
'^') {
164 else if (code ==
'~') {
167 else if (code ==
'"') {
170 else if (code ==
'/') {
173 else if (code ==
'-') {
176 else if (code ==
'e') {
179 else if (code ==
'c') {
182 else if (code ==
'r') {
186 else if (char1 ==
'r') {
191 else if (char1 ==
's') {
196 else if (char1 ==
't') {
201 else if (char1 ==
'u') {
205 else if (code == 39) {
208 else if (code ==
'^') {
211 else if (code ==
'"') {
215 else if (char1 ==
'y') {
219 else if (code ==
'"') {
223 else if (char1 ==
'A') {
227 else if (code == 39) {
230 else if (code ==
'^') {
233 else if (code ==
'~') {
236 else if (code ==
'"') {
239 else if (code ==
'o') {
242 else if (code ==
'e') {
246 else if (char1 ==
'C') {
251 else if (char1 ==
'E') {
255 else if (code == 39) {
258 else if (code ==
'^') {
261 else if (code ==
'"') {
265 else if (char1 ==
'I') {
269 else if (code == 39) {
272 else if (code ==
'^') {
275 else if (code ==
'"') {
279 else if (char1 ==
'N') {
284 else if (char1 ==
'O') {
288 else if (code == 39) {
291 else if (code ==
'^') {
294 else if (code ==
'~') {
297 else if (code ==
'"') {
300 else if (code ==
'/') {
303 else if (code ==
'e') {
307 else if (char1 ==
'U') {
311 else if (code == 39) {
314 else if (code ==
'^') {
317 else if (code ==
'"') {
321 else if (char1 ==
'Y') {
326 else if (char1 ==
'1') {
334 else if (char1 ==
'3') {
339 else if (char1 ==
':') {
344 else if (char1 ==
'-') {
355 else if (char1 ==
'|') {
363 else if (char1 ==
'=') {
368 else if (char1 ==
'+') {
382 Curve *cu = id_cast<Curve *>(obedit->
data);
410 Curve *cu = id_cast<Curve *>(obedit->
data);
437 Curve *cu = id_cast<Curve *>(obedit->
data);
439 int selend, selstart, direction;
445 if (ef->
pos >= selstart) {
446 ef->
pos = selstart + ins;
448 if ((direction == -1) && ins) {
452 getfrom = selend + 1;
453 size = ef->
len - selend;
456 ef->
len -= ((selend - selstart) + 1);
473 if (buf ==
nullptr) {
488 const size_t str_len,
492 Curve *cu = id_cast<Curve *>(obedit->
data);
494 int selend, selstart;
497 selstart = selend = 0;
501 if ((ef->
len + str_len) - (selend - selstart) <=
MAXTEXT) {
515 const short mat_nr_max = std::max(0, obedit->
totcol - 1);
516 const CharInfo *info_src = str_info;
519 for (
int i = 0; i < str_len; i++, info_src++, info_dst++) {
520 *info_dst = *info_src;
564 Curve *cu = id_cast<Curve *>(obedit->
data);
565 int selstart, selend;
570 const char32_t *text_buf = ef->
textbuf + selstart;
571 const size_t text_buf_len = selend - selstart;
593 if (strp ==
nullptr) {
642 ot->
name =
"Paste File";
644 ot->
idname =
"FONT_OT_text_paste_from_file";
679 char *edit_string =
static_cast<char *
>(arg_string);
681 if (edit_string[0] == 0) {
687 uint val = strtoul(edit_string,
nullptr, 16);
688 if (val > 31 && val < 0x10FFFF) {
691 const char32_t utf32[2] = {val, 0};
706 char *edit_string =
static_cast<char *
>(arg_string);
721 uiItemL_ex(&layout,
IFACE_(
"Insert Unicode Character"), ICON_NONE,
true,
false);
722 layout.
label(
RPT_(
"Enter a Unicode codepoint hex value"), ICON_NONE);
734 TIP_(
"Unicode codepoint hex value"));
744 const bool windows_layout =
true;
746 const bool windows_layout =
false;
754 if (windows_layout) {
755 confirm = uiDefIconTextBut(block,
768 cancel = uiDefIconTextBut(
771 if (!windows_layout) {
773 confirm = uiDefIconTextBut(block,
785 block_func_set(block,
nullptr,
nullptr,
nullptr);
792 int bounds_offset[2];
793 bounds_offset[0] = layout.
width() * -0.2f;
795 block_bounds_set_popup(block, 7 *
UI_SCALE_FAC, bounds_offset);
813 ot->
name =
"Insert Unicode";
815 ot->
idname =
"FONT_OT_text_insert_unicode";
834 const float offset[3])
844 int nchars = 0, nbytes = 0;
847 const float rot[3] = {0.0f, 0.0f, 0.0f};
860 cu = id_cast<Curve *>(obedit->
data);
864 for (tmp = firstline, a = 0; nbytes <
MAXTEXT && a < totline; tmp = tmp->
next, a++) {
865 size_t nchars_line, nbytes_line;
867 nchars += nchars_line + 1;
868 nbytes += nbytes_line + 1;
879 cu->
strinfo = MEM_new_array<CharInfo>((nchars + 4),
"strinfo");
887 for (tmp = firstline, a = 0; cu->
len <
MAXTEXT && a < totline; tmp = tmp->
next, a++) {
888 size_t nchars_line_dummy, nbytes_line;
890 (void)nchars_line_dummy;
892 memcpy(s, tmp->
line, nbytes_line);
894 cu->
len += nbytes_line;
916 if (!text || !text->lines.first_) {
921 for (
const TextLine &line : text->lines) {
923 if (line.
line[0] ==
'\0') {
930 offset[1] = -linenum;
965 {0,
nullptr, 0,
nullptr,
nullptr},
971 Curve *cu = id_cast<Curve *>(obedit->
data);
973 int i, selstart, selend;
979 for (i = selstart; i <= selend; i++) {
1005 ot->
name =
"Set Style";
1007 ot->
idname =
"FONT_OT_style_set";
1031 Curve *cu = id_cast<Curve *>(obedit->
data);
1032 int clear, selstart, selend;
1046 ot->
name =
"Toggle Style";
1048 ot->
idname =
"FONT_OT_style_toggle";
1071 Curve *cu = id_cast<Curve *>(obedit->
data);
1090 ot->
name =
"Select All";
1092 ot->
idname =
"FONT_OT_select_all";
1110 Curve *cu = id_cast<Curve *>(obedit->
data);
1111 int selstart, selend;
1115 char *buf =
nullptr;
1146 ot->
name =
"Copy Text";
1147 ot->
description =
"Copy selected text to clipboard";
1148 ot->
idname =
"FONT_OT_text_copy";
1164 Curve *cu = id_cast<Curve *>(obedit->
data);
1165 int selstart, selend;
1182 ot->
name =
"Cut Text";
1183 ot->
description =
"Cut selected text to clipboard";
1184 ot->
idname =
"FONT_OT_text_cut";
1230 } clipboard_system = {
nullptr}, clipboard_vfont = {
nullptr};
1235 if (clipboard_system.buf ==
nullptr) {
1244 if (clipboard_vfont.buf ==
nullptr) {
1245 MEM_delete(clipboard_system.buf);
1252 if (clipboard_vfont.buf &&
STREQ(clipboard_vfont.buf, clipboard_system.buf)) {
1256 if ((clipboard_system.len <=
MAXTEXT) &&
1276 if (clipboard_vfont.buf) {
1277 MEM_delete(clipboard_vfont.buf);
1280 MEM_delete(clipboard_system.buf);
1288 ot->
name =
"Paste Text";
1290 ot->
idname =
"FONT_OT_text_paste";
1305 "Paste text selected elsewhere rather than copied (X11/Wayland only)");
1316 {
LINE_BEGIN,
"LINE_BEGIN", 0,
"Line Begin",
""},
1317 {
LINE_END,
"LINE_END", 0,
"Line End",
""},
1318 {
TEXT_BEGIN,
"TEXT_BEGIN", 0,
"Text Begin",
""},
1319 {
TEXT_END,
"TEXT_END", 0,
"Text End",
""},
1320 {
PREV_CHAR,
"PREVIOUS_CHARACTER", 0,
"Previous Character",
""},
1321 {
NEXT_CHAR,
"NEXT_CHARACTER", 0,
"Next Character",
""},
1322 {
PREV_WORD,
"PREVIOUS_WORD", 0,
"Previous Word",
""},
1323 {
NEXT_WORD,
"NEXT_WORD", 0,
"Next Word",
""},
1324 {
PREV_LINE,
"PREVIOUS_LINE", 0,
"Previous Line",
""},
1325 {
NEXT_LINE,
"NEXT_LINE", 0,
"Next Line",
""},
1326 {
PREV_PAGE,
"PREVIOUS_PAGE", 0,
"Previous Page",
""},
1327 {
NEXT_PAGE,
"NEXT_PAGE", 0,
"Next Page",
""},
1328 {0,
nullptr, 0,
nullptr,
nullptr},
1338 Curve *cu = id_cast<Curve *>(obedit->
data);
1339 int selstart, selend;
1348 else if (dir == 1) {
1349 ef->
pos = selend + 1;
1363 Curve *cu = id_cast<Curve *>(obedit->
data);
1454 if (cursmove == -1) {
1464 else if (ef->
pos < 0) {
1502 ot->
name =
"Move Cursor";
1504 ot->
idname =
"FONT_OT_move";
1533 ot->
name =
"Move Select";
1534 ot->
description =
"Move the cursor while selecting";
1535 ot->
idname =
"FONT_OT_move_select";
1550 "Where to move cursor to, to make a selection");
1562 Curve *cu = id_cast<Curve *>(obedit->
data);
1565 int selstart, selend;
1566 bool changed =
false;
1573 selstart = selend = ef->
pos - 1;
1575 selstart =
max_ii(0, selstart);
1577 for (
int i = selstart; i <= selend; i++) {
1597 ot->
name =
"Change Spacing";
1599 ot->
idname =
"FONT_OT_change_spacing";
1615 "Amount to decrease or increase character spacing with",
1629 Curve *cu = id_cast<Curve *>(obedit->
data);
1639 CLAMP(character, 0, 255);
1655 ot->
name =
"Change Character";
1657 ot->
idname =
"FONT_OT_change_character";
1673 "Number to increase or decrease character code with",
1687 Curve *cu = id_cast<Curve *>(obedit->
data);
1702 ot->
name =
"Line Break";
1703 ot->
description =
"Insert line break at cursor position";
1704 ot->
idname =
"FONT_OT_line_break";
1722 {
DEL_PREV_CHAR,
"PREVIOUS_CHARACTER", 0,
"Previous Character",
""},
1726 {
DEL_NEXT_SEL,
"NEXT_OR_SELECTION", 0,
"Next or Selection",
""},
1727 {
DEL_PREV_SEL,
"PREVIOUS_OR_SELECTION", 0,
"Previous or Selection",
""},
1728 {0,
nullptr, 0,
nullptr,
nullptr},
1733#ifdef WITH_INPUT_IME
1734 if (
const std::optional<wmOperatorStatus> status = WM_operator_IME_edit_maybe(
C)) {
1740 Curve *cu = id_cast<Curve *>(obedit->
data);
1743 int range[2] = {0, 0};
1744 bool has_select =
false;
1784 if (ef->
pos >= ef->
len) {
1814 if (range[0] != range[1]) {
1816 int len_remove = range[1] - range[0];
1817 int len_tail = ef->
len - range[1];
1819 for (
int i = 0; i < 2; i++) {
1821 if (*sel <= range[0]) {
1824 else if (*sel >= range[1]) {
1840 ef->
len -= len_remove;
1854 ot->
name =
"Delete";
1855 ot->
description =
"Delete text by cursor position";
1856 ot->
idname =
"FONT_OT_delete";
1871 "Which part of the text to delete");
1883 char32_t *inserted_text;
1896 int inserted_len = 0;
1897 for (a = 0; a <
len; a++) {
1901 MEM_delete(inserted_text);
1912 Curve *cu = id_cast<Curve *>(obedit->
data);
1914 static bool accentcode =
false;
1915 const bool alt =
event->modifier &
KM_ALT;
1916 const bool shift =
event->modifier &
KM_SHIFT;
1917 const bool ctrl =
event->modifier &
KM_CTRL;
1918 char32_t insert_char_override = 0;
1919 char32_t inserted_text[2] = {0};
1926 if (ef->
len != 0 && ef->
pos > 0) {
1933 if (alt && ef->
len != 0 && ef->
pos > 0) {
1939#ifdef WITH_INPUT_IME
1940 if (
const std::optional<wmOperatorStatus> status = WM_operator_IME_insert_maybe(
1941 C, op, event,
"text"))
1949 if ((alt || ctrl || shift) == 0) {
1952 insert_char_override =
'\t';
1955 if (insert_char_override || event->
utf8_buf[0]) {
1956 if (insert_char_override) {
1958 inserted_text[0] = insert_char_override;
1964 int inserted_len = 0;
1990 if (inserted_text[0]) {
1992 char inserted_utf8[8] = {0};
2004 ot->
name =
"Insert Text";
2005 ot->
description =
"Insert text at cursor position";
2006 ot->
idname =
"FONT_OT_text_insert";
2017 RNA_def_string(ot->
srna,
"text",
nullptr, 0,
"Text",
"Text to insert at the cursor position");
2023 "Next typed character will strike through previous, for special character input");
2037 plane, obedit->object_to_world().location(), obedit->object_to_world().ptr()[2]);
2045 mul_m4_v3(obedit->world_to_object().ptr(), mouse_loc);
2047 const float2 cursor_location = {mouse_loc[0], mouse_loc[1]};
2061 if (string_offset > ef->
len || string_offset < 0) {
2077 ef->
selend = string_offset;
2078 ef->
pos = string_offset;
2089 Curve *cu = id_cast<Curve *>(obedit->
data);
2104 switch (event->
type) {
2127 ot->
name =
"Set Selection";
2128 ot->
idname =
"FONT_OT_selection_set";
2146 Curve *cu = id_cast<Curve *>(obedit->
data);
2164 ot->
name =
"Select Word";
2165 ot->
idname =
"FONT_OT_select_word";
2183 Curve *cu = id_cast<Curve *>(obedit->
data);
2188 cu->
tb[i] = cu->
tb[i - 1];
2203 ot->
name =
"Add Text Box";
2205 ot->
idname =
"FONT_OT_textbox_add";
2224 Curve *cu = id_cast<Curve *>(obedit->
data);
2230 cu->
tb[i] = cu->
tb[i + 1];
2247 ot->
name =
"Remove Text Box";
2249 ot->
idname =
"FONT_OT_textbox_remove";
2269 Curve *cu = id_cast<Curve *>(obedit->
data);
2272 if (ef ==
nullptr) {
2283 ef->
len = len_char32;
2307 Curve *cu = id_cast<Curve *>(obedit->
data);
2312 MEM_delete(cu->
str);
2351 {0,
nullptr, 0,
nullptr,
nullptr},
2357 Curve *cu = id_cast<Curve *>(obedit->
data);
2358 int selstart, selend;
2364 for (
int len = (selend - selstart) + 1;
len;
len--,
str++) {
2385 ot->
name =
"Set Case";
2387 ot->
idname =
"FONT_OT_case_set";
2410 Curve *cu = id_cast<Curve *>(obedit->
data);
2416 if (*
str >=
'a' && *
str <=
'z') {
2430 ot->
name =
"Toggle Case";
2432 ot->
idname =
"FONT_OT_case_toggle";
2452 op->
customdata = pprop = MEM_new<PropertyPointerRNA>(
"OpenPropertyPointerRNA");
2503 VFont *vfont =
nullptr;
2516 vfont = id_cast<VFont *>(idptr.
owner_id);
2543 ot->
name =
"Open Font";
2544 ot->
idname =
"FONT_OT_open";
2573 VFont *builtin_font;
2579 if (pprop.
prop ==
nullptr) {
2596 ot->
name =
"Unlink";
2597 ot->
idname =
"FONT_OT_unlink";
2598 ot->
description =
"Unlink active font data-block";
2617 Curve *cu = id_cast<Curve *>(obedit->
data);
2619 const float active_bias_px = 4.0f;
2620 const float mval_fl[2] = {
float(mval[0]),
float(mval[1])};
2622 int i_iter, actbox_select = -1;
2624 float dist_sq_best = dist * dist;
2633 for (i_iter = 0; i_iter < cu->
totbox; i_iter++) {
2634 int i = (i_iter + i_actbox) % cu->
totbox;
2638 float obedit_co[4][3];
2639 float screen_co[4][2];
2650 for (j = 0; j < 4; j++) {
2654 project_ok |= (1 << j);
2658 dist_sq_min = dist_sq_best;
2659 for (j = 0, j_prev = 3; j < 4; j_prev = j++) {
2660 if ((project_ok & (1 << j)) && (project_ok & (1 << j_prev))) {
2662 mval_fl, screen_co[j_prev], screen_co[j]);
2663 dist_sq_min = std::min(dist_sq_min, dist_test_sq);
2669 dist_sq_min += active_bias_px;
2672 if (dist_sq_min < dist_sq_best) {
2673 dist_sq_best = dist_sq_min;
2674 actbox_select = i + 1;
2678 if (actbox_select != -1) {
2679 if (cu->
actbox != actbox_select) {
2680 cu->
actbox = actbox_select;
General operations, lookup, etc. for blender objects.
#define FO_CURS_IS_MOTION(mode)
File and directory operations.
#define BLT_I18NCONTEXT_ID_TEXT
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
#define BLI_assert_unreachable()
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Object * context_active_object(const bContext *C)
bool material_active_index_set(Object *ob, int index)
void init_transform_on_add(Object *object, const float loc[3], const float rot[3])
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
@ BLOCK_THEME_STYLE_POPUP
void block_flag_enable(Block *block, int flag)
const uiStyle * style_get_dpi()
void context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
void block_theme_style_set(Block *block, char theme_style)
Layout & block_layout(Block *block, LayoutDirection direction, LayoutType type, int x, int y, int size, int em, int padding, const uiStyle *style)
void ED_text_to_object(bContext *C, const Text *text, const bool split_lines)
static wmOperatorStatus line_break_exec(bContext *C, wmOperator *)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static int insert_into_textbuf(Object *obedit, uintptr_t c)
Object * BKE_object_add(Main *bmain, Scene *scene, ViewLayer *view_layer, ObjectType type, const char *name) ATTR_NONNULL(1
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
static void font_select_update_primary_clipboard(Object *obedit)
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)
static void font_cursor_set_apply(bContext *C, const wmEvent *event)
static const EnumPropertyItem case_items[]
char * STRNCPY(char(&dst)[N], const char *src)
int RNA_enum_get(PointerRNA *ptr, const char *name)
void FONT_OT_change_spacing(wmOperatorType *ot)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
static bool font_paste_wchar(Object *obedit, const char32_t *str, const size_t str_len, const CharInfo *str_info)
static wmOperatorStatus textbox_remove_exec(bContext *C, wmOperator *op)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
static wmOperatorStatus textbox_add_exec(bContext *C, wmOperator *)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
bool BKE_vfont_is_builtin(const VFont *vfont)
void ED_curve_editfont_load(Object *obedit)
bool WM_operator_poll_or_report_error(bContext *C, wmOperatorType *ot, ReportList *reports)
static char32_t findaccent(char32_t char1, const char code)
PointerRNA RNA_id_pointer_create(ID *id)
eV3DProjStatus ED_view3d_project_float_object(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
void FONT_OT_select_word(wmOperatorType *ot)
bool ED_operator_object_active_editable_font(bContext *C)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void FONT_OT_line_break(wmOperatorType *ot)
static wmOperatorStatus insert_text_exec(bContext *C, wmOperator *op)
static bool font_paste_utf8(bContext *C, const char *str, const size_t str_len)
static void copy_selection(Object *obedit)
void FONT_OT_delete(wmOperatorType *ot)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void BKE_vfont_clipboard_set(const char32_t *text_buf, const CharInfo *info_buf, size_t len)
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
static wmOperatorStatus copy_text_exec(bContext *C, wmOperator *)
static wmOperatorStatus toggle_style_exec(bContext *C, wmOperator *op)
int RNA_int_get(PointerRNA *ptr, const char *name)
wmWindow * CTX_wm_window(const bContext *C)
static wmOperatorStatus set_case_exec(bContext *C, wmOperator *op)
static wmOperatorStatus delete_exec(bContext *C, wmOperator *op)
MINLINE int max_ii(int a, int b)
static wmOperatorStatus move_select_exec(bContext *C, wmOperator *op)
void ED_curve_editfont_free(Object *obedit)
static wmOperatorStatus insert_text_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int font_cursor_text_index_from_event(bContext *C, Object *obedit, const wmEvent *event)
void MEM_delete_void(void *vmemh)
void FONT_OT_unlink(wmOperatorType *ot)
void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
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)
ViewLayer * CTX_data_view_layer(const bContext *C)
void ED_outliner_select_sync_from_object_tag(bContext *C)
static void text_update_edited(bContext *C, Object *obedit, const eEditFontMode mode)
static wmOperatorStatus font_unlink_exec(bContext *C, wmOperator *op)
void BKE_vfont_select_clamp(Curve *cu)
static void text_insert_unicode_cancel(bContext *C, void *arg_block, void *)
static int kill_selection(Object *obedit, int ins)
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
static wmOperatorStatus open_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus set_style_exec(bContext *C, wmOperator *op)
void FONT_OT_move(wmOperatorType *ot)
bool ED_curve_editfont_select_pick(bContext *C, const int mval[2], const SelectPick_Params ¶ms)
void mul_m4_v3(const float M[4][4], float r[3])
void FONT_OT_text_cut(wmOperatorType *ot)
static wmOperatorStatus paste_from_file_invoke(bContext *C, wmOperator *op, const wmEvent *)
size_t size_t BLI_str_utf32_as_utf8(char *__restrict dst, const char32_t *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
static wmOperatorStatus cut_text_exec(bContext *C, wmOperator *)
char * BLI_file_read_text_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size)
void FONT_OT_case_set(wmOperatorType *ot)
VecBase< float, 2 > float2
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
static wmOperatorStatus text_insert_unicode_invoke(bContext *C, wmOperator *, const wmEvent *)
static const EnumPropertyItem style_items[]
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
static ui::Block * wm_block_insert_unicode_create(bContext *C, ARegion *region, void *arg_string)
void FONT_OT_text_copy(wmOperatorType *ot)
void ED_curve_editfont_make(Object *obedit)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
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])
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
static wmOperatorStatus font_selection_set_modal(bContext *C, wmOperator *, const wmEvent *event)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
Object * CTX_data_edit_object(const bContext *C)
static wmOperatorStatus set_style(bContext *C, const eCharInfoFlag style, const bool clear)
bool BKE_vfont_to_curve(Object *ob, eEditFontMode mode)
void BKE_vfont_clipboard_get(char32_t **r_text_buf, CharInfo **r_info_buf, size_t *r_len_utf8, size_t *r_len_utf32)
static const EnumPropertyItem move_type_items[]
static wmOperatorStatus toggle_case_exec(bContext *C, wmOperator *)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
void FONT_OT_open(wmOperatorType *ot)
void FONT_OT_textbox_remove(wmOperatorType *ot)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
static wmOperatorStatus paste_from_file(bContext *C, ReportList *reports, const char *filepath)
static wmOperatorStatus font_open_exec(bContext *C, wmOperator *op)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
void FONT_OT_text_paste(wmOperatorType *ot)
void FONT_OT_textbox_add(wmOperatorType *ot)
static wmOperatorStatus move_cursor(bContext *C, int type, const bool select)
void FONT_OT_style_toggle(wmOperatorType *ot)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void ED_view3d_init_mats_rv3d(const Object *ob, RegionView3D *rv3d)
int BLI_path_slash_ensure(char *path, size_t path_maxncpy) ATTR_NONNULL(1)
static char * font_select_to_buffer(Object *obedit)
int BKE_vfont_select_get(const Curve *cu, int *r_start, int *r_end)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
static wmOperatorStatus change_spacing_exec(bContext *C, wmOperator *op)
void FONT_OT_change_character(wmOperatorType *ot)
bool ED_operator_editfont(bContext *C)
_W64 unsigned int uintptr_t
void mul_mat3_m4_v3(const float mat[4][4], float r[3])
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void BKE_curve_rect_from_textbox(const Curve *cu, const TextBox *tb, rctf *r_rect)
@ WM_CAPABILITY_CLIPBOARD_PRIMARY
void BLI_str_cursor_step_utf32(const char32_t *str, int str_maxlen, int *pos, eStrCursorJumpDirection direction, eStrCursorJumpType jump, bool use_init_step)
static void txt_add_object(bContext *C, const TextLine *firstline, int totline, const float offset[3])
static wmOperatorStatus paste_text_exec(bContext *C, wmOperator *op)
void FONT_OT_case_toggle(wmOperatorType *ot)
MINLINE void add_v3_v3(float r[3], const float a[3])
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
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)
static void font_open_cancel(bContext *, wmOperator *op)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
MINLINE void copy_v3_fl3(float v[3], float x, float y, float z)
void FONT_OT_select_all(wmOperatorType *ot)
Main * CTX_data_main(const bContext *C)
void FONT_OT_style_set(wmOperatorType *ot)
char * WM_clipboard_text_get(bool selection, bool ensure_utf8, int *r_len)
void BKE_vfont_clipboard_free()
eWM_CapabilitiesFlag WM_capabilities_flag()
bool BLI_str_cursor_step_next_utf32(const char32_t *str, int str_maxlen, int *pos)
void FONT_OT_selection_set(wmOperatorType *ot)
void WM_clipboard_text_set(const char *buf, bool selection)
char32_t BLI_str_utf32_char_to_lower(char32_t wc)
void FONT_OT_move_select(wmOperatorType *ot)
@ ID_RECALC_GEOMETRY_ALL_MODES
VFont * BKE_vfont_builtin_ensure()
void FONT_OT_text_insert(wmOperatorType *ot)
VFont * BKE_vfont_load(Main *bmain, const char *filepath)
unsigned int BLI_str_utf8_as_unicode_or_error(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void DEG_relations_tag_update(Main *bmain)
Scene * CTX_data_scene(const bContext *C)
size_t BLI_strlen_utf8_ex(const char *strc, size_t *r_len_bytes) ATTR_NONNULL(1
static bool paste_selection(Object *obedit, ReportList *reports)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
void BKE_object_where_is_calc(Depsgraph *depsgraph, Scene *scene, Object *ob)
size_t BLI_strlen_utf8(const char *strc) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
float ED_view3d_select_dist_px()
size_t BLI_str_utf32_as_utf8_len(const char32_t *src) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool BLI_str_cursor_step_prev_utf32(const char32_t *str, int str_maxlen, int *pos)
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)
Object * CTX_data_active_object(const bContext *C)
void BLI_str_cursor_step_bounds_utf32(const char32_t *str, int str_maxlen, int pos, int *r_start, int *r_end)
static wmOperatorStatus move_exec(bContext *C, wmOperator *op)
int BKE_vfont_cursor_to_text_index(Object *ob, const float2 &cursor_location)
ARegion * CTX_wm_region(const bContext *C)
void FONT_OT_text_paste_from_file(wmOperatorType *ot)
void FONT_OT_text_insert_unicode(wmOperatorType *ot)
static bool move_cursor_drop_select(Object *obedit, int dir)
float RNA_float_get(PointerRNA *ptr, const char *name)
static const EnumPropertyItem delete_type_items[]
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
char32_t BLI_str_utf32_char_to_upper(char32_t wc)
static wmOperatorStatus change_character_exec(bContext *C, wmOperator *op)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
static wmOperatorStatus font_select_all_exec(bContext *C, wmOperator *)
void BKE_curve_editfont_free(Curve *cu)
static wmOperatorStatus font_select_word_exec(bContext *C, wmOperator *)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
static wmOperatorStatus set_case(bContext *C, int ccase)
static wmOperatorStatus paste_from_file_exec(bContext *C, wmOperator *op)
static void text_insert_unicode_confirm(bContext *C, void *arg_block, void *arg_string)
static wmOperatorStatus font_selection_set_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void font_ui_template_init(bContext *C, wmOperator *op)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
struct EditFont * editfont
struct CharInfo * strinfo
EditFontSelBox * selboxes
void label(StringRef name, int icon)
Layout & split(float percentage, bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) cancel(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type