From 2e003602f29edff5d38137472edee82fab9f5376 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 2 Jun 2018 08:37:47 +1000 Subject: Define IScreenLineLayout as the main interface for implementing bidirectional features by platform code. Implement IScreenLineLayout for Win32 / DirectWrite as ScreenLineLayout. --- gtk/PlatGTK.cxx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index ce0863462..1fbdf4835 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -166,9 +166,7 @@ public: void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) override; void Copy(PRectangle rc, Point from, Surface &surfaceSource) override; - size_t PositionFromX(const IScreenLine *screenLine, XYPOSITION xDistance, bool charPosition) override; - XYPOSITION XFromPosition(const IScreenLine *screenLine, size_t caretPosition) override; - std::vector FindRangeIntervals(const IScreenLine *screenLine, size_t start, size_t end) override; + std::unique_ptr Layout(const IScreenLine *screenLine) override; void DrawTextBase(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore); void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) override; @@ -630,16 +628,8 @@ void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) { } } -size_t SurfaceImpl::PositionFromX(const IScreenLine *, XYPOSITION, bool) { - return 0; -} - -XYPOSITION SurfaceImpl::XFromPosition(const IScreenLine *, size_t) { - return 0; -} - -std::vector SurfaceImpl::FindRangeIntervals(const IScreenLine *, size_t, size_t) { - return std::vector(); +std::unique_ptr SurfaceImpl::Layout(const IScreenLine *) { + return {}; } std::string UTF8FromLatin1(std::string_view text) { -- cgit v1.2.3