edbee - Qt Editor Library
v0.11.1
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
c
e
f
i
k
l
m
o
p
q
r
s
t
u
v
Functions
Variables
Typedefs
Enumerations
Enumerator
c
e
f
i
k
l
m
o
p
r
s
t
u
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Variables
a
b
c
d
e
f
g
i
k
l
n
o
p
q
s
t
Enumerations
Enumerator
a
b
d
e
f
h
i
l
m
n
p
r
s
t
u
w
Related Symbols
Files
File List
File Members
All
_
a
d
e
g
o
p
q
s
t
v
Macros
_
a
d
e
g
o
p
q
s
t
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
lineoffsetvector.h
Go to the documentation of this file.
1
// edbee - Copyright (c) 2012-2025 by Rick Blommers and contributors
2
// SPDX-License-Identifier: MIT
3
4
#pragma once
5
6
#include "
edbee/exports.h
"
7
8
#include <QVector>
9
10
#include "
gapvector.h
"
11
12
13
namespace
edbee
{
14
15
class
TextBufferChange
;
16
17
18
26
class
EDBEE_EXPORT
LineOffsetVector
{
27
public
:
29
// struct LineChange {
30
// int line; ///< the first line that's going to be replaced
31
// int lineCount; ///< the number of lines that are replaced
32
// int newLineCount; ///< the number of lines added/removed
33
// int offsetDelta; ///< the change in offset
34
// QVector<int> newOffsets; ///< the new offsets
35
// };
36
37
38
LineOffsetVector
();
39
40
void
applyChange
(
TextBufferChange
change );
41
42
int
at
(
int
idx )
const
;
43
int
length
()
const
;
44
45
int
findLineFromOffset
(
int
offset );
46
47
int
offsetDelta
() {
return
offsetDelta_; }
48
int
offsetDeltaIndex
() {
return
offsetDeltaIndex_; }
49
50
void
appendOffset(
int
offset );
51
53
GapVector<int>
offsetList
() {
return
offsetList_; }
54
55
protected
:
56
int
searchOffsetIgnoringOffsetDelta(
int
offset,
int
org_start,
int
org_end );
57
58
void
moveDeltaToIndex(
int
index );
59
void
changeOffsetDelta(
int
index,
int
delta );
60
61
public
:
62
QString toUnitTestString();
63
void
initForUnitTesting(
int
offsetDelta,
int
offsetDeltaIndex, ... );
64
65
66
private
:
67
68
GapVector<int>
offsetList_;
69
int
offsetDelta_;
70
int
offsetDeltaIndex_;
71
72
73
friend
class
LineOffsetVectorTest
;
74
75
76
};
26
class
EDBEE_EXPORT
LineOffsetVector
{
…
};
77
78
}
// edbee
edbee::GapVector
This class is used to define a gap vector. A Gapvector is split in 2 parts. where the gap is moved to...
Definition
gapvector.h:19
edbee::LineOffsetVector::offsetDeltaIndex
int offsetDeltaIndex()
Definition
lineoffsetvector.h:48
edbee::LineOffsetVector::at
int at(int idx) const
this method returns the line offset at the given line offset
Definition
lineoffsetvector.cpp:83
edbee::LineOffsetVector::offsetList
GapVector< int > offsetList()
Definition
lineoffsetvector.h:53
edbee::LineOffsetVector::findLineFromOffset
int findLineFromOffset(int offset)
this method searches the line from the given offset
Definition
lineoffsetvector.cpp:99
edbee::LineOffsetVector::LineOffsetVector
LineOffsetVector()
a structure to describe the line change that happend
Definition
lineoffsetvector.cpp:13
edbee::LineOffsetVector::LineOffsetVectorTest
friend class LineOffsetVectorTest
Definition
lineoffsetvector.h:73
edbee::LineOffsetVector::offsetDelta
int offsetDelta()
Definition
lineoffsetvector.h:47
edbee::LineOffsetVector::length
int length() const
Definition
lineoffsetvector.cpp:92
edbee::LineOffsetVector::applyChange
void applyChange(TextBufferChange change)
Definition
lineoffsetvector.cpp:23
edbee::TextBufferChange
This clas represents a text buffer change and is used to pass around between events This is a sharedd...
Definition
textbuffer.h:45
exports.h
EDBEE_EXPORT
#define EDBEE_EXPORT
Definition
exports.h:15
gapvector.h
edbee
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition
commentcommand.cpp:20
edbee
util
lineoffsetvector.h
Generated on Wed Mar 5 2025 21:11:15 for edbee - Qt Editor Library by
1.13.2