MCPcopy Create free account
hub / github.com/SpartanJ/eepp / getVisibleLineRange

Method getVisibleLineRange

src/eepp/ui/uicodeeditor.cpp:2414–2422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2412}
2413
2414DocumentViewLineRange UICodeEditor::getVisibleLineRange() const {
2415 Float lineHeight = getLineHeight();
2416 VisibleIndex minLine =
2417 static_cast<VisibleIndex>( eemax( 0.f, eefloor( mScroll.y / lineHeight ) ) );
2418 VisibleIndex maxLine = static_cast<VisibleIndex>(
2419 eemin( eemax( getTotalVisibleLines() - 1.f, 0.f ),
2420 eefloor( ( editorHeight() + mScroll.y ) / lineHeight ) + 1 ) );
2421 return { minLine, maxLine };
2422}
2423
2424TextRange UICodeEditor::getVisibleRange() const {
2425 auto visibleLineRange = getDocumentLineRange();

Callers 13

drawAfterLineTextMethod · 0.45
getTextPositionOffsetMethod · 0.45
moveToLineOffsetMethod · 0.45
moveToStartOfLineMethod · 0.45
moveToEndOfLineMethod · 0.45
moveToStartOfContentMethod · 0.45
selectToStartOfLineMethod · 0.45
selectToEndOfLineMethod · 0.45
jumpLinesUpMethod · 0.45
drawMatchingBracketsMethod · 0.45

Calls 2

eemaxFunction · 0.85
eeminFunction · 0.85

Tested by

no test coverage detected