Package apple.uikit.protocol
Interface NSLayoutManagerDelegate
-
public interface NSLayoutManagerDelegate
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default CGRectlayoutManagerBoundingBoxForControlGlyphAtIndexForTextContainerProposedLineFragmentGlyphPositionCharacterIndex(@NotNull NSLayoutManager layoutManager, long glyphIndex, @NotNull NSTextContainer textContainer, CGRect proposedRect, CGPoint glyphPosition, long charIndex)Invoked for resolving the glyph metrics for NSControlCharacterWhitespaceAction control character.default voidlayoutManagerDidCompleteLayoutForTextContainerAtEnd(@NotNull NSLayoutManager layoutManager, @Nullable NSTextContainer textContainer, boolean layoutFinishedFlag)This is sent whenever a container has been filled.default voidlayoutManagerDidInvalidateLayout(@NotNull NSLayoutManager sender)Layout processing *********************** This is sent whenever layout or glyphs become invalidated in a layout manager which previously had all layout complete.default doublelayoutManagerLineSpacingAfterGlyphAtIndexWithProposedLineFragmentRect(@NotNull NSLayoutManager layoutManager, long glyphIndex, CGRect rect)Returns the spacing after the line ending with glyphIndex.default doublelayoutManagerParagraphSpacingAfterGlyphAtIndexWithProposedLineFragmentRect(@NotNull NSLayoutManager layoutManager, long glyphIndex, CGRect rect)Returns the paragraph spacing after the line ending with glyphIndex.default doublelayoutManagerParagraphSpacingBeforeGlyphAtIndexWithProposedLineFragmentRect(@NotNull NSLayoutManager layoutManager, long glyphIndex, CGRect rect)Returns the paragraph spacing before the line starting with glyphIndex.default booleanlayoutManagerShouldBreakLineByHyphenatingBeforeCharacterAtIndex(@NotNull NSLayoutManager layoutManager, long charIndex)Invoked while determining the hyphenation point.default booleanlayoutManagerShouldBreakLineByWordBeforeCharacterAtIndex(@NotNull NSLayoutManager layoutManager, long charIndex)Invoked while determining the soft line break point.default longlayoutManagerShouldGenerateGlyphsPropertiesCharacterIndexesFontForGlyphRange(@NotNull NSLayoutManager layoutManager, @NotNull org.moe.natj.general.ptr.ConstCharPtr glyphs, @NotNull org.moe.natj.general.ptr.ConstNIntPtr props, @NotNull org.moe.natj.general.ptr.ConstNUIntPtr charIndexes, @NotNull UIFont aFont, NSRange glyphRange)Glyph generation *********************** This is sent whenever layoutManager is about to store the initial glyph information via -setGlyphs:properties:characterIndexes:forGlyphRange:.default booleanlayoutManagerShouldSetLineFragmentRectLineFragmentUsedRectBaselineOffsetInTextContainerForGlyphRange(@NotNull NSLayoutManager layoutManager, @NotNull CGRect lineFragmentRect, @NotNull CGRect lineFragmentUsedRect, @NotNull org.moe.natj.general.ptr.NFloatPtr baselineOffset, @NotNull NSTextContainer textContainer, NSRange glyphRange)Allows NSLayoutManagerDelegate to customize the line fragment geometry before committing to the layout cache.default longlayoutManagerShouldUseActionForControlCharacterAtIndex(@NotNull NSLayoutManager layoutManager, long action, long charIndex)Returns the control character action for the control character at charIndex.default voidlayoutManagerTextContainerDidChangeGeometryFromSize(@NotNull NSLayoutManager layoutManager, @NotNull NSTextContainer textContainer, CGSize oldSize)This is sent right before layoutManager invalidates the layout due to textContainer changing geometry.
-
-
-
Method Detail
-
layoutManagerBoundingBoxForControlGlyphAtIndexForTextContainerProposedLineFragmentGlyphPositionCharacterIndex
default CGRect layoutManagerBoundingBoxForControlGlyphAtIndexForTextContainerProposedLineFragmentGlyphPositionCharacterIndex(@NotNull @NotNull NSLayoutManager layoutManager, long glyphIndex, @NotNull @NotNull NSTextContainer textContainer, CGRect proposedRect, CGPoint glyphPosition, long charIndex)
Invoked for resolving the glyph metrics for NSControlCharacterWhitespaceAction control character. API-Since: 7.0
-
layoutManagerDidCompleteLayoutForTextContainerAtEnd
default void layoutManagerDidCompleteLayoutForTextContainerAtEnd(@NotNull @NotNull NSLayoutManager layoutManager, @Nullable @Nullable NSTextContainer textContainer, boolean layoutFinishedFlag)This is sent whenever a container has been filled. This method can be useful for paginating. The textContainer might be nil if we have completed all layout and not all of it fit into the existing containers. The atEnd flag indicates whether all layout is complete. API-Since: 7.0
-
layoutManagerLineSpacingAfterGlyphAtIndexWithProposedLineFragmentRect
default double layoutManagerLineSpacingAfterGlyphAtIndexWithProposedLineFragmentRect(@NotNull @NotNull NSLayoutManager layoutManager, long glyphIndex, CGRect rect)Returns the spacing after the line ending with glyphIndex. API-Since: 7.0
-
layoutManagerParagraphSpacingAfterGlyphAtIndexWithProposedLineFragmentRect
default double layoutManagerParagraphSpacingAfterGlyphAtIndexWithProposedLineFragmentRect(@NotNull @NotNull NSLayoutManager layoutManager, long glyphIndex, CGRect rect)Returns the paragraph spacing after the line ending with glyphIndex. API-Since: 7.0
-
layoutManagerParagraphSpacingBeforeGlyphAtIndexWithProposedLineFragmentRect
default double layoutManagerParagraphSpacingBeforeGlyphAtIndexWithProposedLineFragmentRect(@NotNull @NotNull NSLayoutManager layoutManager, long glyphIndex, CGRect rect)Returns the paragraph spacing before the line starting with glyphIndex. API-Since: 7.0
-
layoutManagerShouldBreakLineByHyphenatingBeforeCharacterAtIndex
default boolean layoutManagerShouldBreakLineByHyphenatingBeforeCharacterAtIndex(@NotNull @NotNull NSLayoutManager layoutManager, long charIndex)Invoked while determining the hyphenation point. When NO, NSLayoutManager tries to find the next hyphenation opportunity before charIndex API-Since: 7.0
-
layoutManagerShouldBreakLineByWordBeforeCharacterAtIndex
default boolean layoutManagerShouldBreakLineByWordBeforeCharacterAtIndex(@NotNull @NotNull NSLayoutManager layoutManager, long charIndex)Invoked while determining the soft line break point. When NO, NSLayoutManager tries to find the next line break opportunity before charIndex API-Since: 7.0
-
layoutManagerShouldGenerateGlyphsPropertiesCharacterIndexesFontForGlyphRange
default long layoutManagerShouldGenerateGlyphsPropertiesCharacterIndexesFontForGlyphRange(@NotNull @NotNull NSLayoutManager layoutManager, @NotNull @NotNull org.moe.natj.general.ptr.ConstCharPtr glyphs, @NotNull @NotNull org.moe.natj.general.ptr.ConstNIntPtr props, @NotNull @NotNull org.moe.natj.general.ptr.ConstNUIntPtr charIndexes, @NotNull @NotNull UIFont aFont, NSRange glyphRange)Glyph generation *********************** This is sent whenever layoutManager is about to store the initial glyph information via -setGlyphs:properties:characterIndexes:forGlyphRange:. This method allows customizing the initial glyph generation process. It can invoke -setGlyphs:properties:characterIndexes:forGlyphRange: with modified glyph information. The return value specifies the actual glyph range stored in this method. By returning 0, it can indicate layoutManager to do the default processing. Note that querying glyph information surrounding glyphRange could lead to recursion since the data might not be available, yet. API-Since: 7.0
-
layoutManagerShouldSetLineFragmentRectLineFragmentUsedRectBaselineOffsetInTextContainerForGlyphRange
default boolean layoutManagerShouldSetLineFragmentRectLineFragmentUsedRectBaselineOffsetInTextContainerForGlyphRange(@NotNull @NotNull NSLayoutManager layoutManager, @NotNull @NotNull CGRect lineFragmentRect, @NotNull @NotNull CGRect lineFragmentUsedRect, @NotNull @NotNull org.moe.natj.general.ptr.NFloatPtr baselineOffset, @NotNull @NotNull NSTextContainer textContainer, NSRange glyphRange)Allows NSLayoutManagerDelegate to customize the line fragment geometry before committing to the layout cache. The implementation of this method should make sure that the modified fragments are still valid inside the text container coordinate. When it returns YES, the layout manager uses the modified rects. Otherwise, it ignores the rects returned from this method. API-Since: 9.0
-
layoutManagerShouldUseActionForControlCharacterAtIndex
default long layoutManagerShouldUseActionForControlCharacterAtIndex(@NotNull @NotNull NSLayoutManager layoutManager, long action, long charIndex)Returns the control character action for the control character at charIndex. API-Since: 7.0
-
layoutManagerTextContainerDidChangeGeometryFromSize
default void layoutManagerTextContainerDidChangeGeometryFromSize(@NotNull @NotNull NSLayoutManager layoutManager, @NotNull @NotNull NSTextContainer textContainer, CGSize oldSize)This is sent right before layoutManager invalidates the layout due to textContainer changing geometry. The receiver of this method can react to the geometry change and perform adjustments such as recreating the exclusion path. API-Since: 7.0
-
layoutManagerDidInvalidateLayout
default void layoutManagerDidInvalidateLayout(@NotNull @NotNull NSLayoutManager sender)Layout processing *********************** This is sent whenever layout or glyphs become invalidated in a layout manager which previously had all layout complete. API-Since: 7.0
-
-