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. --- cocoa/PlatCocoa.h | 4 +--- cocoa/PlatCocoa.mm | 12 ++---------- 2 files changed, 3 insertions(+), 13 deletions(-) (limited to 'cocoa') diff --git a/cocoa/PlatCocoa.h b/cocoa/PlatCocoa.h index bc80e9fce..7a2c578e9 100644 --- a/cocoa/PlatCocoa.h +++ b/cocoa/PlatCocoa.h @@ -98,9 +98,7 @@ public: void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override; void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) override; void Copy(PRectangle rc, Scintilla::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 DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) override; void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 62a0ba5f0..aca57b81a 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -821,16 +821,8 @@ void SurfaceImpl::Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSou // Bidirectional text support for Arabic and Hebrew not currently implemented on Cocoa. -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 *screenLine) { + return {}; } //-------------------------------------------------------------------------------------------------- -- cgit v1.2.3