Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/stat.h>
#include <errno.h>
#include "MEM_guardedalloc.h"
#include "DNA_text_types.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_text.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_text.h"
#include "ED_curve.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "text_intern.h"
Go to the source code of this file.
Definition in file text_ops.c.
#define TEXT_FIND 0 |
Definition at line 2886 of file text_ops.c.
Referenced by text_find_and_replace(), text_find_exec(), and text_find_set_selected_exec().
#define TEXT_MARK_ALL 2 |
Definition at line 2888 of file text_ops.c.
Referenced by text_find_and_replace(), and text_mark_all_exec().
#define TEXT_REPLACE 1 |
Definition at line 2887 of file text_ops.c.
Referenced by text_find_and_replace(), and text_replace_exec().
typedef struct SetSelection SetSelection |
typedef struct TextScroll TextScroll |
anonymous enum |
Definition at line 1076 of file text_ops.c.
anonymous enum |
Definition at line 2071 of file text_ops.c.
anonymous enum |
Definition at line 3095 of file text_ops.c.
Definition at line 1783 of file text_ops.c.
References Text::curc, Text::curl, cursor_skip_find_line(), ListBase::first, TextLine::len, Text::lines, TextLine::next, TextLine::prev, Text::selc, Text::sell, text_get_cursor_rel(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and SpaceText::wordwrap.
Referenced by text_move_cursor().
static int cursor_skip_find_line | ( | SpaceText * | st, |
ARegion * | ar, | ||
int | lines, | ||
TextLine ** | linep, | ||
int * | charp, | ||
int * | rell, | ||
int * | relc | ||
) | [static] |
Definition at line 1492 of file text_ops.c.
References TextLine::next, TextLine::prev, text_get_char_pos(), text_get_visible_lines(), and wrap_offset_in_line().
Referenced by cursor_skip().
void ED_text_undo_step | ( | bContext * | C, |
int | step | ||
) |
Definition at line 3265 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), NA_EDITED, NC_TEXT, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), txt_do_redo(), txt_do_undo(), and WM_event_add_notifier().
Referenced by ed_undo_step().
static int flatten_index_to_offset | ( | SpaceText * | st, |
const char * | str, | ||
int | index | ||
) | [static] |
Definition at line 2381 of file text_ops.c.
References BLI_str_utf8_size(), i, and SpaceText::tabnumber.
Referenced by text_cursor_set_to_pos().
static int flatten_len | ( | SpaceText * | st, |
const char * | str | ||
) | [static] |
Definition at line 2367 of file text_ops.c.
References BLI_str_utf8_size(), i, and SpaceText::tabnumber.
Referenced by text_cursor_set_to_pos().
Definition at line 2393 of file text_ops.c.
References ListBase::first, i, TextLine::line, Text::lines, TextLine::next, SpaceText::text, text_get_visible_lines(), and SpaceText::top.
Referenced by text_cursor_set_to_pos_wrapped().
static void scroll_exit | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2159 of file text_ops.c.
References CTX_wm_space_text(), wmOperator::customdata, SpaceText::flags, MEM_freeN(), and ST_SCROLL_SELECT.
Referenced by text_scroll_cancel(), text_scroll_invoke(), and text_scroll_modal().
static int text_clear_all_markers_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1370 of file text_ops.c.
References CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_update_cursor_moved(), txt_clear_markers(), and WM_event_add_notifier().
Referenced by TEXT_OT_markers_clear().
static int text_comment_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1009 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), txt_comment(), txt_has_sel(), txt_order_cursors(), and WM_event_add_notifier().
Referenced by TEXT_OT_comment().
static int text_convert_whitespace_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1082 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), ListBase::first, flatten_string(), flatten_string_free(), TextLine::format, TextLine::len, TextLine::line, Text::lines, MEM_callocN(), MEM_freeN(), NA_EDITED, NC_TEXT, TextLine::next, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), strlen(), SpaceText::tabnumber, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), TO_TABS, and WM_event_add_notifier().
Referenced by TEXT_OT_convert_whitespace().
static int text_copy_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 836 of file text_ops.c.
References CTX_data_edit_text(), OPERATOR_FINISHED, and txt_copy_clipboard().
Referenced by TEXT_OT_copy().
static void text_cursor_set_apply | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2561 of file text_ops.c.
References CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, simple_enum_gen::d, SpaceText::left, wmEvent::mval, NC_TEXT, ND_CURSOR, SetSelection::old, SpaceText::pix_per_line, SpaceText::text, text_cursor_set_to_pos(), text_update_cursor_moved(), txt_screen_skip(), ARegion::winx, ARegion::winy, WM_event_add_notifier(), and SpaceText::wordwrap.
Referenced by text_set_selection_invoke(), and text_set_selection_modal().
static int text_cursor_set_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2689 of file text_ops.c.
References CTX_wm_region(), CTX_wm_space_text(), Text::curc, Text::curl, ListBase::first, Text::lines, NC_TEXT, ND_CURSOR, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_get(), SpaceText::text, text_cursor_set_to_pos(), text_update_cursor_moved(), txt_get_span(), txt_undo_add_toop(), UNDO_CTO, and WM_event_add_notifier().
Referenced by text_cursor_set_invoke(), and TEXT_OT_cursor_set().
static void text_cursor_set_exit | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2597 of file text_ops.c.
References CTX_wm_space_text(), wmOperator::customdata, ListBase::first, Text::lines, MEM_freeN(), NC_TEXT, ND_CURSOR, SetSelection::selc, Text::selc, SetSelection::sell, Text::sell, SpaceText::text, text_update_cursor_moved(), txt_get_span(), txt_has_sel(), txt_sel_to_buf(), txt_undo_add_toop(), UNDO_STO, WM_clipboard_text_set(), and WM_event_add_notifier().
Referenced by text_set_selection_cancel(), and text_set_selection_modal().
static int text_cursor_set_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2711 of file text_ops.c.
References CTX_wm_space_text(), wmEvent::mval, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_int_set(), text_cursor_set_exec(), SpaceText::txtbar, and rcti::xmin.
Referenced by TEXT_OT_cursor_set().
Definition at line 2521 of file text_ops.c.
References Text::curc, Text::curl, SpaceText::cwidth, ListBase::first, flatten_index_to_offset(), flatten_len(), SpaceText::left, SpaceText::lheight, Text::lines, TextLine::next, TextLine::prev, Text::selc, Text::sell, SpaceText::showlinenrs, SpaceText::text, text_cursor_set_to_pos_wrapped(), text_update_character_width(), TEXTXLOC, SpaceText::top, txt_get_span(), TXT_OFFSET, txt_pop_sel(), simple_enum_gen::w, ARegion::winy, and SpaceText::wordwrap.
Referenced by text_cursor_set_apply(), and text_cursor_set_exec().
static void text_cursor_set_to_pos_wrapped | ( | SpaceText * | st, |
ARegion * | ar, | ||
int | x, | ||
int | y, | ||
int | sel | ||
) | [static] |
Definition at line 2411 of file text_ops.c.
References BLI_str_utf8_size(), Text::curc, Text::curl, get_first_visible_line(), i, TextLine::len, len(), TextLine::line, max, TextLine::next, Text::selc, Text::sell, SpaceText::tabnumber, SpaceText::text, and wrap_width().
Referenced by text_cursor_set_to_pos().
static int text_cut_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 859 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), NA_EDITED, NC_TEXT, NULL, OPERATOR_FINISHED, text_drawcache_tag_update(), text_run_script(), text_update_cursor_moved(), txt_copy_clipboard(), txt_delete_selected(), and WM_event_add_notifier().
Referenced by TEXT_OT_cut().
static int text_delete_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1986 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), Text::curl, DEL_NEXT_CHAR, DEL_NEXT_WORD, DEL_PREV_CHAR, DEL_PREV_WORD, NA_EDITED, NC_TEXT, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), text_drawcache_tag_update(), text_run_script(), text_update_cursor_moved(), text_update_line_edited(), txt_backspace_char(), txt_backspace_word(), txt_delete_char(), txt_delete_word(), and WM_event_add_notifier().
Referenced by TEXT_OT_delete().
static int text_edit_poll | ( | bContext * | C | ) | [static] |
Definition at line 81 of file text_ops.c.
References CTX_data_edit_text(), Text::id, and ID::lib.
Referenced by TEXT_OT_comment(), TEXT_OT_convert_whitespace(), TEXT_OT_copy(), TEXT_OT_cut(), TEXT_OT_delete(), TEXT_OT_indent(), TEXT_OT_insert(), TEXT_OT_jump(), TEXT_OT_line_break(), TEXT_OT_make_internal(), TEXT_OT_markers_clear(), TEXT_OT_move(), TEXT_OT_next_marker(), TEXT_OT_paste(), TEXT_OT_previous_marker(), TEXT_OT_refresh_pyconstraints(), TEXT_OT_reload(), TEXT_OT_save_as(), TEXT_OT_select_all(), TEXT_OT_select_line(), TEXT_OT_select_word(), TEXT_OT_to_3d_object(), TEXT_OT_uncomment(), TEXT_OT_unindent(), and text_save_poll().
int text_file_modified | ( | Text * | text | ) |
Definition at line 3108 of file text_ops.c.
References BLI_exists(), BLI_path_abs(), BLI_strncpy(), FILE_MAX, G, Text::mtime, and Text::name.
Referenced by text_resolve_conflict_invoke().
static int text_find_and_replace | ( | bContext * | C, |
wmOperator * | op, | ||
short | mode | ||
) | [static] |
Definition at line 2890 of file text_ops.c.
References BKE_reportf(), BLI_strcasecmp(), MakeCursor::color, CTX_data_main(), CTX_wm_space_text(), SpaceText::findstr, ListBase::first, SpaceText::flags, Text::id, MEM_freeN(), NA_EDITED, NC_TEXT, ND_CURSOR, ID::next, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, SpaceText::replacestr, wmOperator::reports, RPT_ERROR, ST_FIND_ALL, ST_FIND_WRAP, ST_MATCH_CASE, Main::text, SpaceText::text, text_drawcache_tag_update(), TEXT_FIND, TEXT_MARK_ALL, TEXT_REPLACE, text_update_cursor_moved(), TH_SHADE2, TMARK_EDITALL, TMARK_GRP_FINDALL, txt_add_marker(), txt_clear_markers(), txt_find_marker(), txt_find_string(), txt_has_sel(), txt_insert_buf(), txt_move_toline(), txt_sel_to_buf(), UI_GetThemeColor4ubv(), and WM_event_add_notifier().
Referenced by text_find_exec(), text_find_set_selected_exec(), text_mark_all_exec(), and text_replace_exec().
static int text_find_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2981 of file text_ops.c.
References TEXT_FIND, and text_find_and_replace().
Referenced by TEXT_OT_find().
static int text_find_set_selected_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3038 of file text_ops.c.
References BLI_strncpy(), CTX_data_edit_text(), CTX_wm_space_text(), SpaceText::findstr, MEM_freeN(), OPERATOR_FINISHED, ST_MAX_FIND_STR, TEXT_FIND, text_find_and_replace(), and txt_sel_to_buf().
Referenced by TEXT_OT_find_set_selected().
static int text_get_cursor_rel | ( | SpaceText * | st, |
ARegion * | ar, | ||
TextLine * | linein, | ||
int | rell, | ||
int | relc | ||
) | [static] |
Definition at line 1412 of file text_ops.c.
References BLI_str_utf8_size(), i, TextLine::len, TextLine::line, max, SpaceText::tabnumber, and wrap_width().
Referenced by cursor_skip(), txt_wrap_move_down(), and txt_wrap_move_up().
static void text_ignore_modified | ( | Text * | text | ) | [static] |
Definition at line 3137 of file text_ops.c.
References BLI_exists(), BLI_path_abs(), BLI_strncpy(), FILE_MAX, G, Text::mtime, and Text::name.
Referenced by text_resolve_conflict_exec().
static int text_indent_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 892 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), txt_add_char(), txt_has_sel(), txt_indent(), txt_order_cursors(), and WM_event_add_notifier().
Referenced by TEXT_OT_indent().
static int text_insert_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2794 of file text_ops.c.
References BLI_str_utf8_as_unicode_step(), CTX_data_edit_text(), CTX_wm_space_text(), Text::curl, i, MEM_freeN(), NA_EDITED, NC_TEXT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, SpaceText::overwrite, wmOperator::ptr, RNA_string_get_alloc(), str, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_line_edited(), txt_add_char(), txt_replace_char(), and WM_event_add_notifier().
Referenced by text_insert_invoke(), and TEXT_OT_insert().
static int text_insert_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2832 of file text_ops.c.
References wmEvent::ascii, BLI_str_utf8_from_unicode(), BLI_str_utf8_size(), BLI_UTF8_MAX, wmEvent::ctrl, CTX_wm_space_text(), len(), NULL, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmEvent::oskey, wmOperator::ptr, RNA_string_length(), RNA_string_set(), str, text_insert_exec(), text_run_script(), and wmEvent::utf8_buf.
Referenced by TEXT_OT_insert().
static int text_jump_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1936 of file text_ops.c.
References CTX_data_edit_text(), ListBase::first, ListBase::last, Text::lines, NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), text_update_cursor_moved(), txt_get_span(), txt_move_toline(), and WM_event_add_notifier().
Referenced by TEXT_OT_jump().
static int text_jump_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 1955 of file text_ops.c.
References WM_operator_props_dialog_popup().
Referenced by TEXT_OT_jump().
static int text_line_break_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 962 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), Text::curl, Text::flags, NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, TextLine::prev, setcurr_tab_spaces(), SpaceText::tabnumber, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_line_edited(), txt_add_char(), txt_split_curline(), TXT_TABSTOSPACES, and WM_event_add_notifier().
Referenced by TEXT_OT_line_break().
static int text_line_number_invoke | ( | bContext * | C, |
wmOperator * | UNUSEDop, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2743 of file text_ops.c.
References wmEvent::ascii, CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, PIL_check_seconds_timer(), SpaceText::showlinenrs, text_update_character_width(), text_update_cursor_moved(), TEXTXLOC, txt_move_toline(), TXT_OFFSET, ARegion::winy, and WM_event_add_notifier().
Referenced by TEXT_OT_line_number().
static int text_make_internal_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 402 of file text_ops.c.
References CTX_data_edit_text(), Text::flags, MEM_freeN(), NA_EDITED, Text::name, NC_TEXT, NULL, OPERATOR_FINISHED, text_update_cursor_moved(), TXT_ISDIRTY, TXT_ISMEM, and WM_event_add_notifier().
Referenced by TEXT_OT_make_internal(), and text_resolve_conflict_exec().
static int text_mark_all_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3019 of file text_ops.c.
References text_find_and_replace(), and TEXT_MARK_ALL.
Referenced by TEXT_OT_mark_all().
static int text_move_cursor | ( | bContext * | C, |
int | type, | ||
int | select | ||
) | [static] |
Definition at line 1816 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), cursor_skip(), FILE_BOTTOM, FILE_TOP, LINE_BEGIN, LINE_END, NC_TEXT, ND_CURSOR, NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, NULL, OPERATOR_FINISHED, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, ARegion::regiontype, RGN_TYPE_WINDOW, SpaceText::text, text_update_cursor_moved(), txt_jump_left(), txt_jump_right(), txt_move_bof(), txt_move_bol(), txt_move_down(), txt_move_eof(), txt_move_eol(), txt_move_left(), txt_move_right(), txt_move_up(), txt_wrap_move_bol(), txt_wrap_move_down(), txt_wrap_move_eol(), txt_wrap_move_up(), SpaceText::viewlines, WM_event_add_notifier(), and SpaceText::wordwrap.
Referenced by text_move_exec(), and text_move_select_exec().
static int text_move_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1888 of file text_ops.c.
References wmOperator::ptr, RNA_enum_get(), and text_move_cursor().
Referenced by TEXT_OT_move().
static int text_move_select_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1912 of file text_ops.c.
References wmOperator::ptr, RNA_enum_get(), and text_move_cursor().
Referenced by TEXT_OT_move_select().
static int text_new_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 156 of file text_ops.c.
References add_empty_text(), CTX_wm_space_text(), Text::id, NA_ADDED, NC_TEXT, OPERATOR_FINISHED, RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), SpaceText::text, text_drawcache_tag_update(), SpaceText::top, uiIDContextProperty(), ID::us, and WM_event_add_notifier().
Referenced by TEXT_OT_new().
static int text_new_poll | ( | bContext * | UNUSEDC | ) | [static] |
Definition at line 76 of file text_ops.c.
Referenced by TEXT_OT_new(), and TEXT_OT_open().
static int text_next_marker_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1334 of file text_ops.c.
References CTX_data_edit_text(), Text::curc, Text::curl, TextMarker::end, ListBase::first, TextMarker::lineno, Text::lines, Text::markers, NA_EDITED, NC_TEXT, TextMarker::next, OPERATOR_FINISHED, TextMarker::start, text_update_cursor_moved(), txt_get_span(), txt_move_to(), and WM_event_add_notifier().
Referenced by TEXT_OT_next_marker().
static int text_open_cancel | ( | bContext * | UNUSEDC, |
wmOperator * | op | ||
) | [static] |
Definition at line 215 of file text_ops.c.
References wmOperator::customdata, MEM_freeN(), and OPERATOR_CANCELLED.
Referenced by TEXT_OT_open().
static int text_open_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 221 of file text_ops.c.
References add_text(), CTX_wm_space_text(), wmOperator::customdata, FILE_MAX, G, Text::id, MEM_freeN(), NA_ADDED, Text::name, NC_TEXT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, PropertyPointerRNA::prop, PropertyPointerRNA::ptr, wmOperator::ptr, RNA_boolean_get(), RNA_id_pointer_create(), RNA_property_pointer_set(), RNA_property_update(), RNA_string_get(), str, SpaceText::text, text_drawcache_tag_update(), text_open_init(), SpaceText::top, ID::us, and WM_event_add_notifier().
Referenced by text_open_invoke(), and TEXT_OT_open().
static void text_open_init | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 207 of file text_ops.c.
References wmOperator::customdata, MEM_callocN(), PropertyPointerRNA::prop, PropertyPointerRNA::ptr, and uiIDContextProperty().
Referenced by text_open_exec(), and text_open_invoke().
static int text_open_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 274 of file text_ops.c.
References CTX_data_edit_text(), G, Text::name, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), text_open_exec(), text_open_init(), and WM_event_add_fileselect().
Referenced by TEXT_OT_open().
void TEXT_OT_comment | ( | wmOperatorType * | ot | ) |
Definition at line 1028 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_comment_exec(), and text_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_convert_whitespace | ( | wmOperatorType * | ot | ) |
Definition at line 1202 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, text_convert_whitespace_exec(), text_edit_poll(), and TO_SPACES.
Referenced by text_operatortypes().
void TEXT_OT_copy | ( | wmOperatorType * | ot | ) |
Definition at line 845 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_copy_exec(), and text_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_cursor_set | ( | wmOperatorType * | ot | ) |
Definition at line 2724 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, text_cursor_set_exec(), text_cursor_set_invoke(), and text_region_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_cut | ( | wmOperatorType * | ot | ) |
Definition at line 878 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_cut_exec(), and text_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 2014 of file text_ops.c.
References DEL_NEXT_CHAR, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, text_delete_exec(), and text_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_find | ( | wmOperatorType * | ot | ) |
Definition at line 2986 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_find_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_find_set_selected | ( | wmOperatorType * | ot | ) |
Definition at line 3054 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_find_set_selected_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_indent | ( | wmOperatorType * | ot | ) |
Definition at line 913 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_indent_exec().
Referenced by text_operatortypes().
void TEXT_OT_insert | ( | wmOperatorType * | ot | ) |
Definition at line 2867 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, RNA_def_string(), wmOperatorType::srna, text_edit_poll(), text_insert_exec(), and text_insert_invoke().
Referenced by text_operatortypes().
void TEXT_OT_jump | ( | wmOperatorType * | ot | ) |
Definition at line 1961 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, text_edit_poll(), text_jump_exec(), and text_jump_invoke().
Referenced by text_operatortypes().
void TEXT_OT_line_break | ( | wmOperatorType * | ot | ) |
Definition at line 995 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_line_break_exec().
Referenced by text_operatortypes().
void TEXT_OT_line_number | ( | wmOperatorType * | ot | ) |
Definition at line 2780 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, text_line_number_invoke(), and text_region_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_make_internal | ( | wmOperatorType * | ot | ) |
Definition at line 419 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, wmOperatorType::poll, text_edit_poll(), and text_make_internal_exec().
Referenced by text_operatortypes().
void TEXT_OT_mark_all | ( | wmOperatorType * | ot | ) |
Definition at line 3024 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_mark_all_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_markers_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1382 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_clear_all_markers_exec(), and text_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_move | ( | wmOperatorType * | ot | ) |
Definition at line 1895 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, LINE_BEGIN, wmOperatorType::name, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, text_edit_poll(), and text_move_exec().
Referenced by text_operatortypes().
void TEXT_OT_move_select | ( | wmOperatorType * | ot | ) |
Definition at line 1919 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, LINE_BEGIN, wmOperatorType::name, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, text_move_select_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_new | ( | wmOperatorType * | ot | ) |
Definition at line 190 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, wmOperatorType::poll, text_new_exec(), and text_new_poll().
Referenced by text_operatortypes().
void TEXT_OT_next_marker | ( | wmOperatorType * | ot | ) |
Definition at line 1356 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_next_marker_exec().
Referenced by text_operatortypes().
void TEXT_OT_open | ( | wmOperatorType * | ot | ) |
Definition at line 289 of file text_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, FILE_OPENFILE, FILE_SPECIAL, wmOperatorType::flag, FOLDERFILE, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_UNDO, wmOperatorType::poll, PYSCRIPTFILE, RNA_def_boolean(), wmOperatorType::srna, text_new_poll(), text_open_cancel(), text_open_exec(), text_open_invoke(), TEXTFILE, WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by text_operatortypes().
void TEXT_OT_overwrite_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 2042 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_space_edit_poll(), and text_toggle_overwrite_exec().
Referenced by text_operatortypes().
void TEXT_OT_paste | ( | wmOperatorType * | ot | ) |
Definition at line 807 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, text_edit_poll(), and text_paste_exec().
Referenced by text_operatortypes().
void TEXT_OT_previous_marker | ( | wmOperatorType * | ot | ) |
Definition at line 1320 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_previous_marker_exec().
Referenced by text_operatortypes().
void TEXT_OT_refresh_pyconstraints | ( | wmOperatorType * | ot | ) |
Definition at line 683 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_refresh_pyconstraints_exec().
Referenced by text_operatortypes().
void TEXT_OT_reload | ( | wmOperatorType * | ot | ) |
Definition at line 334 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), text_reload_exec(), and WM_operator_confirm().
Referenced by text_operatortypes().
void TEXT_OT_replace | ( | wmOperatorType * | ot | ) |
Definition at line 3005 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_replace_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_replace_set_selected | ( | wmOperatorType * | ot | ) |
Definition at line 3081 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_replace_set_selected_exec(), and text_space_edit_poll().
Referenced by text_operatortypes().
void TEXT_OT_resolve_conflict | ( | wmOperatorType * | ot | ) |
Definition at line 3216 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, RESOLVE_IGNORE, RNA_def_enum(), wmOperatorType::srna, text_resolve_conflict_exec(), text_resolve_conflict_invoke(), and text_save_poll().
Referenced by text_operatortypes().
void TEXT_OT_run_script | ( | wmOperatorType * | ot | ) |
Definition at line 623 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, text_run_script_exec(), and text_run_script_poll().
Referenced by text_operatortypes().
void TEXT_OT_save | ( | wmOperatorType * | ot | ) |
Definition at line 496 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_save_exec(), and text_save_poll().
Referenced by text_operatortypes().
void TEXT_OT_save_as | ( | wmOperatorType * | ot | ) |
Definition at line 553 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, FILE_SAVE, FILE_SPECIAL, FOLDERFILE, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, wmOperatorType::poll, PYSCRIPTFILE, text_edit_poll(), text_save_as_exec(), text_save_as_invoke(), TEXTFILE, WM_FILESEL_FILEPATH, and WM_operator_properties_filesel().
Referenced by text_operatortypes().
void TEXT_OT_scroll | ( | wmOperatorType * | ot | ) |
Definition at line 2242 of file text_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_GRAB_POINTER, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, text_scroll_cancel(), text_scroll_exec(), text_scroll_invoke(), text_scroll_modal(), and text_scroll_poll().
Referenced by text_operatortypes().
void TEXT_OT_scroll_bar | ( | wmOperatorType * | ot | ) |
Definition at line 2336 of file text_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, text_region_scroll_poll(), text_scroll_bar_invoke(), text_scroll_cancel(), and text_scroll_modal().
Referenced by text_operatortypes().
void TEXT_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 1231 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_select_all_exec().
Referenced by text_operatortypes().
void TEXT_OT_select_line | ( | wmOperatorType * | ot | ) |
Definition at line 1257 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_select_line_exec().
Referenced by text_operatortypes().
void TEXT_OT_select_word | ( | wmOperatorType * | ot | ) |
Definition at line 1284 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_select_word_exec().
Referenced by text_operatortypes().
void TEXT_OT_selection_set | ( | wmOperatorType * | ot | ) |
Definition at line 2670 of file text_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, text_region_edit_poll(), text_set_selection_cancel(), text_set_selection_invoke(), and text_set_selection_modal().
Referenced by text_operatortypes().
void TEXT_OT_to_3d_object | ( | wmOperatorType * | ot | ) |
Definition at line 3244 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, text_edit_poll(), and text_to_3d_object_exec().
Referenced by text_operatortypes().
void TEXT_OT_uncomment | ( | wmOperatorType * | ot | ) |
Definition at line 1062 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_uncomment_exec().
Referenced by text_operatortypes().
void TEXT_OT_unindent | ( | wmOperatorType * | ot | ) |
Definition at line 948 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, text_edit_poll(), and text_unindent_exec().
Referenced by text_operatortypes().
void TEXT_OT_unlink | ( | wmOperatorType * | ot | ) |
Definition at line 384 of file text_ops.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_UNDO, wmOperatorType::poll, text_unlink_exec(), text_unlink_poll(), and WM_operator_confirm().
Referenced by text_operatortypes().
static int text_paste_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 779 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), MEM_freeN(), NA_EDITED, NC_TEXT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), text_drawcache_tag_update(), text_run_script(), text_update_cursor_moved(), text_update_edited(), txt_insert_buf(), WM_clipboard_text_get(), and WM_event_add_notifier().
Referenced by TEXT_OT_paste().
static int text_previous_marker_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1298 of file text_ops.c.
References CTX_data_edit_text(), Text::curc, Text::curl, TextMarker::end, ListBase::first, ListBase::last, TextMarker::lineno, Text::lines, Text::markers, NA_EDITED, NC_TEXT, OPERATOR_FINISHED, TextMarker::prev, TextMarker::start, text_update_cursor_moved(), txt_get_span(), txt_move_to(), and WM_event_add_notifier().
Referenced by TEXT_OT_previous_marker().
static int text_refresh_pyconstraints_exec | ( | bContext * | UNUSEDC, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 640 of file text_ops.c.
References BPY_pyconstraint_update(), bPose::chanbase, CONSTRAINT_TYPE_PYTHON, Object::constraints, bPoseChannel::constraints, CTX_data_edit_text(), CTX_data_main(), DAG_id_tag_update(), bConstraint::data, data, ListBase::first, Object::id, bConstraint::next, bPoseChannel::next, ID::next, OB_ARMATURE, OB_RECALC_DATA, OPERATOR_FINISHED, Object::pose, bPythonConstraint::text, bConstraint::type, Object::type, and update().
Referenced by TEXT_OT_refresh_pyconstraints().
static int text_region_edit_poll | ( | bContext * | C | ) | [static] |
Definition at line 112 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), Text::id, ID::lib, ARegion::regiontype, and RGN_TYPE_WINDOW.
Referenced by TEXT_OT_cursor_set(), TEXT_OT_line_number(), and TEXT_OT_selection_set().
static int text_region_scroll_poll | ( | bContext * | C | ) | [static] |
Definition at line 2268 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_region(), CTX_wm_space_text(), ARegion::regiontype, and RGN_TYPE_WINDOW.
Referenced by TEXT_OT_scroll_bar().
static int text_reload_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 312 of file text_ops.c.
References BKE_report(), BPY_text_free_code(), Text::compiled, CTX_data_edit_text(), CTX_wm_space_text(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, reopen_text(), wmOperator::reports, RPT_ERROR, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), and WM_event_add_notifier().
Referenced by TEXT_OT_reload(), and text_resolve_conflict_exec().
static int text_replace_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3000 of file text_ops.c.
References text_find_and_replace(), and TEXT_REPLACE.
Referenced by TEXT_OT_replace().
static int text_replace_set_selected_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 3068 of file text_ops.c.
References BLI_strncpy(), CTX_data_edit_text(), CTX_wm_space_text(), MEM_freeN(), OPERATOR_FINISHED, SpaceText::replacestr, ST_MAX_FIND_STR, and txt_sel_to_buf().
Referenced by TEXT_OT_replace_set_selected().
static int text_resolve_conflict_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3158 of file text_ops.c.
References CTX_data_edit_text(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RESOLVE_IGNORE, RESOLVE_MAKE_INTERNAL, RESOLVE_RELOAD, RESOLVE_SAVE, RNA_enum_get(), text_ignore_modified(), text_make_internal_exec(), text_reload_exec(), and text_save_exec().
Referenced by TEXT_OT_resolve_conflict().
static int text_resolve_conflict_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 3178 of file text_ops.c.
References CTX_data_edit_text(), Text::flags, wmOperatorType::idname, OPERATOR_CANCELLED, RESOLVE_IGNORE, RESOLVE_MAKE_INTERNAL, RESOLVE_RELOAD, RESOLVE_SAVE, text_file_modified(), TXT_ISDIRTY, wmOperator::type, uiItemEnumO(), uiPupMenuBegin(), uiPupMenuEnd(), and uiPupMenuLayout().
Referenced by TEXT_OT_resolve_conflict().
static int text_run_script | ( | bContext * | C, |
ReportList * | reports | ||
) | [static] |
Definition at line 576 of file text_ops.c.
References BKE_report(), BPY_text_exec(), CTX_data_edit_text(), Text::curc, Text::curl, NA_EDITED, NC_TEXT, NC_WINDOW, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, RPT_ERROR, text_update_cursor_moved(), and WM_event_add_notifier().
Referenced by text_cut_exec(), text_delete_exec(), text_insert_invoke(), text_paste_exec(), and text_run_script_exec().
static int text_run_script_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 610 of file text_ops.c.
References BKE_report(), OPERATOR_CANCELLED, wmOperator::reports, RPT_ERROR, and text_run_script().
Referenced by TEXT_OT_run_script().
static int text_run_script_poll | ( | bContext * | C | ) | [static] |
Definition at line 571 of file text_ops.c.
References CTX_data_edit_text(), and NULL.
Referenced by TEXT_OT_run_script().
static int text_save_as_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 510 of file text_ops.c.
References BLI_strdup(), CTX_data_edit_text(), FILE_MAX, Text::flags, MEM_freeN(), NA_EDITED, Text::name, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_string_get(), str, text_update_cursor_moved(), TXT_ISMEM, txt_write_file(), and WM_event_add_notifier().
Referenced by TEXT_OT_save_as(), and text_save_as_invoke().
static int text_save_as_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 532 of file text_ops.c.
References CTX_data_edit_text(), Text::flags, G, Text::id, ID::name, Text::name, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_string_set(), RNA_struct_property_is_set(), str, text_save_as_exec(), TXT_ISMEM, and WM_event_add_fileselect().
Referenced by TEXT_OT_save_as().
static int text_save_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 484 of file text_ops.c.
References CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, wmOperator::reports, text_update_cursor_moved(), txt_write_file(), and WM_event_add_notifier().
Referenced by TEXT_OT_save(), and text_resolve_conflict_exec().
static int text_save_poll | ( | bContext * | C | ) | [static] |
Definition at line 436 of file text_ops.c.
References CTX_data_edit_text(), Text::flags, Text::name, NULL, text_edit_poll(), and TXT_ISMEM.
Referenced by TEXT_OT_resolve_conflict(), and TEXT_OT_save().
static void text_scroll_apply | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2110 of file text_ops.c.
References CTX_wm_area(), CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, SpaceText::cwidth, TextScroll::delta, ED_area_tag_redraw(), TextScroll::first, SpaceText::left, SpaceText::lheight, TextScroll::old, SpaceText::pix_per_line, TextScroll::scrollbar, text_update_character_width(), txt_screen_skip(), and SpaceText::wordwrap.
Referenced by text_scroll_bar_invoke(), text_scroll_invoke(), and text_scroll_modal().
static int text_scroll_bar_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2284 of file text_ops.c.
References CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, TextScroll::delta, TextScroll::first, SpaceText::flags, MEM_callocN(), MIDDLEMOUSE, TextScroll::old, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_struct_property_is_set(), TextScroll::scrollbar, SCROLLHANDLE_BAR, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN_OUTSIDE, ST_SCROLL_SELECT, text_scroll_apply(), text_scroll_exec(), TXT_SCROLL_SPACE, SpaceText::txtbar, wmEvent::type, ARegion::winrct, ARegion::winy, WM_event_add_modal_handler(), rcti::xmax, rcti::xmin, rcti::ymax, rcti::ymin, and TextScroll::zone.
Referenced by TEXT_OT_scroll_bar().
static int text_scroll_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2200 of file text_ops.c.
References OPERATOR_CANCELLED, and scroll_exit().
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
static int text_scroll_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2093 of file text_ops.c.
References CTX_wm_area(), CTX_wm_region(), CTX_wm_space_text(), ED_area_tag_redraw(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), txt_screen_skip(), U, and UserDef::wheellinescroll.
Referenced by TEXT_OT_scroll(), text_scroll_bar_invoke(), and text_scroll_invoke().
static int text_scroll_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2207 of file text_ops.c.
References CTX_wm_space_text(), wmOperator::customdata, SpaceText::cwidth, TextScroll::delta, TextScroll::first, SpaceText::flags, SpaceText::lheight, MEM_callocN(), MOUSEPAN, TextScroll::old, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, wmEvent::prevy, wmOperator::ptr, RNA_struct_property_is_set(), scroll_exit(), TextScroll::scrollbar, SCROLLHANDLE_BAR, ST_SCROLL_SELECT, text_scroll_apply(), text_scroll_exec(), text_update_character_width(), wmEvent::type, WM_event_add_modal_handler(), wmEvent::y, and TextScroll::zone.
Referenced by TEXT_OT_scroll().
static int text_scroll_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2167 of file text_ops.c.
References CLAMP(), CTX_wm_area(), CTX_wm_region(), CTX_wm_space_text(), wmOperator::customdata, ED_area_tag_redraw(), ELEM, LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, scroll_exit(), SCROLLHANDLE_BAR, SCROLLHANDLE_MAX_OUTSIDE, SCROLLHANDLE_MIN_OUTSIDE, text_get_total_lines(), text_scroll_apply(), SpaceText::top, wmEvent::type, SpaceText::viewlines, and TextScroll::zone.
Referenced by TEXT_OT_scroll(), and TEXT_OT_scroll_bar().
static int text_scroll_poll | ( | bContext * | C | ) | [static] |
Definition at line 2087 of file text_ops.c.
References CTX_data_edit_text(), and NULL.
Referenced by TEXT_OT_scroll().
static int text_select_all_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1219 of file text_ops.c.
References CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_update_cursor_moved(), txt_sel_all(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_all().
static int text_select_line_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1245 of file text_ops.c.
References CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_update_cursor_moved(), txt_sel_line(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_line().
static int text_select_word_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1271 of file text_ops.c.
References CTX_data_edit_text(), NA_EDITED, NC_TEXT, OPERATOR_FINISHED, text_update_cursor_moved(), txt_jump_left(), txt_jump_right(), and WM_event_add_notifier().
Referenced by TEXT_OT_select_word().
static int text_set_selection_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2664 of file text_ops.c.
References OPERATOR_FINISHED, and text_cursor_set_exit().
Referenced by TEXT_OT_selection_set().
static int text_set_selection_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2623 of file text_ops.c.
References CTX_wm_space_text(), wmOperator::customdata, ListBase::first, Text::lines, MEM_callocN(), wmEvent::mval, SetSelection::old, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RNA_boolean_get(), Text::selc, SetSelection::selc, SetSelection::selecting, Text::sell, SetSelection::sell, SpaceText::text, text_cursor_set_apply(), txt_get_span(), SpaceText::txtbar, WM_event_add_modal_handler(), and rcti::xmin.
Referenced by TEXT_OT_selection_set().
static int text_set_selection_modal | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2648 of file text_ops.c.
References LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RIGHTMOUSE, text_cursor_set_apply(), text_cursor_set_exit(), and wmEvent::type.
Referenced by TEXT_OT_selection_set().
static int text_space_edit_poll | ( | bContext * | C | ) | [static] |
Definition at line 96 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), Text::id, and ID::lib.
Referenced by TEXT_OT_find(), TEXT_OT_find_set_selected(), TEXT_OT_mark_all(), TEXT_OT_move_select(), TEXT_OT_overwrite_toggle(), TEXT_OT_replace(), and TEXT_OT_replace_set_selected().
static int text_to_3d_object_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3234 of file text_ops.c.
References CTX_data_edit_text(), ED_text_to_object(), OPERATOR_FINISHED, wmOperator::ptr, and RNA_boolean_get().
Referenced by TEXT_OT_to_3d_object().
static int text_toggle_overwrite_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2031 of file text_ops.c.
References CTX_wm_space_text(), NC_TEXT, ND_CURSOR, OPERATOR_FINISHED, SpaceText::overwrite, SpaceText::text, and WM_event_add_notifier().
Referenced by TEXT_OT_overwrite_toggle().
static int text_uncomment_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1042 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), txt_has_sel(), txt_order_cursors(), txt_uncomment(), and WM_event_add_notifier().
Referenced by TEXT_OT_uncomment().
static int text_unindent_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 927 of file text_ops.c.
References CTX_data_edit_text(), CTX_wm_space_text(), NA_EDITED, NC_TEXT, OPERATOR_CANCELLED, OPERATOR_FINISHED, text_drawcache_tag_update(), text_update_cursor_moved(), text_update_edited(), txt_has_sel(), txt_order_cursors(), txt_unindent(), and WM_event_add_notifier().
Referenced by TEXT_OT_unindent().
static int text_unlink_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 355 of file text_ops.c.
References CTX_data_edit_text(), CTX_data_main(), CTX_wm_space_text(), free_libblock(), Text::id, NA_REMOVED, NC_TEXT, ND_CURSOR, ID::next, NULL, OPERATOR_FINISHED, ID::prev, Main::text, SpaceText::text, text_drawcache_tag_update(), text_update_cursor_moved(), unlink_text(), and WM_event_add_notifier().
Referenced by TEXT_OT_unlink().
static int text_unlink_poll | ( | bContext * | C | ) | [static] |
Definition at line 349 of file text_ops.c.
References CTX_data_edit_text(), and NULL.
Referenced by TEXT_OT_unlink().
void text_update_edited | ( | Text * | text | ) |
Definition at line 146 of file text_ops.c.
References ListBase::first, Text::lines, TextLine::next, and text_update_line_edited().
void text_update_line_edited | ( | TextLine * | line | ) |
Definition at line 134 of file text_ops.c.
References TextLine::format, MEM_freeN(), and NULL.
Referenced by do_textmarkers(), do_texttools(), text_delete_exec(), text_insert_exec(), text_line_break_exec(), and text_update_edited().
static void txt_copy_clipboard | ( | Text * | text | ) | [static] |
Definition at line 824 of file text_ops.c.
References MEM_freeN(), txt_copy_selected(), and WM_clipboard_text_set().
Referenced by text_copy_exec(), and text_cut_exec().
static char* txt_copy_selected | ( | Text * | text | ) | [static] |
Definition at line 697 of file text_ops.c.
References BLI_strncpy(), Text::curc, Text::curl, TextLine::len, length(), TextLine::line, MEM_callocN(), TextLine::next, NULL, Text::selc, Text::sell, txt_get_span(), and txt_has_sel().
Referenced by txt_copy_clipboard().
Definition at line 2057 of file text_ops.c.
References text_get_total_lines(), SpaceText::top, and SpaceText::viewlines.
Referenced by text_cursor_set_apply(), text_scroll_apply(), and text_scroll_exec().
Definition at line 1575 of file text_ops.c.
References BLI_str_utf8_size(), Text::curc, Text::curl, ListBase::first, i, Text::lines, max, Text::selc, Text::sell, SpaceText::tabnumber, SpaceText::text, text_update_character_width(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), txt_utf8_index_to_offset(), UNDO_CTO, UNDO_STO, and wrap_width().
Referenced by text_move_cursor().
Definition at line 1743 of file text_ops.c.
References BLI_findindex(), Text::curc, Text::curl, ListBase::first, Text::lines, TextLine::next, Text::selc, Text::sell, SpaceText::text, text_get_char_pos(), text_get_cursor_rel(), text_get_visible_lines(), text_update_character_width(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and wrap_offset_in_line().
Referenced by text_move_cursor().
Definition at line 1643 of file text_ops.c.
References BLI_str_prev_char_utf8(), BLI_str_utf8_size(), Text::curc, Text::curl, ListBase::first, i, Text::lines, max, Text::selc, Text::sell, SpaceText::tabnumber, SpaceText::text, text_update_character_width(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and wrap_width().
Referenced by text_move_cursor().
Definition at line 1707 of file text_ops.c.
References BLI_findindex(), Text::curc, Text::curl, ListBase::first, Text::lines, TextLine::prev, Text::selc, Text::sell, SpaceText::text, text_get_char_pos(), text_get_cursor_rel(), text_get_visible_lines(), text_update_character_width(), txt_get_span(), txt_pop_sel(), txt_undo_add_toop(), UNDO_CTO, UNDO_STO, and wrap_offset_in_line().
Referenced by text_move_cursor().
static void txt_write_file | ( | Text * | text, |
ReportList * | reports | ||
) | [static] |
Definition at line 446 of file text_ops.c.
References BKE_reportf(), BLI_path_abs(), BLI_strncpy(), FILE_MAX, ListBase::first, Text::flags, G, TextLine::line, Text::lines, Text::mtime, Text::name, TextLine::next, NULL, RPT_ERROR, RPT_WARNING, and TXT_ISDIRTY.
Referenced by text_save_as_exec(), and text_save_exec().
EnumPropertyItem delete_type_items[] [static] |
{ {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""}, {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""}, {DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""}, {DEL_PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""}, {0, NULL, 0, NULL, NULL}}
Definition at line 1979 of file text_ops.c.
EnumPropertyItem move_type_items[] [static] |
{ {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""}, {LINE_END, "LINE_END", 0, "Line End", ""}, {FILE_TOP, "FILE_TOP", 0, "File Top", ""}, {FILE_BOTTOM, "FILE_BOTTOM", 0, "File Bottom", ""}, {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 1396 of file text_ops.c.
EnumPropertyItem resolution_items[] [static] |
{ {RESOLVE_IGNORE, "IGNORE", 0, "Ignore", ""}, {RESOLVE_RELOAD, "RELOAD", 0, "Reload", ""}, {RESOLVE_SAVE, "SAVE", 0, "Save", ""}, {RESOLVE_MAKE_INTERNAL, "MAKE_INTERNAL", 0, "Make Internal", ""}, {0, NULL, 0, NULL, NULL}}
Definition at line 3096 of file text_ops.c.
EnumPropertyItem whitespace_type_items[] [static] |