mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
3677e0f57b
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3206 a592a061-630c-0410-9148-cb99ea01b6c8
52 lines
850 B
C++
52 lines
850 B
C++
// -*- C++ -*-
|
|
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 1995 Matthias Ettrich
|
|
* Copyright 1995-2001 The LyX Team.
|
|
*
|
|
* ====================================================== */
|
|
|
|
#ifndef UNDO_STACK_H
|
|
#define UNDO_STACK_H
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
#include <list>
|
|
|
|
class Undo;
|
|
|
|
/// A limited Stack for the undo informations.
|
|
class UndoStack {
|
|
private:
|
|
///
|
|
typedef std::list<Undo*> Stakk;
|
|
///
|
|
Stakk stakk;
|
|
/// the maximum number of undo steps stored.
|
|
Stakk::size_type limit;
|
|
public:
|
|
///
|
|
UndoStack();
|
|
///
|
|
~UndoStack();
|
|
///
|
|
void pop();
|
|
///
|
|
Undo * top() const;
|
|
///
|
|
bool empty() const;
|
|
///
|
|
void clear();
|
|
///
|
|
void SetStackLimit(Stakk::size_type l);
|
|
///
|
|
void push(Undo * undo_arg);
|
|
};
|
|
|
|
#endif
|