From 7ee2a70c18f899a4845621622241adc578b0400c Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 23 May 2018 15:41:59 +1000 Subject: Add definitions for bidirectional support to Platform.h and provide empty implementations for each platform. --- cocoa/PlatCocoa.h | 4 ++++ cocoa/PlatCocoa.mm | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'cocoa') diff --git a/cocoa/PlatCocoa.h b/cocoa/PlatCocoa.h index 940de83d5..bc80e9fce 100644 --- a/cocoa/PlatCocoa.h +++ b/cocoa/PlatCocoa.h @@ -98,6 +98,9 @@ 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; 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, @@ -116,6 +119,7 @@ public: void SetUnicodeMode(bool unicodeMode_) override; void SetDBCSMode(int codePage_) override; + void SetBidiR2L(bool bidiR2L_) override; }; // SurfaceImpl class } // Scintilla namespace diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 7d7eafb42..62a0ba5f0 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -819,6 +819,22 @@ 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(); +} + +//-------------------------------------------------------------------------------------------------- + void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) { FillRectangle(rc, back); @@ -1034,6 +1050,9 @@ void SurfaceImpl::SetDBCSMode(int codePage_) { codePage = codePage_; } +void SurfaceImpl::SetBidiR2L(bool) { +} + Surface *Surface::Allocate(int) { return new SurfaceImpl(); } -- cgit v1.2.3