• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KTextEditor

rangefeedback.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2003-2005 Hamish Rodda <rodda@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef KDELIBS_KTEXTEDITOR_RANGEFEEDBACK_H
00020 #define KDELIBS_KTEXTEDITOR_RANGEFEEDBACK_H
00021 
00022 #include <ktexteditor/ktexteditor_export.h>
00023 #include <QtCore/QObject>
00024 
00025 #include <ktexteditor/attribute.h>
00026 
00027 // TODO: Should SmartRangeWatcher become a base class for SmartRangeNotifier?
00028 
00029 namespace KTextEditor
00030 {
00031 class SmartRange;
00032 class View;
00033 
00048 class KTEXTEDITOR_EXPORT SmartRangeNotifier : public QObject
00049 {
00050   Q_OBJECT
00051   friend class SmartRange;
00052 
00053   public:
00057     SmartRangeNotifier();
00058 
00065     bool wantsDirectChanges() const;
00066 
00075     void setWantsDirectChanges(bool wantsDirectChanges);
00076 
00077   Q_SIGNALS:
00083     void rangePositionChanged(KTextEditor::SmartRange* range);
00084 
00090     void rangeContentsChanged(KTextEditor::SmartRange* range);
00091 
00103     void rangeContentsChanged(KTextEditor::SmartRange* range, KTextEditor::SmartRange* mostSpecificChild);
00104 
00115     void mouseEnteredRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
00116 
00127     void mouseExitedRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
00128 
00139     void caretEnteredRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
00140 
00151     void caretExitedRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
00152 
00158     void rangeEliminated(KTextEditor::SmartRange* range);
00159 
00166     void rangeDeleted(KTextEditor::SmartRange* range);
00167 
00175     void parentRangeChanged(KTextEditor::SmartRange* range, KTextEditor::SmartRange* newParent, KTextEditor::SmartRange* oldParent);
00176 
00183     void childRangeInserted(KTextEditor::SmartRange* range, KTextEditor::SmartRange* child);
00184 
00191     void childRangeRemoved(KTextEditor::SmartRange* range, KTextEditor::SmartRange* child);
00192 
00201     void rangeAttributeChanged(KTextEditor::SmartRange* range, KTextEditor::Attribute::Ptr currentAttribute, KTextEditor::Attribute::Ptr previousAttribute);
00202 
00203   private:
00204     bool m_wantDirectChanges;
00205 };
00206 
00223 class KTEXTEDITOR_EXPORT SmartRangeWatcher
00224 {
00225   public:
00229     SmartRangeWatcher();
00230 
00234     virtual ~SmartRangeWatcher();
00235 
00242     bool wantsDirectChanges() const;
00243 
00252     void setWantsDirectChanges(bool wantsDirectChanges);
00253 
00259     virtual void rangePositionChanged(SmartRange* range);
00260 
00266     virtual void rangeContentsChanged(SmartRange* range);
00267 
00277     virtual void rangeContentsChanged(SmartRange* range, SmartRange* mostSpecificChild);
00278 
00289     virtual void mouseEnteredRange(SmartRange* range, View* view);
00290 
00301     virtual void mouseExitedRange(SmartRange* range, View* view);
00302 
00313     virtual void caretEnteredRange(SmartRange* range, View* view);
00314 
00325     virtual void caretExitedRange(SmartRange* range, View* view);
00326 
00332     virtual void rangeEliminated(SmartRange* range);
00333 
00340     virtual void rangeDeleted(SmartRange* range);
00341 
00349     virtual void parentRangeChanged(SmartRange* range, SmartRange* newParent, SmartRange* oldParent);
00350 
00357     virtual void childRangeInserted(SmartRange* range, SmartRange* child);
00358 
00365     virtual void childRangeRemoved(SmartRange* range, SmartRange* child);
00366 
00375     virtual void rangeAttributeChanged(SmartRange* range, Attribute::Ptr currentAttribute, Attribute::Ptr previousAttribute);
00376 
00377   private:
00378     bool m_wantDirectChanges;
00379 };
00380 
00381 }
00382 
00383 #endif
00384 
00385 // kate: space-indent on; indent-width 2; replace-tabs on;

KTextEditor

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal