• 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
  • vimode
katevirange.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries and the Kate part.
2  *
3  * Copyright (C) 2008 Erlend Hamberg <ehamberg@gmail.com>
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 KATE_VI_RANGE_INCLUDED
22 #define KATE_VI_RANGE_INCLUDED
23 
24 #include "katepartprivate_export.h"
25 #include <QtCore/QDebug>
26 
27 namespace ViMotion {
28  enum MotionType {
29  ExclusiveMotion, InclusiveMotion
30  };
31 }
32 
33 class KATEPART_TESTS_EXPORT KateViRange
34 {
35  public:
36  KateViRange( int slin, int scol, int elin, int ecol, ViMotion::MotionType mt );
37  KateViRange( int elin, int ecol, ViMotion::MotionType inc );
38  KateViRange();
39 
40  void normalize();
41  bool isInclusive() const { return motionType == ViMotion::InclusiveMotion; };
42 
43  int startLine, startColumn;
44  int endLine, endColumn;
45  ViMotion::MotionType motionType;
46  bool valid;
47  bool jump;
51  inline friend QDebug operator<< (QDebug s, const KateViRange& range) {
52  s << "[" << " (" << range.startLine << ", " << range.startColumn << ")" << " -> " << " (" << range.endLine << ", " << range.endColumn << ")" << "]" << " (" << (range.isInclusive() ? "Inclusive" : "Exclusive") << ") (jump: " << (range.jump ? "true" : "false") << ")";
53  return s;
54  }
55 
56  static KateViRange invalid() { KateViRange r; r.valid = false; return r; };
57 };
58 
59 #endif
KateViRange::endLine
int endLine
Definition: katevirange.h:44
KateViRange::jump
bool jump
Definition: katevirange.h:47
KateViRange::isInclusive
bool isInclusive() const
Definition: katevirange.h:41
KateViRange::invalid
static KateViRange invalid()
Definition: katevirange.h:56
KATEPART_TESTS_EXPORT
#define KATEPART_TESTS_EXPORT
Definition: katepartprivate_export.h:36
KateViRange::startColumn
int startColumn
Definition: katevirange.h:41
KateViRange
Definition: katevirange.h:33
KateViRange::endColumn
int endColumn
Definition: katevirange.h:44
KateViRange::motionType
ViMotion::MotionType motionType
Definition: katevirange.h:45
katepartprivate_export.h
ViMotion::MotionType
MotionType
Definition: katevirange.h:28
QDebug
ViMotion::ExclusiveMotion
Definition: katevirange.h:29
KateViRange::valid
bool valid
Definition: katevirange.h:46
ViMotion::InclusiveMotion
Definition: katevirange.h:29
KateViRange::startLine
int startLine
Definition: katevirange.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 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