geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
#include <PositionCache.h>
Public Types | |
enum | { wrapWidthInfinite = 0x7ffffff } |
enum class | ValidLevel { invalid , checkTextAndStyle , positions , lines } |
enum class | Scope { visibleOnly , includeEnd } |
Public Member Functions | |
LineLayout (int maxLineLength_) | |
LineLayout (const LineLayout &)=delete | |
LineLayout (LineLayout &&)=delete | |
void | operator= (const LineLayout &)=delete |
void | operator= (LineLayout &&)=delete |
virtual | ~LineLayout () |
void | Resize (int maxLineLength_) |
void | Free () noexcept |
void | Invalidate (ValidLevel validity_) noexcept |
int | LineStart (int line) const noexcept |
int | LineLength (int line) const noexcept |
int | LineLastVisible (int line, Scope scope) const noexcept |
Range | SubLineRange (int subLine, Scope scope) const noexcept |
bool | InLine (int offset, int line) const noexcept |
void | SetLineStart (int line, int start) |
void | SetBracesHighlight (Range rangeLine, const Sci::Position braces[], char bracesMatchStyle, int xHighlight, bool ignoreStyle) |
void | RestoreBracesHighlight (Range rangeLine, const Sci::Position braces[], bool ignoreStyle) |
int | FindBefore (XYPOSITION x, Range range) const noexcept |
int | FindPositionFromX (XYPOSITION x, Range range, bool charPosition) const noexcept |
Point | PointFromPosition (int posInLine, int lineHeight, PointEnd pe) const noexcept |
int | EndLineStyle () const noexcept |
Public Attributes | |
int | maxLineLength |
int | numCharsInLine |
int | numCharsBeforeEOL |
enum Scintilla::LineLayout::ValidLevel | validity |
int | xHighlightGuide |
bool | highlightColumn |
bool | containsCaret |
int | edgeColumn |
std::unique_ptr< char[]> | chars |
std::unique_ptr< unsigned char[]> | styles |
std::unique_ptr< XYPOSITION[]> | positions |
char | bracePreviousStyles [2] |
Range | hotspot |
int | widthLine |
int | lines |
XYPOSITION | wrapIndent |
Private Attributes | |
std::unique_ptr< int[]> | lineStarts |
int | lenLineStarts |
Sci::Line | lineNumber |
Drawing is only performed for maxLineLength characters on each line. More... | |
bool | inCache |
Friends | |
class | LineLayoutCache |
Definition at line 49 of file PositionCache.h.
anonymous enum |
Enumerator | |
---|---|
wrapWidthInfinite |
Definition at line 58 of file PositionCache.h.
|
strong |
Enumerator | |
---|---|
visibleOnly | |
includeEnd |
Definition at line 93 of file PositionCache.h.
|
strong |
Enumerator | |
---|---|
invalid | |
checkTextAndStyle | |
positions | |
lines |
Definition at line 63 of file PositionCache.h.
|
explicit |
Definition at line 50 of file PositionCache.cxx.
References Resize().
|
delete |
|
delete |
|
virtual |
Definition at line 70 of file PositionCache.cxx.
References Free().
|
noexcept |
Definition at line 243 of file PositionCache.cxx.
References numCharsBeforeEOL, and styles.
Referenced by Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawEOLAnnotationText(), Scintilla::EditView::DrawFoldDisplayText(), DrawTranslucentSelection(), Scintilla::EditView::LocationFromPosition(), Scintilla::EditView::SPositionFromLineX(), and Scintilla::EditView::SPositionFromLocation().
|
noexcept |
Definition at line 181 of file PositionCache.cxx.
Referenced by Scintilla::BreakFinder::BreakFinder().
|
noexcept |
Definition at line 197 of file PositionCache.cxx.
References pos.
Referenced by Scintilla::EditView::SPositionFromLineX(), and Scintilla::EditView::SPositionFromLocation().
|
noexcept |
Definition at line 86 of file PositionCache.cxx.
References chars, lineStarts, positions, and styles.
Referenced by Resize(), and ~LineLayout().
|
noexcept |
Definition at line 122 of file PositionCache.cxx.
References line, lines, and LineStart().
Referenced by Scintilla::EditView::DrawCarets().
|
noexcept |
Definition at line 93 of file PositionCache.cxx.
|
noexcept |
Definition at line 108 of file PositionCache.cxx.
|
noexcept |
|
noexcept |
Definition at line 98 of file PositionCache.cxx.
Referenced by Scintilla::EditView::DisplayFromPosition(), DrawBlockCaret(), Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), DrawIndicator(), DrawIndicators(), Scintilla::EditView::FormatRange(), Scintilla::Editor::LinesSplit(), and Scintilla::EditView::StartEndDisplayLine().
|
delete |
|
delete |
Definition at line 214 of file PositionCache.cxx.
References Scintilla::Range::end, lines, LineStart(), Scintilla::peLineEnd, Scintilla::peSubLineEnd, Scintilla::Range::start, Scintilla::Point::x, and Scintilla::Point::y.
Referenced by Scintilla::EditView::LocationFromPosition().
void LineLayout::Resize | ( | int | maxLineLength_ | ) |
Definition at line 74 of file PositionCache.cxx.
References chars, Free(), maxLineLength, positions, and styles.
Referenced by LineLayout().
void LineLayout::RestoreBracesHighlight | ( | Range | rangeLine, |
const Sci::Position | braces[], | ||
bool | ignoreStyle | ||
) |
Definition at line 165 of file PositionCache.cxx.
References bracePreviousStyles, Scintilla::Range::ContainsCharacter(), numCharsInLine, Scintilla::Range::start, styles, and xHighlightGuide.
Referenced by Scintilla::EditView::PaintText().
void LineLayout::SetBracesHighlight | ( | Range | rangeLine, |
const Sci::Position | braces[], | ||
char | bracesMatchStyle, | ||
int | xHighlight, | ||
bool | ignoreStyle | ||
) |
Definition at line 143 of file PositionCache.cxx.
References bracePreviousStyles, Scintilla::Range::ContainsCharacter(), Scintilla::Range::end, numCharsInLine, Scintilla::Range::start, styles, and xHighlightGuide.
Referenced by Scintilla::EditView::PaintText().
void LineLayout::SetLineStart | ( | int | line, |
int | start | ||
) |
Definition at line 127 of file PositionCache.cxx.
References lenLineStarts, line, and lineStarts.
Referenced by Scintilla::EditView::LayoutLine().
Definition at line 118 of file PositionCache.cxx.
References LineStart(), and scope.
Referenced by Scintilla::EditView::DrawLine(), Scintilla::EditView::RangeDisplayLine(), Scintilla::EditView::SPositionFromLineX(), and Scintilla::EditView::SPositionFromLocation().
|
friend |
Definition at line 51 of file PositionCache.h.
char Scintilla::LineLayout::bracePreviousStyles[2] |
Definition at line 71 of file PositionCache.h.
Referenced by RestoreBracesHighlight(), and SetBracesHighlight().
std::unique_ptr<char[]> Scintilla::LineLayout::chars |
Definition at line 68 of file PositionCache.h.
Referenced by Scintilla::EditView::DrawBackground(), DrawBlockCaret(), Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawForeground(), Free(), Scintilla::EditView::LayoutLine(), Scintilla::BreakFinder::Next(), and Resize().
bool Scintilla::LineLayout::containsCaret |
Definition at line 66 of file PositionCache.h.
Referenced by Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawEOLAnnotationText(), Scintilla::EditView::DrawFoldDisplayText(), Scintilla::EditView::DrawLine(), DrawTranslucentLineState(), DrawWrapIndentAndMarker(), Scintilla::EditView::FillLineRemainder(), Scintilla::EditView::FormatRange(), and Scintilla::EditView::PaintText().
int Scintilla::LineLayout::edgeColumn |
Definition at line 67 of file PositionCache.h.
Referenced by Scintilla::BreakFinder::BreakFinder(), and Scintilla::EditView::LayoutLine().
bool Scintilla::LineLayout::highlightColumn |
Definition at line 65 of file PositionCache.h.
Range Scintilla::LineLayout::hotspot |
Definition at line 74 of file PositionCache.h.
Referenced by Scintilla::EditView::DrawBackground(), Scintilla::EditView::DrawForeground(), and Scintilla::EditView::PaintText().
|
private |
Definition at line 56 of file PositionCache.h.
|
private |
Definition at line 53 of file PositionCache.h.
Referenced by SetLineStart().
|
private |
Drawing is only performed for maxLineLength characters on each line.
Definition at line 55 of file PositionCache.h.
Referenced by Scintilla::LineLayoutCache::Retrieve().
int Scintilla::LineLayout::lines |
Definition at line 78 of file PositionCache.h.
Referenced by Scintilla::EditView::DisplayFromPosition(), Scintilla::EditView::DrawAnnotation(), DrawCaretLineFramed(), Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawEOLAnnotationText(), Scintilla::EditView::DrawFoldDisplayText(), Scintilla::EditView::DrawLine(), DrawTranslucentSelection(), Scintilla::EditView::FillLineRemainder(), Scintilla::EditView::FormatRange(), Scintilla::EditView::LayoutLine(), Scintilla::Editor::LinesSplit(), Scintilla::EditView::RangeDisplayLine(), Scintilla::Editor::SetAnnotationHeights(), Scintilla::EditView::StartEndDisplayLine(), Scintilla::Editor::WrapCount(), and Scintilla::Editor::WrapOneLine().
|
private |
Definition at line 52 of file PositionCache.h.
Referenced by Free(), and SetLineStart().
int Scintilla::LineLayout::maxLineLength |
Definition at line 60 of file PositionCache.h.
Referenced by Scintilla::EditView::LayoutLine(), and Resize().
int Scintilla::LineLayout::numCharsBeforeEOL |
Definition at line 62 of file PositionCache.h.
Referenced by Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), EndLineStyle(), Scintilla::EditView::LayoutLine(), and Scintilla::EditView::StartEndDisplayLine().
int Scintilla::LineLayout::numCharsInLine |
Definition at line 61 of file PositionCache.h.
Referenced by Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawEOLAnnotationText(), Scintilla::EditView::DrawFoldDisplayText(), Scintilla::EditView::FillLineRemainder(), Scintilla::EditView::LayoutLine(), Scintilla::EditView::PaintText(), RestoreBracesHighlight(), SetBracesHighlight(), and Scintilla::EditView::SPositionFromLocation().
std::unique_ptr<XYPOSITION[]> Scintilla::LineLayout::positions |
Definition at line 70 of file PositionCache.h.
Referenced by Scintilla::EditView::DrawBackground(), DrawBlockCaret(), Scintilla::EditView::DrawCarets(), Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawEOLAnnotationText(), Scintilla::EditView::DrawFoldDisplayText(), Scintilla::EditView::DrawForeground(), Scintilla::EditView::DrawIndentGuidesOverEmpty(), DrawIndicator(), Scintilla::EditView::DrawLine(), DrawTranslucentSelection(), Free(), Scintilla::EditView::LayoutLine(), Scintilla::EditView::PaintText(), Resize(), Scintilla::EditView::SPositionFromLineX(), and Scintilla::EditView::SPositionFromLocation().
std::unique_ptr<unsigned char[]> Scintilla::LineLayout::styles |
Definition at line 69 of file PositionCache.h.
Referenced by Scintilla::BreakFinder::BreakFinder(), Scintilla::EditView::DrawBackground(), DrawBlockCaret(), Scintilla::EditView::DrawEOL(), Scintilla::EditView::DrawForeground(), EndLineStyle(), Scintilla::EditView::FillLineRemainder(), Free(), Scintilla::EditView::LayoutLine(), Scintilla::BreakFinder::Next(), Resize(), RestoreBracesHighlight(), and SetBracesHighlight().
enum Scintilla::LineLayout::ValidLevel Scintilla::LineLayout::validity |
Referenced by Scintilla::EditView::LayoutLine().
int Scintilla::LineLayout::widthLine |
Definition at line 77 of file PositionCache.h.
Referenced by Scintilla::EditView::LayoutLine().
XYPOSITION Scintilla::LineLayout::wrapIndent |
Definition at line 79 of file PositionCache.h.
Referenced by DrawBlockCaret(), DrawCaretLineFramed(), Scintilla::EditView::DrawCarets(), DrawEdgeLine(), Scintilla::EditView::DrawLine(), DrawTranslucentSelection(), DrawWrapIndentAndMarker(), Scintilla::EditView::LayoutLine(), and Scintilla::EditView::SPositionFromLocation().
int Scintilla::LineLayout::xHighlightGuide |
Definition at line 64 of file PositionCache.h.
Referenced by Scintilla::EditView::DrawForeground(), Scintilla::EditView::DrawIndentGuidesOverEmpty(), Scintilla::EditView::LayoutLine(), RestoreBracesHighlight(), and SetBracesHighlight().