| # kate Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kateundo.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (C) 2002 John Firebaugh <jfirebaugh@kde.org>
    00003    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
    00004    Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
    00005
    00006    This library is free software; you can redistribute it and/or
    00007    modify it under the terms of the GNU Library General Public
    00008    License version 2 as published by the Free Software Foundation.
    00009
    00010    This library is distributed in the hope that it will be useful,
    00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013    Library General Public License for more details.
    00014
    00015    You should have received a copy of the GNU Library General Public License
    00016    along with this library; see the file COPYING.LIB.  If not, write to
    00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018    Boston, MA 02111-1307, USA.
    00019 */
    00020
    00021 #ifndef kate_undo_h
    00022 #define kate_undo_h
    00023
    00024 #include <qptrlist.h>
    00025 #include <qstring.h>
    00026
    00027 class KateDocument;
    00028 class KateUndo;
    00029
    00033 class KateUndoGroup
    00034 {
    00035   public:
    00040     KateUndoGroup (KateDocument *doc);
    00041
    00045     ~KateUndoGroup ();
    00046
    00047   public:
    00051     void undo ();
    00052
    00056     void redo ();
    00057
    00058   public:
    00062     enum UndoType
    00063     {
    00064       editInsertText,
    00065       editRemoveText,
    00066       editWrapLine,
    00067       editUnWrapLine,
    00068       editInsertLine,
    00069       editRemoveLine,
    00070       editMarkLineAutoWrapped,
    00071       editInvalid
    00072     };
    00073
    00082     void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text);
    00083
    00089     bool merge(KateUndoGroup* newGroup,bool complex);
    00090
    00094     void safePoint (bool safePoint=true);
    00095   private:
    00100     KateUndoGroup::UndoType singleType();
    00101
    00107     bool isOnlyType(KateUndoGroup::UndoType type);
    00108
    00113     void addItem (KateUndo *u);
    00114
    00115   private:
    00119     KateDocument *m_doc;
    00120
    00124     QPtrList<KateUndo> m_items;
    00125
    00129     bool m_safePoint;
    00130 };
    00131
    00132 #endif
    00133
    00134 // kate: space-indent on; indent-width 2; replace-tabs on;

This file is part of the documentation for kate Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:36:38 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003