|
Blender V5.0
|
Go to the source code of this file.
Functions | |
| bool | ED_text_activate_in_screen (bContext *C, Text *text) |
| int | ED_space_text_visible_lines_get (const SpaceText *st) |
| void | ED_space_text_scroll_to_cursor (SpaceText *st, ARegion *region, bool center) |
| bool | ED_space_text_region_location_from_cursor (const SpaceText *st, const ARegion *region, const int cursor_co[2], int r_pixel_co[2]) |
| void | ED_text_undosys_type (UndoType *ut) |
| UndoStep * | ED_text_undo_push_init (bContext *C) |
| const char * | ED_text_format_comment_line_prefix (Text *text) |
| bool | ED_text_is_syntax_highlight_supported (Text *text) |
| bool ED_space_text_region_location_from_cursor | ( | const SpaceText * | st, |
| const ARegion * | region, | ||
| const int | cursor_co[2], | ||
| int | r_pixel_co[2] ) |
Takes a cursor (row, character) and returns x,y pixel coords.
Definition at line 1777 of file text_draw.cc.
References BLI_findlink(), BLI_str_utf8_offset_from_index(), SpaceText::left, TextLine::len, TextLine::line, Text::lines, SpaceText::runtime, space_text_get_char_pos(), space_text_wrap_offset(), SpaceText::text, SpaceText::top, TXT_BODY_LEFT, TXT_LINE_HEIGHT, and ARegion::winy.
Moves the view to the cursor location, also used to make sure the view isn't outside the file.
Definition at line 1690 of file text_draw.cc.
References Text::curl, ELEM, ListBase::first, i, SpaceText::left, TextLine::line, Text::lines, SpaceText::runtime, Text::selc, Text::sell, space_text_get_char_pos(), space_text_update_character_width(), space_text_wrap_offset(), SpaceText::text, SpaceText::top, TXT_BODY_LEFT, txt_get_span(), TXT_SCROLL_WIDTH, ARegion::winx, SpaceText::wordwrap, and x.
Referenced by ED_text_activate_in_screen(), space_text_scroll_to_cursor_with_area(), and text_cursor_set_apply().
| int ED_space_text_visible_lines_get | ( | const SpaceText * | st | ) |
Definition at line 47 of file text_draw.cc.
References SpaceText::runtime.
Definition at line 1673 of file text_draw.cc.
References BKE_area_find_region_type(), BKE_screen_find_big_area(), C, CTX_wm_screen(), ED_space_text_scroll_to_cursor(), ListBase::first, NC_TEXT, ND_CURSOR, RGN_TYPE_WINDOW, SPACE_TEXT, ScrArea::spacedata, SpaceText::text, and WM_event_add_notifier().
Referenced by text_jump_to_file_at_point_internal(), and blender::ed::outliner::tree_element_text_activate().
| const char * ED_text_format_comment_line_prefix | ( | Text * | text | ) |
Definition at line 204 of file text_format.cc.
References ED_text_format_get().
Referenced by text_comment_exec().
| bool ED_text_is_syntax_highlight_supported | ( | Text * | text | ) |
Definition at line 210 of file text_format.cc.
References BLI_path_extension(), BLI_strcasecmp(), BLI_string_is_decimal(), Text::id, LISTBASE_FOREACH, ID::name, and tft_lb.
Referenced by space_text_draw_context_init().
Use operator system to finish the undo step.
Definition at line 249 of file text_undo.cc.
References BKE_undosys_step_push_init_with_type(), BKE_UNDOSYS_TYPE_TEXT, C, CTX_data_main(), ED_undo_stack_get(), ListBase::first, wmWindowManager::op_undo_depth, and Main::wm.
Referenced by move_lines_exec(), text_autocomplete_invoke(), text_autocomplete_modal(), text_comment_exec(), text_cut_exec(), text_delete_exec(), text_duplicate_line_exec(), text_find_and_replace(), text_indent_exec(), text_insert_exec(), text_line_break_exec(), text_paste_exec(), text_replace_all(), and text_unindent_exec().
| void ED_text_undosys_type | ( | UndoType * | ut | ) |
Export for ED_undo_sys.
Definition at line 227 of file text_undo.cc.
References UndoType::flags, UndoType::name, UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_encode_init, UndoType::step_foreach_ID_ref, UndoType::step_free, UndoType::step_size, text_undosys_foreach_ID_ref(), text_undosys_poll(), text_undosys_step_decode(), text_undosys_step_encode(), text_undosys_step_encode_init(), text_undosys_step_free(), UNDOTYPE_FLAG_DECODE_ACTIVE_STEP, and UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE.
Referenced by ED_undosys_type_init().