|
Blender V5.0
|
#include <algorithm>#include <cerrno>#include <cstdlib>#include <cstring>#include <cwchar>#include <fcntl.h>#include "MEM_guardedalloc.h"#include "BLI_fileops.h"#include "BLI_listbase.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_string_cursor_utf8.h"#include "BLI_utildefines.h"#include "DNA_curve_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_text_types.h"#include "DNA_vfont_types.h"#include "BKE_context.hh"#include "BKE_curve.hh"#include "BKE_global.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_library.hh"#include "BKE_main.hh"#include "BKE_object.hh"#include "BKE_report.hh"#include "BKE_vfont.hh"#include "BLI_string_utf8.h"#include "BLT_translation.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_curve.hh"#include "ED_object.hh"#include "ED_outliner.hh"#include "ED_screen.hh"#include "ED_view3d.hh"#include "UI_interface.hh"#include "UI_interface_layout.hh"#include "curve_intern.hh"Go to the source code of this file.
Macros | |
| #define | MAXTEXT 32766 |
Set Style Operator | |
| static const EnumPropertyItem | style_items [] |
| static wmOperatorStatus | set_style (bContext *C, const int style, const bool clear) |
| static wmOperatorStatus | set_style_exec (bContext *C, wmOperator *op) |
| void | FONT_OT_style_set (wmOperatorType *ot) |
Move Operator | |
| static const EnumPropertyItem | move_type_items [] |
| static bool | move_cursor_drop_select (Object *obedit, int dir) |
| static wmOperatorStatus | move_cursor (bContext *C, int type, const bool select) |
| static wmOperatorStatus | move_exec (bContext *C, wmOperator *op) |
| void | FONT_OT_move (wmOperatorType *ot) |
Delete Operator | |
| static const EnumPropertyItem | delete_type_items [] |
| static wmOperatorStatus | delete_exec (bContext *C, wmOperator *op) |
| void | FONT_OT_delete (wmOperatorType *ot) |
| static wmOperatorStatus | font_unlink_exec (bContext *C, wmOperator *op) |
| void | FONT_OT_unlink (wmOperatorType *ot) |
| bool | ED_curve_editfont_select_pick (bContext *C, const int mval[2], const SelectPick_Params ¶ms) |
Set Case Operator | |
| static const EnumPropertyItem | case_items [] |
| static wmOperatorStatus | set_case (bContext *C, int ccase) |
| static wmOperatorStatus | set_case_exec (bContext *C, wmOperator *op) |
| void | FONT_OT_case_set (wmOperatorType *ot) |
| #define MAXTEXT 32766 |
Definition at line 69 of file editfont.cc.
Referenced by ED_curve_editfont_make(), font_paste_wchar(), insert_into_textbuf(), insert_text_exec(), move_cursor(), paste_text_exec(), and txt_add_object().
|
static |
Definition at line 1612 of file editfont.cc.
References C, CLAMP, CTX_data_edit_object(), Object::data, Curve::editfont, FO_EDIT, OPERATOR_CANCELLED, OPERATOR_FINISHED, EditFont::pos, wmOperator::ptr, RNA_int_get(), text_update_edited(), and EditFont::textbuf.
Referenced by FONT_OT_change_character().
|
static |
Definition at line 1545 of file editfont.cc.
References BKE_vfont_select_get(), C, CTX_data_edit_object(), Object::data, Curve::editfont, FO_EDIT, i, CharInfo::kern, max_ii(), OPERATOR_CANCELLED, OPERATOR_FINISHED, EditFont::pos, wmOperator::ptr, RNA_float_get(), text_update_edited(), and EditFont::textbufinfo.
Referenced by FONT_OT_change_spacing().
|
static |
Definition at line 1094 of file editfont.cc.
References BKE_vfont_clipboard_get(), BKE_vfont_clipboard_set(), BKE_vfont_select_get(), BLI_str_utf32_as_utf8(), Object::data, Curve::editfont, len_utf8, MEM_freeN(), MEM_malloc_arrayN(), EditFont::textbuf, EditFont::textbufinfo, and WM_clipboard_text_set().
Referenced by copy_text_exec(), and cut_text_exec().
|
static |
Definition at line 1120 of file editfont.cc.
References C, copy_selection(), CTX_data_edit_object(), and OPERATOR_FINISHED.
Referenced by FONT_OT_text_copy().
|
static |
Definition at line 1147 of file editfont.cc.
References BKE_vfont_select_get(), C, copy_selection(), CTX_data_edit_object(), Object::data, FO_EDIT, kill_selection(), OPERATOR_CANCELLED, OPERATOR_FINISHED, and text_update_edited().
Referenced by FONT_OT_text_cut().
|
static |
Definition at line 1717 of file editfont.cc.
References BKE_vfont_select_clamp(), BKE_vfont_select_get(), BLI_assert, BLI_str_cursor_step_next_utf32(), BLI_str_cursor_step_prev_utf32(), BLI_str_cursor_step_utf32(), C, CTX_data_edit_object(), Object::data, DEL_NEXT_CHAR, DEL_NEXT_SEL, DEL_NEXT_WORD, DEL_PREV_CHAR, DEL_PREV_SEL, DEL_PREV_WORD, DEL_SELECTION, Curve::editfont, FO_EDIT, i, kill_selection(), EditFont::len, OPERATOR_CANCELLED, OPERATOR_FINISHED, EditFont::pos, pos, wmOperator::ptr, RNA_enum_get(), EditFont::selend, EditFont::selstart, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, STRCUR_JUMP_DELIM, text_update_edited(), EditFont::textbuf, and EditFont::textbufinfo.
Referenced by FONT_OT_delete(), MASK_OT_delete(), and PARTICLE_OT_delete().
| void ED_curve_editfont_free | ( | Object * | obedit | ) |
Definition at line 2307 of file editfont.cc.
References BKE_curve_editfont_free(), and Object::data.
Referenced by blender::ed::object::editmode_load_free_ex().
| void ED_curve_editfont_load | ( | Object * | obedit | ) |
Definition at line 2275 of file editfont.cc.
References BLI_str_utf32_as_utf8(), BLI_str_utf32_as_utf8_len(), Object::data, Curve::editfont, Curve::len, EditFont::len, Curve::len_char32, MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), Curve::pos, EditFont::pos, Curve::selend, EditFont::selend, Curve::selstart, EditFont::selstart, Curve::str, Curve::strinfo, EditFont::textbuf, and EditFont::textbufinfo.
Referenced by blender::ed::object::editmode_load_free_ex().
| void ED_curve_editfont_make | ( | Object * | obedit | ) |
Definition at line 2236 of file editfont.cc.
References BKE_vfont_select_clamp(), BLI_assert, BLI_str_utf8_as_utf32(), Curve::curinfo, Object::data, Curve::editfont, EditFont::len, Curve::len_char32, MAXTEXT, MEM_calloc_arrayN(), MEM_callocN(), Curve::pos, EditFont::pos, Curve::selend, EditFont::selend, Curve::selstart, EditFont::selstart, Curve::str, Curve::strinfo, EditFont::textbuf, and EditFont::textbufinfo.
Referenced by blender::ed::object::editmode_enter_ex().
| bool ED_curve_editfont_select_pick | ( | bContext * | C, |
| const int | mval[2], | ||
| const SelectPick_Params & | params ) |
Text box selection.
Definition at line 2570 of file editfont.cc.
References Curve::actbox, BKE_curve_rect_from_textbox(), C, copy_v3_fl3(), CTX_data_edit_object(), CTX_data_ensure_evaluated_depsgraph(), Object::data, DEG_id_tag_update(), depsgraph, dist_squared_to_line_segment_v2(), ED_view3d_init_mats_rv3d(), ED_view3d_project_float_object(), ED_view3d_select_dist_px(), ED_view3d_viewcontext_init(), float, i, ID_RECALC_SYNC_TO_EVAL, max_ii(), NC_GEOM, ND_DATA, ViewContext::obedit, params, ViewContext::region, ViewContext::rv3d, Curve::tb, Curve::totbox, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, WM_event_add_notifier(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by view3d_select_exec().
Definition at line 892 of file editfont.cc.
References BLI_listbase_count(), C, CTX_data_main(), CTX_wm_region_view3d(), DEG_relations_tag_update(), ED_outliner_select_sync_from_object_tag(), ListBase::first, Text::lines, LISTBASE_FOREACH, mul_mat3_m4_v3(), txt_add_object(), and RegionView3D::viewinv.
Referenced by text_to_3d_object_exec().
|
static |
Definition at line 78 of file editfont.cc.
Referenced by insert_text_invoke().
Definition at line 2021 of file editfont.cc.
References BLI_assert, C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), Curve::curinfo, Object::data, DEG_get_evaluated(), DEG_id_tag_update(), depsgraph, Curve::editfont, font_cursor_text_index_from_event(), ID_RECALC_SELECT, EditFont::len, CharInfo::mat_nr, blender::ed::object::material_active_index_set(), NC_GEOM, ND_DATA, EditFont::pos, EditFont::selboxes, EditFont::selend, EditFont::selstart, EditFont::textbufinfo, and WM_event_add_notifier().
Referenced by font_selection_set_invoke(), and font_selection_set_modal().
|
static |
Definition at line 2002 of file editfont.cc.
References BKE_vfont_cursor_to_text_index(), C, CTX_wm_region(), ED_view3d_win_to_3d_on_plane(), float, mul_m4_v3(), wmEvent::mval, and plane_from_point_normal_v3().
Referenced by font_cursor_set_apply().
|
static |
Definition at line 2422 of file editfont.cc.
References wmOperator::customdata.
Referenced by FONT_OT_open().
|
static |
Definition at line 2428 of file editfont.cc.
References BKE_vfont_load(), C, CTX_data_main(), wmOperator::customdata, FILE_MAX, font_ui_template_init(), VFont::id, id_us_min(), OPERATOR_CANCELLED, OPERATOR_FINISHED, PropertyPointerRNA::prop, PropertyPointerRNA::ptr, wmOperator::ptr, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), and RNA_string_get().
Referenced by FONT_OT_open(), and open_invoke().
| void FONT_OT_case_set | ( | wmOperatorType * | ot | ) |
Definition at line 2350 of file editfont.cc.
References BLT_I18NCONTEXT_ID_TEXT, case_items, CASE_LOWER, ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), RNA_def_property_translation_context(), and set_case_exec().
Referenced by ED_operatortypes_curve().
| void FONT_OT_case_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 2397 of file editfont.cc.
References ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and toggle_case_exec().
Referenced by ED_operatortypes_curve().
| void FONT_OT_change_character | ( | wmOperatorType * | ot | ) |
Definition at line 1638 of file editfont.cc.
References change_character_exec(), ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_int().
Referenced by ED_operatortypes_curve().
| void FONT_OT_change_spacing | ( | wmOperatorType * | ot | ) |
Definition at line 1580 of file editfont.cc.
References change_spacing_exec(), ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_float().
Referenced by ED_operatortypes_curve().
| void FONT_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 1831 of file editfont.cc.
References DEL_PREV_CHAR, delete_exec(), delete_type_items, ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_enum().
Referenced by ED_operatortypes_curve().
| void FONT_OT_line_break | ( | wmOperatorType * | ot | ) |
Definition at line 1685 of file editfont.cc.
References ED_operator_editfont(), line_break_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_curve().
| void FONT_OT_move | ( | wmOperatorType * | ot | ) |
Definition at line 1485 of file editfont.cc.
References ED_operator_editfont(), LINE_BEGIN, move_exec(), move_type_items, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_enum().
Referenced by ED_operatortypes_curve().
| void FONT_OT_move_select | ( | wmOperatorType * | ot | ) |
Definition at line 1516 of file editfont.cc.
References ED_operator_editfont(), LINE_BEGIN, move_select_exec(), move_type_items, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_enum().
Referenced by ED_operatortypes_curve().
| void FONT_OT_open | ( | wmOperatorType * | ot | ) |
Definition at line 2506 of file editfont.cc.
References FILE_IMGDISPLAY, FILE_OPENFILE, FILE_SORT_ALPHA, FILE_SPECIAL, FILE_TYPE_FOLDER, FILE_TYPE_FTFONT, font_open_cancel(), font_open_exec(), open_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_curve().
| void FONT_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 1073 of file editfont.cc.
References ED_operator_editfont(), font_select_all_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_curve().
| void FONT_OT_select_word | ( | wmOperatorType * | ot | ) |
Definition at line 2131 of file editfont.cc.
References ED_operator_editfont(), font_select_word_exec(), and ot.
Referenced by ED_operatortypes_curve().
| void FONT_OT_selection_set | ( | wmOperatorType * | ot | ) |
Definition at line 2094 of file editfont.cc.
References ED_operator_editfont(), font_selection_set_invoke(), font_selection_set_modal(), and ot.
Referenced by ED_operatortypes_curve().
| void FONT_OT_style_set | ( | wmOperatorType * | ot | ) |
Definition at line 988 of file editfont.cc.
References CU_CHINFO_BOLD, ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), RNA_def_enum(), set_style_exec(), and style_items.
Referenced by ED_operatortypes_curve().
| void FONT_OT_style_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 1029 of file editfont.cc.
References CU_CHINFO_BOLD, ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_enum(), style_items, and toggle_style_exec().
Referenced by ED_operatortypes_curve().
| void FONT_OT_text_copy | ( | wmOperatorType * | ot | ) |
Definition at line 1129 of file editfont.cc.
References copy_text_exec(), ED_operator_editfont(), and ot.
Referenced by ED_operatortypes_curve().
| void FONT_OT_text_cut | ( | wmOperatorType * | ot | ) |
Definition at line 1165 of file editfont.cc.
References cut_text_exec(), ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_curve().
| void FONT_OT_text_insert | ( | wmOperatorType * | ot | ) |
Definition at line 1971 of file editfont.cc.
References ED_operator_editfont(), insert_text_exec(), insert_text_invoke(), OPTYPE_UNDO, ot, RNA_def_boolean(), and RNA_def_string().
Referenced by ED_operatortypes_curve().
| void FONT_OT_text_insert_unicode | ( | wmOperatorType * | ot | ) |
Definition at line 793 of file editfont.cc.
References ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and text_insert_unicode_invoke().
Referenced by ED_operatortypes_curve().
| void FONT_OT_text_paste | ( | wmOperatorType * | ot | ) |
Definition at line 1271 of file editfont.cc.
References ED_operator_editfont(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, paste_text_exec(), PROP_SKIP_SAVE, RNA_def_boolean(), and RNA_def_property_flag().
Referenced by ED_operatortypes_curve().
| void FONT_OT_text_paste_from_file | ( | wmOperatorType * | ot | ) |
Definition at line 637 of file editfont.cc.
References ED_operator_editfont(), FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_SPECIAL, FILE_TYPE_FOLDER, FILE_TYPE_TEXT, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paste_from_file_exec(), paste_from_file_invoke(), WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_curve().
| void FONT_OT_textbox_add | ( | wmOperatorType * | ot | ) |
Definition at line 2169 of file editfont.cc.
References ED_operator_object_active_editable_font(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and textbox_add_exec().
Referenced by ED_operatortypes_curve().
| void FONT_OT_textbox_remove | ( | wmOperatorType * | ot | ) |
Definition at line 2213 of file editfont.cc.
References ED_operator_object_active_editable_font(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_int(), and textbox_remove_exec().
Referenced by ED_operatortypes_curve().
| void FONT_OT_unlink | ( | wmOperatorType * | ot | ) |
Definition at line 2559 of file editfont.cc.
References font_unlink_exec(), and ot.
Referenced by ED_operatortypes_curve().
|
static |
Definition at line 536 of file editfont.cc.
References BLI_str_utf8_as_utf32(), C, CTX_data_edit_object(), font_paste_wchar(), MEM_freeN(), MEM_malloc_arrayN(), and str.
Referenced by paste_from_file(), and paste_text_exec().
|
static |
Definition at line 484 of file editfont.cc.
References BKE_vfont_select_get(), CLAMP_MAX, Object::data, Curve::editfont, i, kill_selection(), EditFont::len, CharInfo::mat_nr, MAXTEXT, EditFont::pos, size(), str, EditFont::textbuf, EditFont::textbufinfo, and Object::totcol.
Referenced by font_paste_utf8(), paste_selection(), and text_insert_unicode_confirm().
|
static |
Definition at line 1054 of file editfont.cc.
References C, CTX_data_edit_object(), Object::data, Curve::editfont, FO_SELCHANGE, font_select_update_primary_clipboard(), EditFont::len, OPERATOR_CANCELLED, OPERATOR_FINISHED, EditFont::pos, EditFont::selend, EditFont::selstart, and text_update_edited().
Referenced by FONT_OT_select_all().
|
static |
Definition at line 560 of file editfont.cc.
References BKE_vfont_select_get(), BLI_str_utf32_as_utf8(), BLI_str_utf32_as_utf8_len_ex(), Object::data, Curve::editfont, len_utf8, MEM_malloc_arrayN(), and EditFont::textbuf.
Referenced by font_select_update_primary_clipboard().
|
static |
Definition at line 461 of file editfont.cc.
References font_select_to_buffer(), G, MEM_freeN(), WM_capabilities_flag(), WM_CAPABILITY_CLIPBOARD_PRIMARY, and WM_clipboard_text_set().
Referenced by font_select_all_exec(), font_select_word_exec(), and move_cursor().
|
static |
Definition at line 2113 of file editfont.cc.
References BLI_str_cursor_step_bounds_utf32(), C, CTX_data_edit_object(), Object::data, Curve::editfont, FO_CURS, font_select_update_primary_clipboard(), EditFont::len, OPERATOR_FINISHED, EditFont::pos, EditFont::selend, EditFont::selstart, text_update_edited(), and EditFont::textbuf.
Referenced by FONT_OT_select_word().
|
static |
Definition at line 2054 of file editfont.cc.
References C, CTX_data_active_object(), Object::data, Curve::editfont, font_cursor_set_apply(), OPERATOR_RUNNING_MODAL, EditFont::selend, EditFont::selstart, and WM_event_add_modal_handler().
Referenced by FONT_OT_selection_set().
|
static |
Definition at line 2070 of file editfont.cc.
References C, font_cursor_set_apply(), KM_RELEASE, LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, wmEvent::type, and wmEvent::val.
Referenced by FONT_OT_selection_set().
|
static |
Definition at line 2414 of file editfont.cc.
References C, wmOperator::customdata, PropertyPointerRNA::prop, PropertyPointerRNA::ptr, and UI_context_active_but_prop_get_templateID().
Referenced by font_open_exec(), and open_invoke().
|
static |
Definition at line 2537 of file editfont.cc.
References BKE_report(), BKE_vfont_builtin_ensure(), C, VFont::id, OPERATOR_CANCELLED, OPERATOR_FINISHED, PropertyPointerRNA::prop, PropertyPointerRNA::ptr, wmOperator::reports, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RPT_ERROR, and UI_context_active_but_prop_get_templateID().
Referenced by FONT_OT_unlink().
|
static |
Definition at line 378 of file editfont.cc.
References Object::actcol, Curve::curinfo, Object::data, Curve::editfont, CharInfo::kern, EditFont::len, CharInfo::mat_nr, MAXTEXT, EditFont::pos, EditFont::textbuf, EditFont::textbufinfo, and x.
Referenced by insert_text_exec(), insert_text_invoke(), and line_break_exec().
|
static |
Definition at line 1860 of file editfont.cc.
References BLI_str_utf8_as_utf32(), BLI_strlen_utf8(), C, CTX_data_edit_object(), FO_EDIT, insert_into_textbuf(), kill_selection(), len, MAXTEXT, MEM_calloc_arrayN(), MEM_freeN(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get(), RNA_struct_property_is_set(), and text_update_edited().
Referenced by FONT_OT_text_insert(), and insert_text_invoke().
|
static |
Definition at line 1888 of file editfont.cc.
References BLI_assert, BLI_str_utf32_as_utf8(), BLI_str_utf8_as_unicode_or_error(), C, CTX_data_edit_object(), Object::data, Curve::editfont, EVT_BACKSPACEKEY, EVT_TABKEY, findaccent(), FO_EDIT, insert_into_textbuf(), insert_text_exec(), kill_selection(), KM_ALT, KM_CTRL, KM_SHIFT, EditFont::len, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, EditFont::pos, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), text_update_edited(), EditFont::textbuf, wmEvent::type, and wmEvent::utf8_buf.
Referenced by FONT_OT_text_insert().
|
static |
Definition at line 433 of file editfont.cc.
References BKE_vfont_select_get(), Object::data, Curve::editfont, EditFont::len, EditFont::pos, EditFont::selend, EditFont::selstart, size(), EditFont::textbuf, and EditFont::textbufinfo.
Referenced by cut_text_exec(), delete_exec(), font_paste_wchar(), insert_text_exec(), and insert_text_invoke().
|
static |
Definition at line 1670 of file editfont.cc.
References C, CTX_data_edit_object(), Object::data, Curve::editfont, FO_EDIT, insert_into_textbuf(), OPERATOR_FINISHED, EditFont::selend, EditFont::selstart, and text_update_edited().
Referenced by FONT_OT_line_break().
|
static |
Definition at line 1345 of file editfont.cc.
References BKE_vfont_to_curve(), BLI_str_cursor_step_next_utf32(), BLI_str_cursor_step_prev_utf32(), BLI_str_cursor_step_utf32(), C, CTX_data_edit_object(), CTX_data_ensure_evaluated_depsgraph(), Object::data, DEG_get_evaluated(), depsgraph, Curve::editfont, FO_CURS, FO_CURS_IS_MOTION, FO_CURSDOWN, FO_CURSUP, FO_LINE_BEGIN, FO_LINE_END, FO_PAGEDOWN, FO_PAGEUP, FO_SELCHANGE, font_select_update_primary_clipboard(), EditFont::len, LINE_BEGIN, LINE_END, MAXTEXT, move_cursor_drop_select(), NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, OPERATOR_CANCELLED, OPERATOR_FINISHED, EditFont::pos, pos, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, select, EditFont::selend, EditFont::selstart, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, STRCUR_JUMP_DELIM, TEXT_BEGIN, TEXT_END, text_update_edited(), and EditFont::textbuf.
Referenced by move_exec(), and move_select_exec().
|
static |
Implement standard behavior from GUI text editing fields (including Blender's UI) where horizontal motion drops the selection and places the cursor at the selection bounds (based on the motion direction) instead of moving the cursor.
Definition at line 1322 of file editfont.cc.
References BKE_vfont_select_get(), BLI_assert_unreachable, Object::data, Curve::editfont, and EditFont::pos.
Referenced by move_cursor().
|
static |
Definition at line 1478 of file editfont.cc.
References C, move_cursor(), wmOperator::ptr, and RNA_enum_get().
Referenced by FONT_OT_move().
|
static |
Definition at line 1509 of file editfont.cc.
References C, move_cursor(), wmOperator::ptr, and RNA_enum_get().
Referenced by FONT_OT_move_select().
|
static |
Definition at line 2467 of file editfont.cc.
References BKE_vfont_is_builtin(), BLI_path_abs(), BLI_path_slash_ensure(), C, wmOperator::customdata, FILE_MAX, VFont::filepath, font_open_exec(), font_ui_template_init(), VFont::id, ID_BLEND_PATH_FROM_GLOBAL, OPERATOR_RUNNING_MODAL, PointerRNA::owner_id, PropertyPointerRNA::prop, wmOperator::ptr, RNA_property_is_set(), RNA_property_pointer_get(), RNA_property_string_set(), RNA_struct_find_property(), STRNCPY(), U, and WM_event_add_fileselect().
Referenced by CLIP_OT_open(), and FONT_OT_open().
|
static |
Definition at line 583 of file editfont.cc.
References BKE_reportf(), BLI_file_read_text_as_mem(), C, CTX_data_edit_object(), FO_EDIT, font_paste_utf8(), MEM_freeN(), OPERATOR_CANCELLED, OPERATOR_FINISHED, RPT_ERROR, and text_update_edited().
Referenced by paste_from_file_exec().
|
static |
Definition at line 611 of file editfont.cc.
References C, wmOperator::flag, OP_IS_INVOKE, OPERATOR_CANCELLED, paste_from_file(), wmOperator::ptr, wmOperator::reports, RNA_string_get(), wmOperator::type, and WM_operator_poll_or_report_error().
Referenced by FONT_OT_text_paste_from_file(), and paste_from_file_invoke().
|
static |
Definition at line 624 of file editfont.cc.
References C, OPERATOR_RUNNING_MODAL, paste_from_file_exec(), wmOperator::ptr, RNA_struct_property_is_set(), and WM_event_add_fileselect().
Referenced by FONT_OT_text_paste_from_file().
|
static |
Definition at line 1186 of file editfont.cc.
References BKE_report(), BKE_vfont_clipboard_get(), font_paste_wchar(), len, and RPT_WARNING.
Referenced by paste_text_exec().
|
static |
Definition at line 1202 of file editfont.cc.
References BKE_report(), BKE_vfont_clipboard_free(), BKE_vfont_clipboard_get(), BLI_str_utf32_as_utf8(), C, CTX_data_edit_object(), FO_EDIT, font_paste_utf8(), len, len_utf8, MAXTEXT, MEM_freeN(), MEM_malloc_arrayN(), OPERATOR_CANCELLED, OPERATOR_FINISHED, paste_selection(), wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, STREQ, text_update_edited(), and WM_clipboard_text_get().
Referenced by FONT_OT_text_paste().
|
static |
Definition at line 2324 of file editfont.cc.
References BKE_vfont_select_get(), BLI_str_utf32_char_to_lower(), BLI_str_utf32_char_to_upper(), C, CASE_LOWER, CTX_data_edit_object(), Object::data, Curve::editfont, FO_EDIT, len, OPERATOR_FINISHED, str, text_update_edited(), and EditFont::textbuf.
Referenced by set_case_exec(), and toggle_case_exec().
|
static |
Definition at line 2345 of file editfont.cc.
References C, wmOperator::ptr, RNA_enum_get(), and set_case().
Referenced by FONT_OT_case_set().
|
static |
Definition at line 954 of file editfont.cc.
References BKE_vfont_select_get(), C, clear(), CTX_data_edit_object(), Object::data, DEG_id_tag_update(), Curve::editfont, CharInfo::flag, i, NC_GEOM, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, EditFont::textbufinfo, and WM_event_add_notifier().
Referenced by set_style_exec(), and toggle_style_exec().
|
static |
Definition at line 980 of file editfont.cc.
References C, clear(), wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), and set_style().
Referenced by FONT_OT_style_set().
|
static |
Definition at line 668 of file editfont.cc.
References C, CTX_wm_window(), and UI_popup_block_close().
Referenced by wm_block_insert_unicode_create().
|
static |
Definition at line 674 of file editfont.cc.
References C, CTX_data_edit_object(), CTX_wm_window(), FO_EDIT, font_paste_wchar(), text_update_edited(), and UI_popup_block_close().
Referenced by wm_block_insert_unicode_create().
|
static |
Definition at line 783 of file editfont.cc.
References C, MEM_freeN(), MEM_malloc_arrayN(), OPERATOR_FINISHED, UI_popup_block_invoke_ex(), and wm_block_insert_unicode_create().
Referenced by FONT_OT_text_insert_unicode().
|
static |
Definition at line 406 of file editfont.cc.
References BKE_vfont_to_curve(), BLI_assert, C, CTX_data_ensure_evaluated_depsgraph(), Curve::curinfo, Object::data, DEG_get_evaluated(), DEG_id_tag_update(), depsgraph, Curve::editfont, FO_EDIT, ID_RECALC_SELECT, EditFont::len, CharInfo::mat_nr, blender::ed::object::material_active_index_set(), NC_GEOM, ND_DATA, EditFont::pos, EditFont::textbufinfo, and WM_event_add_notifier().
Referenced by change_character_exec(), change_spacing_exec(), cut_text_exec(), delete_exec(), font_select_all_exec(), font_select_word_exec(), insert_text_exec(), insert_text_invoke(), line_break_exec(), move_cursor(), paste_from_file(), paste_text_exec(), set_case(), text_insert_unicode_confirm(), and text_listener().
|
static |
Definition at line 2149 of file editfont.cc.
References Curve::actbox, C, CTX_data_active_object(), Object::data, DEG_id_tag_update(), i, NC_GEOM, ND_DATA, OPERATOR_FINISHED, Curve::tb, Curve::totbox, and WM_event_add_notifier().
Referenced by FONT_OT_textbox_add().
|
static |
Definition at line 2190 of file editfont.cc.
References Curve::actbox, C, CTX_data_active_object(), Object::data, DEG_id_tag_update(), i, NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), Curve::tb, Curve::totbox, and WM_event_add_notifier().
Referenced by FONT_OT_textbox_remove().
|
static |
Definition at line 2377 of file editfont.cc.
References C, CASE_LOWER, CASE_UPPER, CTX_data_edit_object(), Object::data, Curve::editfont, set_case(), str, and EditFont::textbuf.
Referenced by FONT_OT_case_toggle().
|
static |
Definition at line 1014 of file editfont.cc.
References BKE_vfont_select_get(), C, clear(), CTX_data_edit_object(), Curve::curinfo, Object::data, CharInfo::flag, OPERATOR_CANCELLED, wmOperator::ptr, RNA_enum_get(), and set_style().
Referenced by FONT_OT_style_toggle().
|
static |
Definition at line 814 of file editfont.cc.
References add_v3_v3(), BKE_object_add(), BKE_object_where_is_calc(), BKE_vfont_builtin_ensure(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_strlen_utf8_ex(), C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), Object::data, depsgraph, VFont::id, id_us_plus(), blender::ed::object::init_transform_on_add(), Curve::len, Curve::len_char32, TextLine::line, Object::loc, MAXTEXT, MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), NA_ADDED, NC_OBJECT, TextLine::next, OB_FONT, Curve::pos, rot, Curve::str, Curve::strinfo, Curve::vfont, and WM_event_add_notifier().
Referenced by ED_text_to_object().
|
static |
Definition at line 701 of file editfont.cc.
References blender::ui::block_layout(), But, C, blender::ui::Emboss, IFACE_, uiLayout::label(), blender::ui::Panel, RPT_, uiLayout::separator(), split(), uiLayout::split(), Text, text_insert_unicode_cancel(), text_insert_unicode_confirm(), TIP_, UI_block_begin(), UI_block_bounds_set_popup(), UI_block_flag_enable(), UI_block_func_set(), UI_BLOCK_KEEP_OPEN, UI_BLOCK_NO_WIN_CLIP, UI_BLOCK_NUMSELECT, UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), UI_BUT_ACTIVATE_ON_INIT, UI_BUT_ACTIVE_DEFAULT, UI_but_drawflag_disable(), UI_but_flag_enable(), UI_but_func_set(), UI_BUT_TEXT_LEFT, UI_SCALE_FAC, UI_style_get_dpi(), UI_UNIT_Y, uiDefBut(), uiDefIconTextBut(), uiItemL_ex(), blender::ui::Vertical, and uiLayout::width().
Referenced by text_insert_unicode_invoke().
|
static |
Definition at line 2318 of file editfont.cc.
Referenced by FONT_OT_case_set().
|
static |
Definition at line 1706 of file editfont.cc.
Referenced by FONT_OT_delete(), PARTICLE_OT_delete(), and TEXT_OT_delete().
|
static |
Definition at line 1301 of file editfont.cc.
Referenced by FONT_OT_move(), FONT_OT_move_select(), TEXT_OT_move(), and TEXT_OT_move_select().
|
static |
Definition at line 946 of file editfont.cc.
Referenced by FONT_OT_style_set(), and FONT_OT_style_toggle().