X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fundo.h;h=4ebdd89224f754a9222b54aad4646de62b982c04;hb=2523638092e2024bac408eee98ad2094bc4e4089;hp=4f9af2af8ff688278682912c657108569a899fa3;hpb=1d7d3cc4afa2205c801ccc2aa71c7ac59359dc5f;p=lyx.git diff --git a/src/undo.h b/src/undo.h index 4f9af2af8f..4ebdd89224 100644 --- a/src/undo.h +++ b/src/undo.h @@ -1,11 +1,11 @@ // -*- C++ -*- /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 1995 Matthias Ettrich - * Copyright 1995-1999 The LyX Team. + * Copyright 1995-2001 The LyX Team. * * ====================================================== */ @@ -16,11 +16,7 @@ #pragma interface #endif -#include -using std::list; - -#include "lyxparagraph.h" - +class Paragraph; /// class Undo { @@ -45,60 +41,19 @@ public: /// int number_of_cursor_par; /// + int number_of_inset_id; // valid if >= 0, if < 0 then not in inset + /// int cursor_pos; // valid if >= 0 /// - LyXParagraph * par; + Paragraph * par; /// - Undo(undo_kind kind_arg, + Undo(undo_kind kind_arg, int id_inset_arg, int number_before_arg, int number_behind_arg, int cursor_par_arg, int cursor_pos_arg, - LyXParagraph * par_arg) - { - kind = kind_arg; - number_of_before_par = number_before_arg; - number_of_behind_par = number_behind_arg; - number_of_cursor_par = cursor_par_arg; - cursor_pos = cursor_pos_arg; - par = par_arg; - } + Paragraph * par_arg); /// - ~Undo() { - LyXParagraph * tmppar; - while (par) { - tmppar = par; - par = par->next; - delete tmppar; - } - } + ~Undo(); }; -/// A limited Stack for the undo informations. -class UndoStack{ -private: - /// - typedef list Stakk; - /// - Stakk stakk; - /// the maximum number of undo steps stored. - Stakk::size_type limit; -public: - /// - UndoStack(); - /// - Undo * pop(); - /// - Undo * top(); - /// - bool empty() const { return stakk.empty(); } - /// - ~UndoStack(); - /// - void clear(); - /// - void SetStackLimit(Stakk::size_type l); - /// - void push(Undo * undo_arg); -}; - #endif