]> git.lyx.org Git - lyx.git/blob - src/undostack.h
Don't launch that Alert if the graphics file isn't found. It doesn't work
[lyx.git] / src / undostack.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2001 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef UNDO_STACK_H
13 #define UNDO_STACK_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include <list>
20
21 class Undo;
22
23 /// A limited Stack for the undo informations.
24 class UndoStack {
25 private:
26         ///
27         typedef std::list<Undo*> Stakk;
28         ///
29         Stakk stakk;
30         /// the maximum number of undo steps stored.
31         Stakk::size_type limit;
32 public:
33         ///
34         UndoStack();
35         ///
36         ~UndoStack();
37         ///
38         void pop();
39         ///
40         Undo * top() const;
41         ///
42         bool empty() const;
43         ///
44         void clear();
45         ///
46         void SetStackLimit(Stakk::size_type l);
47         ///
48         void push(Undo * undo_arg);
49 };
50
51 #endif