1 #ifndef _K_UNDOBUFFER_H
2 #define _K_UNDOBUFFER_H
18 KUndoItem(const char* text
, int32 length
,
19 int32 offset
, undo_type history
,
23 void Merge(const char* text
, int32 length
);
37 class KUndoBuffer
: public BList
43 bool AddItem(KUndoItem
* item
, int32 index
);
44 bool AddItem(KUndoItem
* item
);
46 KUndoItem
* RemoveItem(int32 index
);
47 KUndoItem
* ItemAt(int32 index
) const;
49 status_t
AddUndo(const char* redo_text
, int32 length
,
50 int32 offset
, undo_type history
,
53 status_t
MakeNewUndoItem();
55 status_t
Undo(char** text
, int32
* length
, int32
* offset
,
56 undo_type
* history
, int32
* cursor_pos
);
58 status_t
Redo(char** text
, int32
* length
, int32
* offset
,
59 undo_type
* history
, int32
* cursor_pos
,
71 status_t
NewUndo(const char* text
, int32 length
,
72 int32 offset
, undo_type history
,
77 #endif // _K_UNDOBUFFER_H