• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

  • kate
  • part
kateundo.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2002 John Firebaugh <jfirebaugh@kde.org>
3 Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
4 Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef kate_undo_h
22#define kate_undo_h
23
24#include <tqptrlist.h>
25#include <tqstring.h>
26
27class KateDocument;
28class KateUndo;
29
33class KateUndoGroup
34{
35 public:
40 KateUndoGroup (KateDocument *doc);
41
45 ~KateUndoGroup ();
46
47 public:
51 void undo ();
52
56 void redo ();
57
58 public:
62 enum UndoType
63 {
64 editInsertText,
65 editRemoveText,
66 editWrapLine,
67 editUnWrapLine,
68 editInsertLine,
69 editRemoveLine,
70 editMarkLineAutoWrapped,
71 editInvalid
72 };
73
82 void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text);
83
90 bool merge(KateUndoGroup* newGroup,bool complex);
91
95 void safePoint (bool safePoint=true);
96
100 bool isEmpty () const { return m_items.isEmpty(); }
101
102 private:
107 KateUndoGroup::UndoType singleType();
108
114 bool isOnlyType(KateUndoGroup::UndoType type);
115
120 void addItem (KateUndo *u);
121
122 private:
126 KateDocument *m_doc;
127
131 TQPtrList<KateUndo> m_items;
132
136 bool m_safePoint;
137};
138
139#endif
KateUndoGroup
Class to manage a group of undo items.
Definition: kateundo.h:34
KateUndoGroup::redo
void redo()
Redo the contained undo items.
Definition: kateundo.cpp:309
KateUndoGroup::~KateUndoGroup
~KateUndoGroup()
Destructor.
Definition: kateundo.cpp:282
KateUndoGroup::undo
void undo()
Undo the contained undo items.
Definition: kateundo.cpp:286
KateUndoGroup::addItem
void addItem(KateUndoGroup::UndoType type, uint line, uint col, uint len, const TQString &text)
add an item to the group
Definition: kateundo.cpp:332
KateUndoGroup::KateUndoGroup
KateUndoGroup(KateDocument *doc)
Constructor.
Definition: kateundo.cpp:276
KateUndoGroup::isEmpty
bool isEmpty() const
is this undogroup empty?
Definition: kateundo.h:100
KateUndoGroup::UndoType
UndoType
Types for undo items.
Definition: kateundo.h:63
KateUndoGroup::safePoint
void safePoint(bool safePoint=true)
set group as as savepoint.
Definition: kateundo.cpp:363
KateUndoGroup::merge
bool merge(KateUndoGroup *newGroup, bool complex)
merge this group with an other
Definition: kateundo.cpp:347

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kate

Skip menu "kate"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kate by doxygen 1.9.4
This website is maintained by Timothy Pearson.