aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
AgeCommit message (Collapse)AuthorFilesLines
2021-10-08Feature [feature-requests:#1417] Use global IsControl instead of local function.Neil1-7/+1
2021-09-28Widen styleNumber in PositionCacheEntry from 8 to 16 bits to allow stylesNeil1-0/+1
larger than 255 to be represented. Before this, it may have been possible but extremely rare for a cache entry to wrongly match a styled lexeme and produce incorrect layout. Using uint16_t from cstdint instead of a bit field as tools perform more checking on that.
2021-09-14Convert to range for and extract colourMode.Zufu Liu1-14/+14
2021-09-12Make negative settings for extra ascent and descent safer by ensuring calculatedNeil1-1/+1
ascent and thus line height is at least 1 pixel. Allow 1 point font minimum instead of 2 as this may help with document maps. Document negative extra ascent and descent. Use XYPOSITION for ascent and descent for more coherent types and fewer casts but floor the values when retrieving from Surface so behaviour is unchanged.
2021-08-27Feature [feature-requests:#841] Remove hotspot from LineLayout and rely onZufu Liu1-4/+3
reference to model.
2021-08-24Remove line end white space.Neil1-2/+2
2021-08-24Feature [feature-requests:#841] SCI_SETCARETLINEHIGHLIGHTSUBLINE enablesZufu Liu1-8/+8
highlighting just the subline with the caret when wrapping is on.
2021-07-29Add SC_ELEMENT_HIDDEN_LINE to show where lines are hidden.Neil1-0/+11
2021-07-29Add SC_ELEMENT_FOLD_LINE to set the colour of fold lines.Neil1-2/+4
2021-07-29Fix display of fold lines when wrapped so they are only drawn once per line, notNeil1-6/+10
on each subline.
2021-07-29Use Side call to reduce code.Neil1-6/+2
2021-07-03Feature [feature-requests:#1408] Avoid sprintf for hexadecimal character blobs.Zufu Liu1-1/+8
2021-06-10Use the position cache when possibe for representations.Neil1-1/+12
2021-06-10Use string_view for PositionCache methods.Neil1-3/+4
Replace custom hash code with standard library hash. Drop standard methods that are not needed. Restrict representations to 200 bytes. Improve documentation.
2021-06-10Don't divide input text into segments in PositionCache::MeasureWidths as textNeil1-1/+1
should already have been segmented into reasonable lengths. The Document argument is no longer needed.
2021-06-03Add APIs for setting appearance (traditional blob or plain text) and colour ofNeil1-24/+52
representations and support setting a representation for the "\r\n" line end sequence.
2021-05-28Rename 'NO_FOCUS' to 'INACTIVE' to better match platform terms.Neil1-4/+4
2021-05-24Define C++ version of the Scintilla API in ScintillaTypes.h, ScintillaMessages.hNeil1-169/+172
and ScintillaStructures.h using scoped enumerations. Use these headers instead of Scintilla.h internally. External definitions go in the Scintilla namespace and internal definitio0ns in Scintilla::Internal.
2021-05-22Rename ColourAlpha to ColourRGBA to avoid clashes when a ColourAlpha typedefNeil1-47/+47
will be published in externally visible header.
2021-05-20Prefer Sci::invalidPosition to INVALID_POSITION as Scintilla.h will eventuallyNeil1-5/+5
not be visible to most code.
2021-05-20Add LevelIsHeader and LevelIsWhitespace as fold levels will become enum classNeil1-2/+2
later so not work well with '&'.
2021-05-19Bug [#2253]. Remove SC_ELEMENT_CARET_SECONDARY as it caused unexpected change toNeil1-3/+1
caret appearance for empty selection as empty selections can not be primary.
2021-05-14Implement SC_LAYER_UNDER_TEXT so that selections, caret lines, and content areaNeil1-15/+23
markers can be drawn translucently under text.
2021-05-14Add elements for hot spots SC_ELEMENT_HOT_SPOT_ACTIVE andNeil1-7/+7
SC_ELEMENT_HOT_SPOT_ACTIVE_BACK.
2021-05-14Add SC_ELEMENT_WHITE_SPACE_BACK to set the background colour of visibleNeil1-6/+7
whitespace.
2021-05-14Feature [feature-requests:#1402] Add SC_ELEMENT_WHITE_SPACE to set the colour ofYX Hao1-13/+10
visible whitespace including translucency.
2021-05-14Draw EOL annotation shapes under text.Neil1-1/+1
2021-05-14Add SCI_MARKERSETLAYER to define layer on which to draw content area markers.Neil1-11/+5
This replaces the use of SC_ALPHA_NOALPHA for markers.
2021-05-12Switch caret line background colour to SC_ELEMENT_CARET_LINE_BACK element andNeil1-27/+24
add SetCaretLineLayer. Older caret line APIs SCI_SETCARETLINEVISIBLE, SCI_SETCARETLINEBACK, SCI_SETCARETLINEBACKALPHA now discouraged.
2021-05-10Change the way that selections and carets are drawn to use the element APIs.Neil1-122/+116
2021-05-07Use shared_ptr for LineLayoutCache as it simpifies lifetime management.Neil1-25/+24
AutoLineLayout and other code no longer needed so removed.
2021-05-07Add lineNumber_ argument to LineLayout constructor so always knows which line itNeil1-10/+11
is for. Add accessor for line number and method to say whether compatible with a line number and number of characters. Since LineLayout can report its line number, remove line argument from EditView::LayoutLine which simplifies calling it.
2021-05-05Hoist selection text colour into SelectionForeground function and whetherNeil1-25/+34
there is a selection text colour into ViewStyle::SelectionTextDrawn. Pass EditModel to SelectionBackground so focus can be used in a future change. Simplify code, use const and better names. Prefer explicit iterator type to auto in cases where it makes little difference.
2021-05-01Improve selection drawing code. Use InSelection enum instead of int.Neil1-54/+65
Add Selection::RangeType and EditModel::LineEndInSelection to hoist code out of EditView. Replace SimpleAlphaRectangle with Surface::FillRectangleAligned when alpha known to not be SC_ALPHA_NOALPHA.
2021-04-27Rename CharacterSet and CharacterCategory modules in Scintilla to CharacterTypeNeil1-2/+2
and CharacterCategoryMap to avoid clashes with Lexilla when building an executable that includes both.
2021-04-26Avoid some warnings.Neil1-4/+5
2021-04-26Change std::optional value() to * as value() is not implemented in older macOSNeil Hodgson1-18/+18
releases. Using value() produces error: error: call to unavailable member function 'value': introduced in macOS 10.14
2021-04-26Extract related groups of fields out of ViewStyle into new structs.Neil1-58/+58
Size of ViewStyle makes it more difficult to understand and this helps a bit.
2021-04-25Feature [feature-requests:#1402]. Unify colour type with ColourAlpha.Neil1-83/+84
Change ColourDesired to ColourAlpha in styles. Remove ColourDesired.
2021-04-05Extract unnamed caching enum as LineLayoutCache::Cache and change to enum class.Neil1-1/+1
2021-04-05Change IndentView, WhiteSpaceVisibility, and TabDrawMode to enum class.Neil1-11/+11
2021-04-01Changed parameters for DrawTabArrow and DrawTabArrowFn to allow additionalNeil1-8/+7
traits in the future.
2021-03-29Add SCI_SETELEMENTCOLOUR and related APIs to change colours of visible elements.Neil1-0/+1
Implement SC_ELEMENT_LIST* to change colours of autocompletion lists.
2021-03-28Add shapes with curved and rounded ends to EOL annotations as EOLANNOTATION_*.Neil1-16/+73
2021-03-26Minor changes: const, constexpr, and noexcept.Neil1-2/+2
2021-03-22Use XYPOSITION for xStart parameter as it is only passed as XYPOSITION.Neil1-2/+2
2021-03-22Replace multiple calls when drawing boxes with Surface::RectangleFrame.Neil1-32/+9
Replace annotation boxing logic with calls to FillRectangle and Side. Switch to new AlphaRectangle signature. These will allow changing stroke width in future.
2021-03-21Update DrawTabArrow with new Surface calls so it can draw a thicker translucentNeil1-16/+25
arrow when an API is defined.
2021-03-20Replace FillRectangle with FillRectangleAligned as FillRectangle will stopNeil1-50/+49
aligning to pixel boundaries. Use Surface::SetMode as simpler and its predecessors will be removed.
2021-03-20Use Surface::AllocatePixMap instead of changing an existing surface withNeil1-26/+8
InitPixMap. Changed DropGraphics from releasing surfaces to deleting them. This simplifies code and the added cost of allocating a new Surface is small.