Blender  V3.3
Classes
text_undo.c File Reference
#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
UndoStepED_text_undo_push_init (bContext *C)
 

Implements ED Undo System

#define ARRAY_CHUNK_SIZE   128
 
typedef struct TextState TextState
 
typedef struct TextUndoStep TextUndoStep
 
struct {
   BArrayStore *   buffer_store
 
   int   users
 
g_text_buffers = {NULL}
 
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 *UNUSED(C))
 
static void text_undosys_step_encode_init (struct bContext *C, UndoStep *us_p)
 
static bool text_undosys_step_encode (struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p)
 
static void text_undosys_step_decode (struct bContext *C, struct Main *UNUSED(bmain), 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 48 of file text_undo.c.

Typedef Documentation

◆ TextState

typedef struct TextState TextState

Only stores the state of a text buffer.

◆ TextUndoStep

typedef struct TextUndoStep TextUndoStep

Function Documentation

◆ ED_text_undo_push_init()

UndoStep* ED_text_undo_push_init ( struct bContext C)

◆ ED_text_undosys_type()

void ED_text_undosys_type ( struct UndoType ut)

◆ 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 233 of file text_undo.c.

References TextUndoStep::text_ref, and user_data.

Referenced by ED_text_undosys_type().

◆ text_undosys_poll()

static bool text_undosys_poll ( bContext UNUSEDC)
static

◆ text_undosys_step_decode()

static void text_undosys_step_decode ( struct bContext C,
struct Main UNUSEDbmain,
UndoStep us_p,
const eUndoStepDir  dir,
bool  is_final 
)
static

◆ text_undosys_step_encode()

static bool text_undosys_step_encode ( struct bContext C,
struct Main UNUSEDbmain,
UndoStep us_p 
)
static

◆ text_undosys_step_encode_init()

static void text_undosys_step_encode_init ( struct bContext C,
UndoStep us_p 
)
static

◆ 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 116 of file text_undo.c.

Referenced by text_state_encode().

◆ 

struct { ... } g_text_buffers

◆ users

int users

Definition at line 117 of file text_undo.c.