Class NSLayoutManager

All Implemented Interfaces:
NSCoding, NSObjectProtocol, NSSecureCoding, ObjCProtocol

public class NSLayoutManager
extends NSObject
implements NSSecureCoding
  • Constructor Details

    • NSLayoutManager

      public NSLayoutManager()
    • NSLayoutManager

      protected NSLayoutManager​(NSObject.Handle h, long handle)
    • NSLayoutManager

      protected NSLayoutManager​(NSObject.SkipInit skipInit)
    • NSLayoutManager

      public NSLayoutManager​(NSCoder coder)
  • Method Details

    • getTextStorage

      public NSTextStorage getTextStorage()
    • setTextStorage

      public void setTextStorage​(NSTextStorage v)
    • getTextContainers

      public NSArray<NSTextContainer> getTextContainers()
    • getDelegate

      public NSLayoutManagerDelegate getDelegate()
    • setDelegate

      public void setDelegate​(NSLayoutManagerDelegate v)
    • showsInvisibleCharacters

      public boolean showsInvisibleCharacters()
    • setShowsInvisibleCharacters

      public void setShowsInvisibleCharacters​(boolean v)
    • showsControlCharacters

      public boolean showsControlCharacters()
    • setShowsControlCharacters

      public void setShowsControlCharacters​(boolean v)
    • usesFontLeading

      public boolean usesFontLeading()
    • setUsesFontLeading

      public void setUsesFontLeading​(boolean v)
    • allowsNonContiguousLayout

      public boolean allowsNonContiguousLayout()
    • setAllowsNonContiguousLayout

      public void setAllowsNonContiguousLayout​(boolean v)
    • hasNonContiguousLayout

      public boolean hasNonContiguousLayout()
    • isLimitsLayoutForSuspiciousContents

      public boolean isLimitsLayoutForSuspiciousContents()
      Since:
      Available in iOS 12.0 and later.
    • setLimitsLayoutForSuspiciousContents

      public void setLimitsLayoutForSuspiciousContents​(boolean v)
      Since:
      Available in iOS 12.0 and later.
    • usesDefaultHyphenation

      public boolean usesDefaultHyphenation()
      Since:
      Available in iOS 13.0 and later.
    • setUsesDefaultHyphenation

      public void setUsesDefaultHyphenation​(boolean v)
      Since:
      Available in iOS 13.0 and later.
    • getNumberOfGlyphs

      public long getNumberOfGlyphs()
    • getExtraLineFragmentRect

      public CGRect getExtraLineFragmentRect()
    • getExtraLineFragmentUsedRect

      public CGRect getExtraLineFragmentUsedRect()
    • getExtraLineFragmentTextContainer

      public NSTextContainer getExtraLineFragmentTextContainer()
    • getHyphenationFactor

      @Deprecated public double getHyphenationFactor()
      Deprecated.
      Deprecated in iOS 13.0. Please use usesDefaultHyphenation or -[NSParagraphStyle hyphenationFactor] instead.
    • setHyphenationFactor

      @Deprecated public void setHyphenationFactor​(double v)
      Deprecated.
      Deprecated in iOS 13.0. Please use usesDefaultHyphenation or -[NSParagraphStyle hyphenationFactor] instead.
    • supportsSecureCoding

      public static boolean supportsSecureCoding()
    • showCGGlyphs

      public void showCGGlyphs​(short[] glyphs, CGPoint[] positions, UIFont font, CGAffineTransform textMatrix, NSDictionary<NSString,​?> attributes, CGContext graphicsContext)
    • fillBackground

      public void fillBackground​(CGRect[] rectArray, NSRange charRange, UIColor color)
    • init

      protected long init​(NSCoder coder)
    • addTextContainer

      public void addTextContainer​(NSTextContainer container)
    • insertTextContainer

      public void insertTextContainer​(NSTextContainer container, long index)
    • removeTextContainer

      public void removeTextContainer​(long index)
    • textContainerChangedGeometry

      public void textContainerChangedGeometry​(NSTextContainer container)
    • invalidateGlyphs

      public void invalidateGlyphs​(NSRange charRange, long delta, NSRange actualCharRange)
    • invalidateLayout

      public void invalidateLayout​(NSRange charRange, NSRange actualCharRange)
    • invalidateDisplayForCharacterRange

      public void invalidateDisplayForCharacterRange​(NSRange charRange)
    • invalidateDisplayForGlyphRange

      public void invalidateDisplayForGlyphRange​(NSRange glyphRange)
    • processEditing

      public void processEditing​(NSTextStorage textStorage, NSTextStorageEditActions editMask, NSRange newCharRange, long delta, NSRange invalidatedCharRange)
    • ensureGlyphsForCharacterRange

      public void ensureGlyphsForCharacterRange​(NSRange charRange)
    • ensureGlyphsForGlyphRange

      public void ensureGlyphsForGlyphRange​(NSRange glyphRange)
    • ensureLayoutForCharacterRange

      public void ensureLayoutForCharacterRange​(NSRange charRange)
    • ensureLayoutForGlyphRange

      public void ensureLayoutForGlyphRange​(NSRange glyphRange)
    • ensureLayoutForTextContainer

      public void ensureLayoutForTextContainer​(NSTextContainer container)
    • ensureLayoutForBoundingRect

      public void ensureLayoutForBoundingRect​(CGRect bounds, NSTextContainer container)
    • setGlyphs

      public void setGlyphs​(ShortPtr glyphs, MachineSizedSIntPtr props, MachineSizedUIntPtr charIndexes, UIFont aFont, NSRange glyphRange)
    • isValidGlyphIndex

      public boolean isValidGlyphIndex​(long glyphIndex)
    • getPropertyForGlyph

      public NSGlyphProperty getPropertyForGlyph​(long glyphIndex)
    • getCharacterIndexForGlyph

      public long getCharacterIndexForGlyph​(long glyphIndex)
    • getGlyphIndexForCharacter

      public long getGlyphIndexForCharacter​(long charIndex)
    • getGlyphs

      public long getGlyphs​(NSRange glyphRange, ShortPtr glyphBuffer, MachineSizedSIntPtr props, MachineSizedUIntPtr charIndexBuffer, BytePtr bidiLevelBuffer)
    • setTextContainer

      public void setTextContainer​(NSTextContainer container, NSRange glyphRange)
    • setLineFragmentRect

      public void setLineFragmentRect​(CGRect fragmentRect, NSRange glyphRange, CGRect usedRect)
    • setExtraLineFragmentRect

      public void setExtraLineFragmentRect​(CGRect fragmentRect, CGRect usedRect, NSTextContainer container)
    • setLocation

      public void setLocation​(CGPoint location, NSRange glyphRange)
    • setNotShownAttribute

      public void setNotShownAttribute​(boolean flag, long glyphIndex)
    • setDrawsOutsideLineFragment

      public void setDrawsOutsideLineFragment​(boolean flag, long glyphIndex)
    • setAttachmentSize

      public void setAttachmentSize​(CGSize attachmentSize, NSRange glyphRange)
    • getFirstUnlaidCharacterIndex

      public void getFirstUnlaidCharacterIndex​(MachineSizedUIntPtr charIndex, MachineSizedUIntPtr glyphIndex)
    • firstUnlaidCharacterIndex

      public long firstUnlaidCharacterIndex()
    • firstUnlaidGlyphIndex

      public long firstUnlaidGlyphIndex()
    • getTextContainer

      public NSTextContainer getTextContainer​(long glyphIndex, NSRange effectiveGlyphRange)
    • getTextContainer

      public NSTextContainer getTextContainer​(long glyphIndex, NSRange effectiveGlyphRange, boolean withoutAdditionalLayout)
      Since:
      Available in iOS 9.0 and later.
    • getUsedRectForTextContainer

      public CGRect getUsedRectForTextContainer​(NSTextContainer container)
    • getLineFragmentRect

      public CGRect getLineFragmentRect​(long glyphIndex, NSRange effectiveGlyphRange)
    • getLineFragmentRect

      public CGRect getLineFragmentRect​(long glyphIndex, NSRange effectiveGlyphRange, boolean withoutAdditionalLayout)
      Since:
      Available in iOS 9.0 and later.
    • getLineFragmentUsedRect

      public CGRect getLineFragmentUsedRect​(long glyphIndex, NSRange effectiveGlyphRange)
    • getLineFragmentUsedRect

      public CGRect getLineFragmentUsedRect​(long glyphIndex, NSRange effectiveGlyphRange, boolean withoutAdditionalLayout)
      Since:
      Available in iOS 9.0 and later.
    • getLocation

      public CGPoint getLocation​(long glyphIndex)
    • getNotShownAttribute

      public boolean getNotShownAttribute​(long glyphIndex)
    • getDrawsOutsideLineFragment

      public boolean getDrawsOutsideLineFragment​(long glyphIndex)
    • getAttachmentSize

      public CGSize getAttachmentSize​(long glyphIndex)
    • getTruncatedGlyphRangeInLineFragment

      public NSRange getTruncatedGlyphRangeInLineFragment​(long glyphIndex)
    • getGlyphRangeForCharacterRange

      public NSRange getGlyphRangeForCharacterRange​(NSRange charRange, NSRange actualCharRange)
    • getCharacterRangeForGlyphRange

      public NSRange getCharacterRangeForGlyphRange​(NSRange glyphRange, NSRange actualGlyphRange)
    • glyphRangeForTextContainer

      public NSRange glyphRangeForTextContainer​(NSTextContainer container)
    • getRangeOfNominallySpacedGlyphsContainingIndex

      public NSRange getRangeOfNominallySpacedGlyphsContainingIndex​(long glyphIndex)
    • getBoundingRectForGlyphRange

      public CGRect getBoundingRectForGlyphRange​(NSRange glyphRange, NSTextContainer container)
    • getGlyphRangeForBoundingRect

      public NSRange getGlyphRangeForBoundingRect​(CGRect bounds, NSTextContainer container)
    • getGlyphRangeForBoundingRectWithoutAdditionalLayout

      public NSRange getGlyphRangeForBoundingRectWithoutAdditionalLayout​(CGRect bounds, NSTextContainer container)
    • getSlyphIndexForPoint

      public long getSlyphIndexForPoint​(CGPoint point, NSTextContainer container, MachineSizedFloatPtr partialFraction)
    • getSlyphIndexForPoint

      public long getSlyphIndexForPoint​(CGPoint point, NSTextContainer container)
    • getFractionOfDistanceThroughGlyphForPoint

      public double getFractionOfDistanceThroughGlyphForPoint​(CGPoint point, NSTextContainer container)
    • getCharacterIndexForPoint

      public long getCharacterIndexForPoint​(CGPoint point, NSTextContainer container, MachineSizedFloatPtr partialFraction)
    • getLineFragmentInsertionPoints

      public long getLineFragmentInsertionPoints​(long charIndex, boolean aFlag, boolean dFlag, MachineSizedFloatPtr positions, MachineSizedUIntPtr charIndexes)
    • enumerateLineFragments

      public void enumerateLineFragments​(NSRange glyphRange, VoidBlock5<CGRect,​CGRect,​NSTextContainer,​NSRange,​BooleanPtr> block)
    • enumerateEnclosingRects

      public void enumerateEnclosingRects​(NSRange glyphRange, NSRange selectedRange, NSTextContainer textContainer, VoidBlock2<CGRect,​BooleanPtr> block)
    • drawBackground

      public void drawBackground​(NSRange glyphsToShow, CGPoint origin)
    • drawGlyphs

      public void drawGlyphs​(NSRange glyphsToShow, CGPoint origin)
    • showCGGlyphs

      public void showCGGlyphs​(ShortPtr glyphs, CGPoint positions, long glyphCount, UIFont font, CGAffineTransform textMatrix, NSDictionary<NSString,​?> attributes, CGContext CGContext)
      Since:
      Available in iOS 13.0 and later.
    • fillBackground

      protected void fillBackground​(CGRect rectArray, long rectCount, NSRange charRange, UIColor color)
    • drawUnderline

      public void drawUnderline​(NSRange glyphRange, NSUnderlineStyle underlineVal, double baselineOffset, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin)
    • underline

      public void underline​(NSRange glyphRange, NSUnderlineStyle underlineVal, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin)
    • drawStrikethrough

      public void drawStrikethrough​(NSRange glyphRange, NSUnderlineStyle strikethroughVal, double baselineOffset, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin)
    • strikethrough

      public void strikethrough​(NSRange glyphRange, NSUnderlineStyle strikethroughVal, CGRect lineRect, NSRange lineGlyphRange, CGPoint containerOrigin)
    • getGlyph

      public short getGlyph​(long glyphIndex, BooleanPtr isValidIndex)
    • getGlyph

      public short getGlyph​(long glyphIndex)
    • showCGGlyphs

      @Deprecated protected void showCGGlyphs​(long glyphs, CGPoint positions, long glyphCount, UIFont font, CGAffineTransform textMatrix, NSDictionary<NSString,​?> attributes, CGContext graphicsContext)
      Deprecated.
      Deprecated in iOS 13.0. Use showCGGlyphs:positions:count:font:textMatrix:attributes:inContext:
    • encode

      public void encode​(NSCoder coder)
      Specified by:
      encode in interface NSCoding