Blender
V3.3
|
#include <errno.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_text_types.h"
#include "BLI_array_store.h"
#include "BLI_array_utils.h"
#include "BLT_translation.h"
#include "PIL_time.h"
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_text.h"
#include "BKE_undo_system.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_curve.h"
#include "ED_screen.h"
#include "ED_text.h"
#include "ED_undo.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "text_format.h"
#include "text_intern.h"
Go to the source code of this file.
Classes | |
struct | TextState |
struct | TextUndoStep |
Functions | |
Utilities | |
UndoStep * | ED_text_undo_push_init (bContext *C) |
#define ARRAY_CHUNK_SIZE 128 |
Definition at line 48 of file text_undo.c.
typedef struct TextUndoStep TextUndoStep |
Use operator system to finish the undo step.
Definition at line 263 of file text_undo.c.
References BKE_undosys_step_push_init_with_type(), BKE_UNDOSYS_TYPE_TEXT, C, CTX_data_main(), ED_undo_stack_get(), ListBase::first, NULL, 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().
Export for ED_undo_sys.
Definition at line 241 of file text_undo.c.
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().
Definition at line 82 of file text_undo.c.
References BLI_array_store_state_data_get_alloc(), MEM_freeN, state, txt_from_buf_for_undo(), and txt_move_to().
Referenced by text_undosys_step_decode().
|
static |
Definition at line 60 of file text_undo.c.
References BLI_array_store_state_add(), buffer_store, Text::curc, Text::curl, ListBase::first, Text::lines, MEM_freeN, NULL, Text::selc, Text::sell, state, txt_get_span(), txt_has_sel(), and txt_to_buf_for_undo().
Referenced by text_undosys_step_encode_to_state().
|
static |
Definition at line 233 of file text_undo.c.
References TextUndoStep::text_ref, and user_data.
Referenced by ED_text_undosys_type().
Definition at line 135 of file text_undo.c.
References BKE_UNDOSYS_TYPE_TEXT, ED_undo_stack_get(), UndoStack::step_init, and UndoStep::type.
Referenced by ED_text_undosys_type().
|
static |
Definition at line 185 of file text_undo.c.
References BLI_assert, TextState::buf_array_state, C, CTX_wm_space_text(), NA_EDITED, NC_TEXT, NULL, usdtokens::st(), state, TextUndoStep::states, STEP_INVALID, STEP_UNDO, text_drawcache_tag_update(), TextUndoStep::text_ref, text_state_decode(), text_update_cursor_moved(), and WM_event_add_notifier().
Referenced by ED_text_undosys_type().
|
static |
Definition at line 168 of file text_undo.c.
References BLI_assert, C, CTX_data_edit_text(), UndoStep::data_size, UndoStep::is_applied, TextUndoStep::states, TextUndoStep::step, TextUndoStep::text_ref, text_undosys_step_encode_to_state(), and UNUSED_VARS_NDEBUG.
Referenced by ED_text_undosys_type().
Definition at line 142 of file text_undo.c.
References ARRAY_SIZE, BKE_UNDOSYS_TYPE_TEXT, BLI_array_is_zeroed, BLI_assert, C, CTX_data_edit_text(), UndoStep::data_size, ED_undo_stack_get(), Text::id, if(), ID::name, TextUndoStep::states, TextUndoStep::step, UndoStack::step_active, STREQ, TextUndoStep::text_ref, text_undosys_step_encode_to_state(), and UndoStep::type.
Referenced by ED_text_undosys_type().
Definition at line 120 of file text_undo.c.
References ARRAY_CHUNK_SIZE, BLI_array_is_zeroed, BLI_array_store_calc_size_compacted_get(), BLI_array_store_create(), BLI_assert, g_text_buffers, NULL, state, and text_state_encode().
Referenced by text_undosys_step_encode(), and text_undosys_step_encode_init().
Definition at line 216 of file text_undo.c.
References ARRAY_SIZE, BLI_array_store_destroy(), BLI_array_store_state_remove(), g_text_buffers, NULL, state, and TextUndoStep::states.
Referenced by ED_text_undosys_type().
BArrayStore* buffer_store |
Definition at line 116 of file text_undo.c.
Referenced by text_state_encode().
struct { ... } g_text_buffers |
Referenced by text_undosys_step_encode_to_state(), and text_undosys_step_free().
int users |
Definition at line 117 of file text_undo.c.