Blender V4.3
text_undo.cc File Reference
#include <cerrno>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_text_types.h"
#include "BLI_array_store.h"
#include "BLI_array_utils.h"
#include "BKE_context.hh"
#include "BKE_main.hh"
#include "BKE_text.h"
#include "BKE_undo_system.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_screen.hh"
#include "ED_text.hh"
#include "ED_undo.hh"
#include "text_intern.hh"

Go to the source code of this file.

Classes

struct  TextState
 
struct  TextUndoStep
 

Functions

Utilities
UndoStepED_text_undo_push_init (bContext *C)
 

Implements ED Undo System

#define ARRAY_CHUNK_SIZE   128
 
struct { 
 
   BArrayStore *   buffer_store 
 
   int   users 
 
g_text_buffers = {nullptr} 
 
static void text_state_encode (TextState *state, Text *text, BArrayStore *buffer_store)
 
static void text_state_decode (TextState *state, Text *text)
 
static size_t text_undosys_step_encode_to_state (TextState *state, Text *text)
 
static bool text_undosys_poll (bContext *)
 
static void text_undosys_step_encode_init (bContext *C, UndoStep *us_p)
 
static bool text_undosys_step_encode (bContext *C, Main *, UndoStep *us_p)
 
static void text_undosys_step_decode (bContext *C, Main *, UndoStep *us_p, const eUndoStepDir dir, bool is_final)
 
static void text_undosys_step_free (UndoStep *us_p)
 
static void text_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
 
void ED_text_undosys_type (UndoType *ut)
 

Macro Definition Documentation

◆ ARRAY_CHUNK_SIZE

#define ARRAY_CHUNK_SIZE   128

Definition at line 37 of file text_undo.cc.

Referenced by text_undosys_step_encode_to_state().

Function Documentation

◆ ED_text_undo_push_init()

◆ ED_text_undosys_type()

◆ text_state_decode()

static void text_state_decode ( TextState * state,
Text * text )
static

◆ text_state_encode()

static void text_state_encode ( TextState * state,
Text * text,
BArrayStore * buffer_store )
static

◆ text_undosys_foreach_ID_ref()

static void text_undosys_foreach_ID_ref ( UndoStep * us_p,
UndoTypeForEachIDRefFn foreach_ID_ref_fn,
void * user_data )
static

Definition at line 219 of file text_undo.cc.

References TextUndoStep::text_ref.

Referenced by ED_text_undosys_type().

◆ text_undosys_poll()

static bool text_undosys_poll ( bContext * )
static

◆ text_undosys_step_decode()

◆ text_undosys_step_encode()

◆ text_undosys_step_encode_init()

◆ text_undosys_step_encode_to_state()

static size_t text_undosys_step_encode_to_state ( TextState * state,
Text * text )
static

◆ text_undosys_step_free()

static void text_undosys_step_free ( UndoStep * us_p)
static

Variable Documentation

◆ buffer_store

BArrayStore* buffer_store

Definition at line 107 of file text_undo.cc.

Referenced by text_state_encode().

◆ [struct]

struct { ... } g_text_buffers

◆ users

int users

Definition at line 108 of file text_undo.cc.