Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
kate
kate
kate
part
katelinerange.h
1
/* This file is part of the KDE libraries
2
Copyright (C) 2002,2003 Hamish Rodda <rodda@kde.org>
3
Copyright (C) 2003 Anakim Border <aborder@sources.sourceforge.net>
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 version 2 as published by the Free Software Foundation.
8
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Library General Public License for more details.
13
14
You should have received a copy of the GNU Library General Public License
15
along with this library; see the file COPYING.LIB. If not, write to
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
Boston, MA 02110-1301, USA.
18
*/
19
20
#ifndef _KATE_LINERANGE_H_
21
#define _KATE_LINERANGE_H_
22
23
#include "katecursor.h"
24
25
class
KateLineRange
26
{
27
public
:
28
KateLineRange();
29
virtual
~KateLineRange ();
30
31
void
clear
();
32
33
inline
bool
includesCursor (
const
KateTextCursor
& realCursor)
const
34
{
35
return
realCursor.line() == line && realCursor.col() >= startCol && (!wrap || realCursor.col() < endCol);
36
}
37
38
inline
int
xOffset ()
const
39
{
40
return
startX ? shiftX : 0;
41
}
42
43
friend
bool
operator> (
const
KateLineRange& r,
const
KateTextCursor
& c);
44
friend
bool
operator>= (
const
KateLineRange& r,
const
KateTextCursor
& c);
45
friend
bool
operator< (
const
KateLineRange& r,
const
KateTextCursor
& c);
46
friend
bool
operator<= (
const
KateLineRange& r,
const
KateTextCursor
& c);
47
48
int
line;
49
int
virtualLine;
50
int
startCol;
51
int
endCol;
52
int
startX;
53
int
endX;
54
55
bool
dirty;
56
int
viewLine;
57
bool
wrap;
58
bool
startsInvisibleBlock;
59
60
// This variable is used as follows:
61
// non-dynamic-wrapping mode: unused
62
// dynamic wrapping mode:
63
// first viewLine of a line: the X position of the first non-whitespace char
64
// subsequent viewLines: the X offset from the left of the display.
65
//
66
// this is used to provide a dynamic-wrapping-retains-indent feature.
67
int
shiftX;
68
};
69
70
#endif
KateTextCursor
Simple cursor class with no document pointer.
Definition:
katecursor.h:34
KStdAction::clear
TDEAction * clear(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)
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