diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-23 15:41:59 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-23 15:41:59 +1000 |
commit | 7ee2a70c18f899a4845621622241adc578b0400c (patch) | |
tree | 2f4f7b7a5869523ec8baae1751e39c0f1f7851b3 /include/Platform.h | |
parent | 05845e8e5d1d934a16550f33099be89d189bfcad (diff) | |
download | scintilla-mirror-7ee2a70c18f899a4845621622241adc578b0400c.tar.gz |
Add definitions for bidirectional support to Platform.h and provide empty
implementations for each platform.
Diffstat (limited to 'include/Platform.h')
-rw-r--r-- | include/Platform.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/Platform.h b/include/Platform.h index e83b8e5e5..9606ecab4 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -317,6 +317,24 @@ public: friend class SurfaceImpl; }; +class IScreenLine { +public: + virtual std::string_view Text() const = 0; + virtual size_t Length() const = 0; + virtual size_t RepresentationCount() const = 0; + virtual XYPOSITION Width() const = 0; + virtual XYPOSITION Height() const = 0; + virtual XYPOSITION TabWidth() const = 0; + virtual XYPOSITION TabWidthMinimumPixels() const = 0; + virtual const Font *FontOfPosition(size_t position) const = 0; + virtual XYPOSITION RepresentationWidth(size_t position) const = 0; +}; + +struct Interval { + XYPOSITION left; + XYPOSITION right; +}; + /** * A surface abstracts a place to draw. */ @@ -354,6 +372,10 @@ public: virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0; virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; + virtual size_t PositionFromX(const IScreenLine *screenLine, XYPOSITION xDistance, bool charPosition)=0; + virtual XYPOSITION XFromPosition(const IScreenLine *screenLine, size_t caretPosition)=0; + virtual std::vector<Interval> FindRangeIntervals(const IScreenLine *screenLine, size_t start, size_t end)=0; + virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) = 0; virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) = 0; virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore) = 0; @@ -370,6 +392,7 @@ public: virtual void SetUnicodeMode(bool unicodeMode_)=0; virtual void SetDBCSMode(int codePage)=0; + virtual void SetBidiR2L(bool bidiR2L_)=0; }; /** |