1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
1999-09-27 18:44:28 +00:00
|
|
|
* LyX, The Document Processor
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
1999-11-15 12:01:38 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 The LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
1999-11-15 12:01:38 +00:00
|
|
|
* ====================================================== */
|
|
|
|
|
|
|
|
#ifndef UNDO_H
|
|
|
|
#define UNDO_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2003-06-04 07:14:05 +00:00
|
|
|
#include "ParagraphList.h"
|
2000-03-28 02:18:55 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
class Undo {
|
|
|
|
public:
|
|
|
|
/// The undo kinds
|
|
|
|
enum undo_kind {
|
|
|
|
///
|
|
|
|
INSERT,
|
|
|
|
///
|
|
|
|
DELETE,
|
|
|
|
///
|
|
|
|
EDIT,
|
|
|
|
///
|
|
|
|
FINISH
|
|
|
|
};
|
|
|
|
///
|
|
|
|
undo_kind kind;
|
|
|
|
///
|
2003-06-04 12:45:26 +00:00
|
|
|
int inset_id; // valid if >= 0, if < 0 then not in inset
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-06-04 12:45:26 +00:00
|
|
|
int plist_id;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-06-04 12:45:26 +00:00
|
|
|
int first_par_offset;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-06-04 12:45:26 +00:00
|
|
|
int last_par_offset;
|
|
|
|
///
|
|
|
|
int cursor_par_offset;
|
2001-07-06 15:57:54 +00:00
|
|
|
///
|
1999-09-27 18:44:28 +00:00
|
|
|
int cursor_pos; // valid if >= 0
|
|
|
|
///
|
2003-06-04 07:14:05 +00:00
|
|
|
ParagraphList pars;
|
|
|
|
|
2000-01-06 02:44:26 +00:00
|
|
|
///
|
2003-06-04 12:45:26 +00:00
|
|
|
Undo(undo_kind kind, int inset_id, int plist_id,
|
|
|
|
int first, int last,
|
|
|
|
int cursor, int cursor_pos,
|
2003-06-04 07:14:05 +00:00
|
|
|
ParagraphList const & par_arg);
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|