Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <wchar.h>
#include <unistd.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_curve_types.h"
#include "DNA_object_types.h"
#include "DNA_vfont_types.h"
#include "DNA_scene_types.h"
#include "DNA_text_types.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_font.h"
#include "BKE_library.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_curve.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_util.h"
#include "UI_interface.h"
#include "curve_intern.h"
Go to the source code of this file.
Definition in file editfont.c.
#define MAXTEXT 32766 |
Definition at line 77 of file editfont.c.
Referenced by editFont_to_undoFont(), insert_into_textbuf(), insert_text_invoke(), make_editText(), move_cursor(), paste_file(), paste_selection(), and txt_add_object().
static int change_character_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1007 of file editfont.c.
References CLAMP(), CTX_data_edit_object(), CTX_data_scene(), Object::data, Curve::editfont, FO_EDIT, OPERATOR_CANCELLED, OPERATOR_FINISHED, Curve::pos, wmOperator::ptr, RNA_int_get(), Main::scene, text_update_edited(), and EditFont::textbuf.
Referenced by FONT_OT_change_character().
static int change_spacing_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 965 of file editfont.c.
References CLAMP(), CTX_data_edit_object(), CTX_data_scene(), Object::data, Curve::editfont, FO_EDIT, CharInfo::kern, OPERATOR_CANCELLED, OPERATOR_FINISHED, Curve::pos, wmOperator::ptr, RNA_int_get(), Main::scene, text_update_edited(), and EditFont::textbufinfo.
Referenced by FONT_OT_change_spacing().
static void copy_selection | ( | Object * | obedit | ) | [static] |
Definition at line 669 of file editfont.c.
References BKE_font_getselection(), EditFont::copybuf, EditFont::copybufinfo, Object::data, Curve::editfont, EditFont::textbuf, and EditFont::textbufinfo.
Referenced by copy_text_exec(), and cut_text_exec().
static int copy_text_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 683 of file editfont.c.
References copy_selection(), CTX_data_edit_object(), and OPERATOR_FINISHED.
Referenced by FONT_OT_text_copy().
static int cut_text_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 706 of file editfont.c.
References BKE_font_getselection(), copy_selection(), CTX_data_edit_object(), CTX_data_scene(), FO_EDIT, kill_selection(), OPERATOR_CANCELLED, OPERATOR_FINISHED, and text_update_edited().
Referenced by FONT_OT_text_cut().
static int delete_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1104 of file editfont.c.
References BKE_font_getselection(), CTX_data_edit_object(), CTX_data_scene(), Object::data, DEL_ALL, DEL_NEXT_CHAR, DEL_NEXT_SEL, DEL_PREV_CHAR, DEL_PREV_SEL, DEL_SELECTION, Curve::editfont, FO_EDIT, kill_selection(), len(), Curve::len, OPERATOR_CANCELLED, OPERATOR_FINISHED, Curve::pos, wmOperator::ptr, RNA_enum_get(), Main::scene, text_update_edited(), EditFont::textbuf, and EditFont::textbufinfo.
Referenced by FONT_OT_delete().
Definition at line 483 of file editfont.c.
References BLI_countlist(), CTX_wm_region_view3d(), ListBase::first, TextLine::line, Text::lines, mul_mat3_m4_v3(), TextLine::next, txt_add_object(), and RegionView3D::viewinv.
Referenced by text_to_3d_object_exec().
static void* editFont_to_undoFont | ( | void * | ecu | ) | [static] |
Definition at line 1759 of file editfont.c.
References Curve::editfont, Curve::len, MAXTEXT, MEM_callocN(), Curve::pos, str, EditFont::textbuf, and EditFont::textbufinfo.
Referenced by undo_push_font().
static char findaccent | ( | char | char1, |
unsigned int | code | ||
) | [static] |
Definition at line 81 of file editfont.c.
Referenced by insert_text_invoke().
static int font_open_cancel | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) | [static] |
Definition at line 1612 of file editfont.c.
References wmOperator::customdata, MEM_freeN(), NULL, and OPERATOR_CANCELLED.
Referenced by FONT_OT_open().
static int font_open_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1619 of file editfont.c.
References CTX_data_main(), wmOperator::customdata, FILE_MAX, font_ui_template_init(), VFont::id, load_vfont(), MEM_freeN(), OPERATOR_CANCELLED, OPERATOR_FINISHED, PropertyPointerRNA::prop, wmOperator::ptr, PropertyPointerRNA::ptr, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RNA_string_get(), and ID::us.
Referenced by FONT_OT_open(), and open_invoke().
void FONT_OT_case_set | ( | wmOperatorType * | ot | ) |
Definition at line 1544 of file editfont.c.
References CASE_LOWER, wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), set_case_exec(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_case_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 1587 of file editfont.c.
References wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and toggle_case_exec().
Referenced by ED_operatortypes_curve().
void FONT_OT_change_character | ( | wmOperatorType * | ot | ) |
Definition at line 1032 of file editfont.c.
References change_character_exec(), wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_int(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_change_spacing | ( | wmOperatorType * | ot | ) |
Definition at line 987 of file editfont.c.
References change_spacing_exec(), wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_int(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 1165 of file editfont.c.
References DEL_ALL, delete_exec(), wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_file_paste | ( | wmOperatorType * | ot | ) |
Definition at line 409 of file editfont.c.
References wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::flag, FOLDERFILE, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, paste_file_exec(), paste_file_invoke(), wmOperatorType::poll, TEXTFILE, WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_curve().
void FONT_OT_insert_lorem | ( | wmOperatorType * | ot | ) |
Definition at line 321 of file editfont.c.
References wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, insert_lorem_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void FONT_OT_line_break | ( | wmOperatorType * | ot | ) |
Definition at line 1075 of file editfont.c.
References wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, line_break_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_move | ( | wmOperatorType * | ot | ) |
Definition at line 918 of file editfont.c.
References wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, LINE_BEGIN, move_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_move_select | ( | wmOperatorType * | ot | ) |
Definition at line 945 of file editfont.c.
References wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, LINE_BEGIN, move_select_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_open | ( | wmOperatorType * | ot | ) |
Definition at line 1685 of file editfont.c.
References wmOperatorType::cancel, wmOperatorType::exec, FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::flag, FOLDERFILE, font_open_cancel(), font_open_exec(), FTFONTFILE, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, open_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by ED_operatortypes_curve().
void FONT_OT_style_set | ( | wmOperatorType * | ot | ) |
Definition at line 611 of file editfont.c.
References CU_CHINFO_BOLD, wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), RNA_def_enum(), set_style_exec(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_style_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 649 of file editfont.c.
References CU_CHINFO_BOLD, wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and toggle_style_exec().
Referenced by ED_operatortypes_curve().
void FONT_OT_text_copy | ( | wmOperatorType * | ot | ) |
Definition at line 692 of file editfont.c.
References copy_text_exec(), wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void FONT_OT_text_cut | ( | wmOperatorType * | ot | ) |
Definition at line 723 of file editfont.c.
References cut_text_exec(), wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void FONT_OT_text_insert | ( | wmOperatorType * | ot | ) |
Definition at line 1326 of file editfont.c.
References wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, insert_text_exec(), insert_text_invoke(), wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), RNA_def_string(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void FONT_OT_text_paste | ( | wmOperatorType * | ot | ) |
Definition at line 781 of file editfont.c.
References wmOperatorType::description, ED_operator_editfont(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, paste_text_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void FONT_OT_textbox_add | ( | wmOperatorType * | ot | ) |
Definition at line 1365 of file editfont.c.
References wmOperatorType::description, ED_operator_object_active_editable_font(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and textbox_add_exec().
Referenced by ED_operatortypes_curve().
void FONT_OT_textbox_remove | ( | wmOperatorType * | ot | ) |
Definition at line 1408 of file editfont.c.
References wmOperatorType::description, ED_operator_object_active_editable_font(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, and textbox_remove_exec().
Referenced by ED_operatortypes_curve().
void FONT_OT_unlink | ( | wmOperatorType * | ot | ) |
Definition at line 1728 of file editfont.c.
References wmOperatorType::description, wmOperatorType::exec, font_unlink_exec(), wmOperatorType::idname, and wmOperatorType::name.
Referenced by ED_operatortypes_curve().
static void font_ui_template_init | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1604 of file editfont.c.
References wmOperator::customdata, MEM_callocN(), PropertyPointerRNA::prop, PropertyPointerRNA::ptr, and uiIDContextProperty().
Referenced by font_open_exec(), and open_invoke().
static int font_unlink_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1705 of file editfont.c.
References BKE_report(), get_builtin_font(), VFont::id, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, PropertyPointerRNA::prop, PropertyPointerRNA::ptr, wmOperator::reports, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RPT_ERROR, and uiIDContextProperty().
Referenced by FONT_OT_unlink().
void free_editText | ( | Object * | obedit | ) |
Definition at line 1492 of file editfont.c.
References BKE_free_editfont(), and Object::data.
Referenced by ED_object_exit_editmode().
static void free_undoFont | ( | void * | strv | ) | [static] |
static void* get_undoFont | ( | bContext * | C | ) | [static] |
Definition at line 1783 of file editfont.c.
References CTX_data_edit_object(), Object::data, NULL, OB_FONT, and Object::type.
Referenced by undo_push_font().
static int insert_into_textbuf | ( | Object * | obedit, |
uintptr_t | c | ||
) | [static] |
Definition at line 231 of file editfont.c.
References Object::actcol, Curve::curinfo, Object::data, Curve::editfont, CharInfo::kern, Curve::len, CharInfo::mat_nr, MAXTEXT, Curve::pos, EditFont::textbuf, EditFont::textbufinfo, and update_string().
Referenced by insert_lorem_exec(), insert_text_exec(), insert_text_invoke(), and line_break_exec().
static int insert_lorem_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 287 of file editfont.c.
References CTX_data_edit_object(), DAG_id_tag_update(), Object::data, ED_lorem, i, insert_into_textbuf(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, p, strlen(), and WM_event_add_notifier().
Referenced by FONT_OT_insert_lorem().
static int insert_text_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1185 of file editfont.c.
References BLI_strlen_utf8(), BLI_strncpy_wchar_from_utf8(), CTX_data_edit_object(), CTX_data_scene(), FO_EDIT, insert_into_textbuf(), kill_selection(), len(), MEM_callocN(), MEM_freeN(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get_alloc(), RNA_struct_property_is_set(), Main::scene, and text_update_edited().
Referenced by FONT_OT_text_insert(), and insert_text_invoke().
static int insert_text_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | evt | ||
) | [static] |
Definition at line 1214 of file editfont.c.
References wmEvent::alt, wmEvent::ascii, BACKSPACEKEY, BLI_strncpy_wchar_as_utf8(), BLI_strncpy_wchar_from_utf8(), wmEvent::ctrl, CTX_data_edit_object(), CTX_data_scene(), Object::data, Curve::editfont, findaccent(), FO_EDIT, insert_into_textbuf(), insert_text_exec(), kill_selection(), Curve::len, MAXTEXT, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, Curve::pos, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), Main::scene, wmEvent::shift, TABKEY, text_update_edited(), EditFont::textbuf, wmEvent::type, wmEvent::utf8_buf, wmEvent::val, and simple_enum_gen::val.
Referenced by FONT_OT_text_insert().
static int kill_selection | ( | Object * | obedit, |
int | ins | ||
) | [static] |
Definition at line 542 of file editfont.c.
References BKE_font_getselection(), Object::data, Curve::editfont, Curve::len, Curve::pos, Curve::selend, Curve::selstart, size(), EditFont::textbuf, and EditFont::textbufinfo.
Referenced by cut_text_exec(), delete_exec(), insert_text_exec(), and insert_text_invoke().
static int line_break_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1052 of file editfont.c.
References CTX_data_edit_object(), CTX_data_scene(), Object::data, Curve::editfont, FO_EDIT, insert_into_textbuf(), OPERATOR_FINISHED, Curve::pos, wmOperator::ptr, RNA_boolean_get(), Main::scene, Curve::selend, Curve::selstart, text_update_edited(), and EditFont::textbuf.
Referenced by FONT_OT_line_break().
void load_editText | ( | Object * | obedit | ) |
Definition at line 1465 of file editfont.c.
References Object::data, Curve::editfont, Curve::len, MEM_callocN(), MEM_freeN(), NULL, EditFont::oldstr, EditFont::oldstrinfo, Curve::selboxes, Curve::str, Curve::strinfo, strlen(), EditFont::textbufinfo, and update_string().
Referenced by ED_object_exit_editmode().
void make_editText | ( | Object * | obedit | ) |
Definition at line 1429 of file editfont.c.
References BLI_strncpy_wchar_from_utf8(), EditFont::copybuf, EditFont::copybufinfo, Curve::curinfo, Object::data, Curve::editfont, Curve::len, MAXTEXT, MEM_callocN(), NULL, EditFont::oldstr, EditFont::oldstrinfo, Curve::pos, Curve::str, Curve::strinfo, EditFont::textbuf, EditFont::textbufinfo, and update_string().
Referenced by ED_object_enter_editmode().
static int move_cursor | ( | bContext * | C, |
int | type, | ||
int | select | ||
) | [static] |
Definition at line 811 of file editfont.c.
References BKE_text_to_curve(), CTX_data_edit_object(), CTX_data_main(), CTX_data_scene(), CU_CHINFO_WRAP, Object::data, Curve::editfont, CharInfo::flag, FO_CURS, FO_CURSDOWN, FO_CURSUP, FO_PAGEDOWN, FO_PAGEUP, FO_SELCHANGE, Curve::len, LINE_BEGIN, LINE_END, MAXTEXT, NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, next_word(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Curve::pos, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, prev_word(), Curve::selend, Curve::selstart, text_update_edited(), EditFont::textbuf, EditFont::textbufinfo, and update_string().
Referenced by move_exec(), and move_select_exec().
static int move_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 911 of file editfont.c.
References move_cursor(), wmOperator::ptr, and RNA_enum_get().
Referenced by FONT_OT_move().
static int move_select_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 938 of file editfont.c.
References move_cursor(), wmOperator::ptr, and RNA_enum_get().
Referenced by FONT_OT_move_select().
static short next_word | ( | Curve * | cu | ) | [static] |
Definition at line 524 of file editfont.c.
References Curve::pos, and Curve::str.
Referenced by move_cursor().
static int open_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 1656 of file editfont.c.
References wmOperator::customdata, PointerRNA::data, FO_BUILTIN_NAME, font_open_exec(), font_ui_template_init(), UserDef::fontdir, PointerRNA::id, VFont::name, NULL, OPERATOR_RUNNING_MODAL, PropertyPointerRNA::prop, wmOperator::ptr, RNA_property_pointer_get(), RNA_string_set(), RNA_struct_property_is_set(), U, and WM_event_add_fileselect().
Referenced by FONT_OT_open().
static int paste_file | ( | bContext * | C, |
ReportList * | reports, | ||
const char * | filename | ||
) | [static] |
Definition at line 341 of file editfont.c.
References BKE_reportf(), BLI_strncpy_wchar_from_utf8(), CTX_data_edit_object(), CTX_data_scene(), Object::data, Curve::editfont, FO_EDIT, L, Curve::len, MAXTEXT, MEM_callocN(), MEM_freeN(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Curve::pos, RPT_ERROR, Main::scene, text_update_edited(), and EditFont::textbuf.
Referenced by paste_file_exec().
static int paste_file_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 387 of file editfont.c.
References MEM_freeN(), NULL, paste_file(), wmOperator::ptr, wmOperator::reports, and RNA_string_get_alloc().
Referenced by FONT_OT_file_paste(), and paste_file_invoke().
static int paste_file_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 399 of file editfont.c.
References OPERATOR_RUNNING_MODAL, paste_file_exec(), wmOperator::ptr, RNA_struct_property_is_set(), and WM_event_add_fileselect().
Referenced by FONT_OT_file_paste().
static int paste_selection | ( | Object * | obedit, |
ReportList * | reports | ||
) | [static] |
Definition at line 740 of file editfont.c.
References BKE_report(), EditFont::copybuf, EditFont::copybufinfo, Object::data, Curve::editfont, len(), Curve::len, MAXTEXT, Curve::pos, RPT_WARNING, size(), EditFont::textbuf, and EditFont::textbufinfo.
Referenced by paste_text_exec().
static int paste_text_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 768 of file editfont.c.
References CTX_data_edit_object(), CTX_data_scene(), FO_EDIT, OPERATOR_CANCELLED, OPERATOR_FINISHED, paste_selection(), wmOperator::reports, and text_update_edited().
Referenced by FONT_OT_text_paste().
static short prev_word | ( | Curve * | cu | ) | [static] |
Definition at line 532 of file editfont.c.
References Curve::pos, and Curve::str.
Referenced by move_cursor().
static int set_case | ( | bContext * | C, |
int | ccase | ||
) | [static] |
Definition at line 1504 of file editfont.c.
References CASE_LOWER, CTX_data_edit_object(), CTX_data_scene(), Object::data, Curve::editfont, FO_EDIT, len(), OPERATOR_FINISHED, Main::scene, str, text_update_edited(), and EditFont::textbuf.
Referenced by set_case_exec(), and toggle_case_exec().
static int set_case_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1539 of file editfont.c.
References wmOperator::ptr, RNA_enum_get(), and set_case().
Referenced by FONT_OT_case_set().
static int set_style | ( | bContext * | C, |
const int | style, | ||
const int | clear | ||
) | [static] |
Definition at line 580 of file editfont.c.
References BKE_font_getselection(), CTX_data_edit_object(), DAG_id_tag_update(), Object::data, 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 int set_style_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 603 of file editfont.c.
References clear(), wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), and set_style().
Referenced by FONT_OT_style_set().
static void text_update_edited | ( | bContext * | C, |
Scene * | scene, | ||
Object * | obedit, | ||
int | recalc, | ||
int | mode | ||
) | [static] |
Definition at line 258 of file editfont.c.
References Object::actcol, BKE_text_to_curve(), CTX_data_main(), Curve::curinfo, DAG_id_tag_update(), Object::data, Curve::editfont, FO_EDIT, CharInfo::mat_nr, NC_GEOM, ND_DATA, Curve::pos, EditFont::textbufinfo, Object::totcol, update_string(), and WM_event_add_notifier().
Referenced by change_character_exec(), change_spacing_exec(), cut_text_exec(), delete_exec(), ED_text_undo_step(), insert_text_exec(), insert_text_invoke(), line_break_exec(), move_cursor(), paste_file(), paste_text_exec(), set_case(), text_comment_exec(), text_convert_whitespace_exec(), text_indent_exec(), text_listener(), text_paste_exec(), text_reload_exec(), text_uncomment_exec(), and text_unindent_exec().
static int textbox_add_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1348 of file editfont.c.
References Curve::actbox, CTX_data_active_object(), Object::data, i, NC_GEOM, ND_DATA, OPERATOR_FINISHED, Curve::tb, Curve::totbox, and WM_event_add_notifier().
Referenced by FONT_OT_textbox_add().
static int textbox_remove_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1388 of file editfont.c.
References Curve::actbox, CTX_data_active_object(), Object::data, i, if(), 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 int toggle_case_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1564 of file editfont.c.
References CASE_LOWER, CASE_UPPER, CTX_data_edit_object(), Object::data, Curve::editfont, len(), set_case(), str, and EditFont::textbuf.
Referenced by FONT_OT_case_toggle().
static int toggle_style_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 632 of file editfont.c.
References BKE_font_getselection(), 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 void txt_add_object | ( | bContext * | C, |
TextLine * | firstline, | ||
int | totline, | ||
float | offset[3] | ||
) | [static] |
Definition at line 430 of file editfont.c.
References add_object(), Scene::basact, CTX_data_scene(), Object::data, ED_object_base_init_transform(), get_builtin_font(), VFont::id, Curve::len, TextLine::line, Object::loc, MAXTEXT, MEM_callocN(), MEM_freeN(), NA_ADDED, NC_OBJECT, TextLine::next, NULL, OB_FONT, Curve::pos, rot, Main::scene, Curve::str, Curve::strinfo, strlen(), ID::us, Curve::vfont, where_is_object(), and WM_event_add_notifier().
Referenced by ED_text_to_object().
void undo_push_font | ( | bContext * | C, |
const char * | name | ||
) |
Definition at line 1793 of file editfont.c.
References editFont_to_undoFont(), free_undoFont(), get_undoFont(), NULL, undo_editmode_push(), and undoFont_to_editFont().
Referenced by ED_undo_push().
static void undoFont_to_editFont | ( | void * | strv, |
void * | ecu | ||
) | [static] |
Definition at line 1742 of file editfont.c.
References Curve::editfont, Curve::len, Curve::pos, Curve::selend, Curve::selstart, str, EditFont::textbuf, EditFont::textbufinfo, and update_string().
Referenced by undo_push_font().
static void update_string | ( | Curve * | cu | ) | [static] |
Definition at line 213 of file editfont.c.
References BLI_strncpy_wchar_as_utf8(), BLI_wstrlen_utf8(), Curve::editfont, len(), MEM_callocN(), MEM_freeN(), Curve::str, and EditFont::textbuf.
Referenced by insert_into_textbuf(), load_editText(), make_editText(), move_cursor(), text_update_edited(), and undoFont_to_editFont().
EnumPropertyItem case_items[] [static] |
{ {CASE_LOWER, "LOWER", 0, "Lower", ""}, {CASE_UPPER, "UPPER", 0, "Upper", ""}, {0, NULL, 0, NULL, NULL}}
Definition at line 1499 of file editfont.c.
EnumPropertyItem delete_type_items[] [static] |
{ {DEL_ALL, "ALL", 0, "All", ""}, {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""}, {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""}, {DEL_SELECTION, "SELECTION", 0, "Selection", ""}, {DEL_NEXT_SEL, "NEXT_OR_SELECTION", 0, "Next or Selection", ""}, {DEL_PREV_SEL, "PREVIOUS_OR_SELECTION", 0, "Previous or Selection", ""}, {0, NULL, 0, NULL, NULL}}
Definition at line 1095 of file editfont.c.
EnumPropertyItem move_type_items[] [static] |
{ {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""}, {LINE_END, "LINE_END", 0, "Line End", ""}, {PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""}, {NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""}, {PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""}, {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""}, {PREV_LINE, "PREVIOUS_LINE", 0, "Previous Line", ""}, {NEXT_LINE, "NEXT_LINE", 0, "Next Line", ""}, {PREV_PAGE, "PREVIOUS_PAGE", 0, "Previous Page", ""}, {NEXT_PAGE, "NEXT_PAGE", 0, "Next Page", ""}, {0, NULL, 0, NULL, NULL}}
Definition at line 798 of file editfont.c.
EnumPropertyItem style_items[] [static] |
{ {CU_CHINFO_BOLD, "BOLD", 0, "Bold", ""}, {CU_CHINFO_ITALIC, "ITALIC", 0, "Italic", ""}, {CU_CHINFO_UNDERLINE, "UNDERLINE", 0, "Underline", ""}, {CU_CHINFO_SMALLCAPS, "SMALL_CAPS", 0, "Small Caps", ""}, {0, NULL, 0, NULL, NULL}}
Definition at line 573 of file editfont.c.