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

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • kte5
foldinginterface.h
Go to the documentation of this file.
1 /* This file is part of the Kate project.
2  *
3  * Copyright (C) 2013 Christoph Cullmann <cullmann@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
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 KTEXTEDITOR_FOLDINGINTERFACE_H
22 #define KTEXTEDITOR_FOLDINGINTERFACE_H
23 
24 // #include "ktexteditor_export.h"
25 
26 #include <QFlags>
27 
28 namespace KTextEditor {
29 
30 class Range;
31 
38 class KTEXTEDITOR_EXPORT FoldingInterface
39 {
40  public:
45  FoldingInterface ();
46 
50  virtual ~FoldingInterface ();
51 
55  enum FoldingRangeFlag {
59  Persistent = 0x1,
60 
64  Folded = 0x2
65  };
66  Q_DECLARE_FLAGS(FoldingRangeFlags, FoldingRangeFlag);
67 
82  qint64 newFoldingRange (const KTextEditor::Range &range, FoldingRangeFlags flags = FoldingRangeFlags());
83 
89  virtual bool foldRange (qint64 id) = 0;
90 
98  virtual bool unfoldRange (qint64 id, bool remove = false) = 0;
99 
106  virtual QVector<QPair<qint64, FoldingRangeFlags> > foldingRangesStartingOnLine (int line) const = 0;
107 
113  virtual bool lineContainsStartFoldingRanges (int line) const = 0;
114 
120  virtual qint64 foldLine (int line) const = 0;
121 
127  virtual bool unfoldLine (int line) const = 0;
128 
146  virtual bool isLineVisible (int line, qint64 *foldedRangeId = 0) const = 0;
147 
153  virtual void ensureLineIsVisible (int line) = 0;
154 
160  virtual int visibleLines () const = 0;
161 
169  virtual int lineToVisibleLine (int line) const = 0;
170 
178  virtual int visibleLineToLine (int visibleLine) const = 0;
179 
184  public Q_SLOTS:
189  void clear ();
190 
191  Q_SIGNALS:
196  void foldingRangesChanged ();
197 };
198 
199 }
200 
201 Q_DECLARE_OPERATORS_FOR_FLAGS(KTextEditor::FoldingInterface::FoldingRangeFlags)
202 
203 #endif
KTextEditor::FoldingInterface::FoldingRangeFlag
FoldingRangeFlag
Folding state of a range.
Definition: foldinginterface.h:55
QVector
KTextEditor::FoldingInterface
KTextEditor interface for code folding of a KTextEditor::View.
Definition: foldinginterface.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • 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