diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-10 17:40:27 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-10 17:40:27 +1000 |
commit | 8497317864816c0f7a4b5baf3229c7a3336f55d8 (patch) | |
tree | e0ddd75f8457358ed89d73d86fb00e770eaf9d05 /src/ViewStyle.h | |
parent | e44364e1f30eb482cbf1502d6345a8d146c9be42 (diff) | |
download | scintilla-mirror-8497317864816c0f7a4b5baf3229c7a3336f55d8.tar.gz |
Change the way that selections and carets are drawn to use the element APIs.
Diffstat (limited to 'src/ViewStyle.h')
-rw-r--r-- | src/ViewStyle.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/ViewStyle.h b/src/ViewStyle.h index a9fe58131..6aab53f64 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -63,18 +63,11 @@ struct ForeBackColours { std::optional<ColourAlpha> back; }; +enum class Layer { base=0, over=10 }; + struct SelectionAppearance { - // Colours of main selection - ForeBackColours colours; - // Colours of additional (non-main) selections - ColourAlpha additionalForeground; - ColourAlpha additionalBackground; - // Background colour on X when not primary selection - ColourAlpha background2; - // Translucency. SC_ALPHA_NOALPHA: draw selection background beneath text - int alpha; - // Translucency of additional selections - int additionalAlpha; + // Whether to draw on base layer or over text + Layer layer; // Draw selection past line end characters up to right border bool eolFilled; }; @@ -93,10 +86,6 @@ struct CaretLineAppearance { }; struct CaretAppearance { - // Colour of caret - ColourAlpha colour; - // Colour of additional (non-main) carets - ColourAlpha additionalColour; // Line, block, over-strike bar ... int style; // Width in pixels @@ -245,6 +234,8 @@ public: std::optional<ColourAlpha> ElementColour(int element) const; bool ElementAllowsTranslucent(int element) const; void ResetElement(int element); + void SetElementRGB(int element, int rgb); + void SetElementAlpha(int element, int alpha); bool ElementIsSet(int element) const; bool SetElementBase(int element, ColourAlpha colour); |