34 ListBaseT<UndoStack_Text_State>
states;
41 if (stack->
current ==
nullptr) {
58 if (stack->
current ==
nullptr) {
84 if (stack->
current !=
nullptr) {
93 const int text_size = strlen(text) + 1;
105 stack->
states.clear_no_delete();
112 stack->
states.free_no_destruct();
These structs are the foundation for all linked lists in the library system.
Read Blender memory allocation and freeing.
UndoStack_Text * textedit_undo_stack_create()
static const char * textedit_redo_impl(UndoStack_Text *stack, int *r_cursor_index)
const char * textedit_undo(UndoStack_Text *stack, int direction, int *r_cursor_index)
void textedit_undo_stack_destroy(UndoStack_Text *stack)
static const char * textedit_undo_impl(UndoStack_Text *stack, int *r_cursor_index)
void textedit_undo_push(UndoStack_Text *stack, const char *text, int cursor_index)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
UndoStack_Text_State * next
UndoStack_Text_State * prev
ListBaseT< UndoStack_Text_State > states
UndoStack_Text_State * current