|
Blender
V3.3
|
#include <string.h>#include "BLI_listbase.h"#include "DNA_listBase.h"#include "MEM_guardedalloc.h"#include "interface_intern.h"Go to the source code of this file.
Classes | |
| struct | uiUndoStack_Text_State |
| struct | uiUndoStack_Text |
Text Field Undo Stack | |
| typedef struct uiUndoStack_Text_State | uiUndoStack_Text_State |
| typedef struct uiUndoStack_Text | uiUndoStack_Text |
| static const char * | ui_textedit_undo_impl (uiUndoStack_Text *stack, int *r_cursor_index) |
| static const char * | ui_textedit_redo_impl (uiUndoStack_Text *stack, int *r_cursor_index) |
| const char * | ui_textedit_undo (uiUndoStack_Text *stack, int direction, int *r_cursor_index) |
| void | ui_textedit_undo_push (uiUndoStack_Text *stack, const char *text, int cursor_index) |
| uiUndoStack_Text * | ui_textedit_undo_stack_create (void) |
| void | ui_textedit_undo_stack_destroy (uiUndoStack_Text *stack) |
Undo stack to use for UI widgets that manage their own editing state.
Definition in file interface_undo.c.
| typedef struct uiUndoStack_Text uiUndoStack_Text |
| typedef struct uiUndoStack_Text_State uiUndoStack_Text_State |
|
static |
Definition at line 52 of file interface_undo.c.
References uiUndoStack_Text::current, uiUndoStack_Text_State::cursor_index, uiUndoStack_Text_State::next, NULL, and uiUndoStack_Text_State::text.
Referenced by ui_textedit_undo().
| const char* ui_textedit_undo | ( | uiUndoStack_Text * | stack, |
| int | direction, | ||
| int * | r_cursor_index | ||
| ) |
Definition at line 69 of file interface_undo.c.
References BLI_assert, ELEM, ui_textedit_redo_impl(), and ui_textedit_undo_impl().
Referenced by ui_do_but_textedit().
|
static |
Definition at line 35 of file interface_undo.c.
References uiUndoStack_Text::current, uiUndoStack_Text_State::cursor_index, NULL, uiUndoStack_Text_State::prev, and uiUndoStack_Text_State::text.
Referenced by ui_textedit_undo().
| void ui_textedit_undo_push | ( | struct uiUndoStack_Text * | undo_stack, |
| const char * | text, | ||
| int | cursor_index | ||
| ) |
Push the information in the arguments to a new state in the undo stack.
Definition at line 78 of file interface_undo.c.
References BLI_addtail(), BLI_remlink(), uiUndoStack_Text::current, uiUndoStack_Text_State::cursor_index, MEM_freeN, MEM_mallocN, uiUndoStack_Text_State::next, NULL, state, uiUndoStack_Text::states, and uiUndoStack_Text_State::text.
Referenced by ui_do_but_textedit(), and ui_textedit_begin().
| uiUndoStack_Text* ui_textedit_undo_stack_create | ( | void | ) |
Start the undo stack.
Definition at line 97 of file interface_undo.c.
References BLI_listbase_clear(), uiUndoStack_Text::current, MEM_mallocN, NULL, and uiUndoStack_Text::states.
Referenced by ui_textedit_begin().
| void ui_textedit_undo_stack_destroy | ( | uiUndoStack_Text * | stack | ) |
Definition at line 106 of file interface_undo.c.
References BLI_freelistN(), MEM_freeN, and uiUndoStack_Text::states.
Referenced by ui_textedit_end().