aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/EditView.cxx
AgeCommit message (Collapse)AuthorFilesLines
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.
2021-03-19Add an explicit FlushDrawing method to Surface that should be called afterNeil1-0/+3
completing a bitmap. Currently only has a real implementation on Direct2D. Avoiding implicit flushes inside Copy and FillRectangle produced a 23% speed improvement on files with about 1 indentation guide per line as the drawing pipeline was being flushed for each indentation guide.
2021-03-19Implement PopClip to allow local clipping.Neil1-1/+6
2021-03-19Switch enum to enum class.Neil1-50/+51
2021-03-18Make Surface::Release and callers (where possible) noexcept.Neil1-1/+1
2021-03-18Use unique_ptr for Surface::Allocate to show transfer of ownership.Neil1-3/+3
2021-03-18std::optional is a basic vocabulary type that may be used widely so includeNeil1-0/+1
almost everywhere.
2021-03-18Move assert and debug trace functions into their own header Debugging.h.Neil1-0/+1
PLATFORM_ASSERT is used in data structure headers which led to including graphics and windowing APIs in data structure modules.
2021-03-17Change Font to an interface and stop using FontID. Fonts are shared andNeil1-15/+15
reference counted using std::shared_ptr. This optimizes memory and reduces potential for allocation bugs.
2021-03-17Extract geometry and colour definitions from Platform.h into src/Geometry.h.Neil1-0/+1
2021-02-02Bug [#2231]. Inconsistent behaviour in navigation on a line containing Japanesecshnik1-1/+1
symbols #247
2020-08-27Bug [#2197]. Avoid rewrap when checkTextAndStyle finds unchanged from cache.Zufu Liu1-5/+4
2020-08-26Bug [#2199]. Fixed bug where a hovered INDIC_TEXTFORE indicator was not applyinguhf71-3/+6
the hover colour to the whole range.
2020-08-21Reduce code and variable lifetime.Zufu Liu1-6/+3
2020-08-21Bug [#2197]. Fixed bug where layout caching was ineffective.Neil1-1/+2
2020-07-16Make WrapMode an enum class for more type safety.Neil1-4/+4
2020-07-16Rename validLevel to ValidLevel and make an enum class.Neil1-8/+8