• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • kde-4.14
  • applications
  • kate
  • ktexteditor
smartrangewatcher.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2003-2005 Hamish Rodda <rodda@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef KDELIBS_KTEXTEDITOR_SMARTRANGEWATCHER_H
20 #define KDELIBS_KTEXTEDITOR_SMARTRANGEWATCHER_H
21 
22 #include <ktexteditor/ktexteditor_export.h>
23 #include <QtCore/QObject>
24 
25 #include <ktexteditor/attribute.h>
26 
27 // TODO: Should SmartRangeWatcher become a base class for SmartRangeNotifier?
28 
29 namespace KTextEditor
30 {
31 class SmartRange;
32 class View;
33 
50 class KTEXTEDITOR_EXPORT SmartRangeWatcher
51 {
52  public:
56  SmartRangeWatcher();
57 
61  virtual ~SmartRangeWatcher();
62 
69  bool wantsDirectChanges() const;
70 
79  void setWantsDirectChanges(bool wantsDirectChanges);
80 
86  virtual void rangePositionChanged(SmartRange* range);
87 
93  virtual void rangeContentsChanged(SmartRange* range);
94 
104  virtual void rangeContentsChanged(SmartRange* range, SmartRange* mostSpecificChild);
105 
116  virtual void mouseEnteredRange(SmartRange* range, View* view);
117 
128  virtual void mouseExitedRange(SmartRange* range, View* view);
129 
140  virtual void caretEnteredRange(SmartRange* range, View* view);
141 
152  virtual void caretExitedRange(SmartRange* range, View* view);
153 
159  virtual void rangeEliminated(SmartRange* range);
160 
167  virtual void rangeDeleted(SmartRange* range);
168 
176  virtual void parentRangeChanged(SmartRange* range, SmartRange* newParent, SmartRange* oldParent);
177 
184  virtual void childRangeInserted(SmartRange* range, SmartRange* child);
185 
192  virtual void childRangeRemoved(SmartRange* range, SmartRange* child);
193 
202  virtual void rangeAttributeChanged(SmartRange* range, Attribute::Ptr currentAttribute, Attribute::Ptr previousAttribute);
203 
204  private:
205  bool m_wantDirectChanges;
206 };
207 
208 }
209 
210 #endif
211 
212 // kate: space-indent on; indent-width 2; replace-tabs on;
KTextEditor::SmartRange
A Range which is bound to a specific Document, and maintains its position.
Definition: smartrange.h:94
attribute.h
ktexteditor_export.h
KTextEditor::Attribute::Ptr
KSharedPtr< Attribute > Ptr
Definition: attribute.h:61
KTEXTEDITOR_EXPORT
#define KTEXTEDITOR_EXPORT
Definition: ktexteditor_export.h:35
KTextEditor::SmartRangeWatcher
A class which provides notifications of state changes to a SmartRange via virtual inheritance...
Definition: smartrangewatcher.h:50
KTextEditor::View
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:145
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTextEditor

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal