Package apple.uikit
Class NSTextLayoutManager
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.uikit.NSTextLayoutManager
-
- All Implemented Interfaces:
NSCoding,NSSecureCoding,NSObject,NSTextSelectionDataSource
public class NSTextLayoutManager extends NSObject implements NSSecureCoding, NSTextSelectionDataSource
NSTextLayoutManager is the center piece of the TextKit object network maintaining the layout geometry via an array of NSTextContainer and layout results with NSTextLayoutFragment associated with NSTextElement vended from the owner NSTextContentManager. API-Since: 15.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNSTextLayoutManager.Block_enumerateRenderingAttributesFromLocationReverseUsingBlockstatic interfaceNSTextLayoutManager.Block_enumerateTextLayoutFragmentsFromLocationOptionsUsingBlockstatic interfaceNSTextLayoutManager.Block_enumerateTextSegmentsInRangeTypeOptionsUsingBlockstatic interfaceNSTextLayoutManager.Block_renderingAttributesValidator_retstatic interfaceNSTextLayoutManager.Block_setRenderingAttributesValidator-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
Nested classes/interfaces inherited from interface apple.uikit.protocol.NSTextSelectionDataSource
NSTextSelectionDataSource.Block_enumerateCaretOffsetsInLineFragmentAtLocationUsingBlock, NSTextSelectionDataSource.Block_enumerateContainerBoundariesFromLocationReverseUsingBlock, NSTextSelectionDataSource.Block_enumerateSubstringsFromLocationOptionsUsingBlock
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSTextLayoutManager(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()voidaddRenderingAttributeValueForTextRange(@NotNull java.lang.String renderingAttribute, @Nullable java.lang.Object value, @NotNull NSTextRange textRange)Sets the rendering attribute.static NSTextLayoutManageralloc()static NSTextLayoutManagerallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)longbaseWritingDirectionAtLocation(@NotNull NSTextLocation location)Returns the base writing direction at location.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()@Nullable NSTextLayoutManagerDelegatedelegate()static java.lang.Stringdescription_static()@NotNull NSTextRangedocumentRange()Declares the starting and ending locations for the document.voidencodeWithCoder(@NotNull NSCoder coder)voidensureLayoutForBounds(CGRect bounds)Performs the layout for filling bounds inside the last text container.voidensureLayoutForRange(@NotNull NSTextRange range)Performs the layout for textRange.voidenumerateCaretOffsetsInLineFragmentAtLocationUsingBlock(@NotNull NSTextLocation location, NSTextSelectionDataSource.Block_enumerateCaretOffsetsInLineFragmentAtLocationUsingBlock block)Layout Enumerates all the caret offset from left to right in visual order.voidenumerateContainerBoundariesFromLocationReverseUsingBlock(@NotNull NSTextLocation location, boolean reverse, NSTextSelectionDataSource.Block_enumerateContainerBoundariesFromLocationReverseUsingBlock block)This optional method should be implemented enumerating the text container/page boundary when the text selection data provider supports such a layout functionality.voidenumerateRenderingAttributesFromLocationReverseUsingBlock(@NotNull NSTextLocation location, boolean reverse, @NotNull NSTextLayoutManager.Block_enumerateRenderingAttributesFromLocationReverseUsingBlock block)Enumerates the rendering attributes from location.voidenumerateSubstringsFromLocationOptionsUsingBlock(@NotNull NSTextLocation location, long options, NSTextSelectionDataSource.Block_enumerateSubstringsFromLocationOptionsUsingBlock block)Enumerating the textual segment boundaries starting at location.@Nullable NSTextLocationenumerateTextLayoutFragmentsFromLocationOptionsUsingBlock(@Nullable NSTextLocation location, long options, @NotNull NSTextLayoutManager.Block_enumerateTextLayoutFragmentsFromLocationOptionsUsingBlock block)Enumerates the text layout fragments starting at textLocation.voidenumerateTextSegmentsInRangeTypeOptionsUsingBlock(@NotNull NSTextRange textRange, long type, long options, @NotNull NSTextLayoutManager.Block_enumerateTextSegmentsInRangeTypeOptionsUsingBlock block)Enumerates text segments of type in textRange.static longhash_static()NSTextLayoutManagerinit()NSTextLayoutManagerinitWithCoder(@NotNull NSCoder coder)NS_DESIGNATED_INITIALIZERstatic NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)voidinvalidateLayoutForRange(@NotNull NSTextRange range)Invalidates layout information for textRangevoidinvalidateRenderingAttributesForTextRange(@NotNull NSTextRange textRange)Invalidates the rendering attributes in textRange.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)@Nullable NSOperationQueuelayoutQueue()If non-nil, it performs layout in the specified queue until estimatedUsageBounds=NO.booleanlimitsLayoutForSuspiciousContents()When YES, enables internal security analysis for malicious inputs and activates defensive behaviors.@Nullable NSTextRangelineFragmentRangeForPointInContainerAtLocation(CGPoint point, @NotNull NSTextLocation location)Returns the range of the line fragment containing point inside the coordinate system containing location.static @NotNull NSDictionary<java.lang.String,?>linkRenderingAttributes()The default set of attributes for rendering NSLinkAttributeName.@Nullable NSTextLocationlocationFromLocationWithOffset(@NotNull NSTextLocation location, long offset)Returns a new location from location with offset.static NSTextLayoutManagernew_objc()longoffsetFromLocationToLocation(@NotNull NSTextLocation from, @NotNull NSTextLocation to)Returns the offset between from and to.voidremoveRenderingAttributeForTextRange(@NotNull java.lang.String renderingAttribute, @NotNull NSTextRange textRange)Removes attribute from textRange.@NotNull NSDictionary<java.lang.String,?>renderingAttributesForLinkAtLocation(@NotNull java.lang.Object link, @NotNull NSTextLocation location)Returns a dictionary of rendering attributes for rendering NSLinkAttributeName.@Nullable NSTextLayoutManager.Block_renderingAttributesValidator_retrenderingAttributesValidator()A callback block invoked whenever NSTextLayoutManager needs to validate the rendering attributes for the range.voidreplaceContentsInRangeWithAttributedString(@NotNull NSTextRange range, @NotNull NSAttributedString attributedString)voidreplaceContentsInRangeWithTextElements(@NotNull NSTextRange range, @NotNull NSArray<? extends NSTextElement> textElements)voidreplaceTextContentManager(@NotNull NSTextContentManager textContentManager)This method should be used in order to replace an NSTextContentManager with a new one, leaving all related objects intact.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetDelegate(@Nullable NSTextLayoutManagerDelegate value)voidsetDelegate_unsafe(@Nullable NSTextLayoutManagerDelegate value)voidsetLayoutQueue(@Nullable NSOperationQueue value)If non-nil, it performs layout in the specified queue until estimatedUsageBounds=NO.voidsetLimitsLayoutForSuspiciousContents(boolean value)When YES, enables internal security analysis for malicious inputs and activates defensive behaviors.voidsetRenderingAttributesForTextRange(@NotNull NSDictionary<java.lang.String,?> renderingAttributes, @NotNull NSTextRange textRange)Sets the rendering attributes.voidsetRenderingAttributesValidator(@Nullable NSTextLayoutManager.Block_setRenderingAttributesValidator value)A callback block invoked whenever NSTextLayoutManager needs to validate the rendering attributes for the range.voidsetTextContainer(@Nullable NSTextContainer value)The text container object providing geometric information for the layout destination.voidsetTextSelectionNavigation(@NotNull NSTextSelectionNavigation value)Returns an NSTextSelectionNavigation configured to have the text layout manager as NSTextSelectionDataSourcevoidsetTextSelections(@NotNull NSArray<? extends NSTextSelection> value)An array of NSTextSelections associated by the text layout manager.voidsetUsesFontLeading(boolean value)If YES, uses the leading as specified by the font.voidsetUsesHyphenation(boolean value)When YES, NSTextLayoutManager will attempt to hyphenate when wrapping lines.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()@Nullable NSTextContainertextContainer()The text container object providing geometric information for the layout destination.@Nullable NSTextContentManagertextContentManager()Pointing to the NSTextContentManager object strongly referencing the text layout manager.@Nullable NSTextLayoutFragmenttextLayoutFragmentForLocation(@NotNull NSTextLocation location)Returns the text layout fragment containing the document location, location.@Nullable NSTextLayoutFragmenttextLayoutFragmentForPosition(CGPoint position)Returns the text layout fragment containing position inside the coordinate system for textContainer.longtextLayoutOrientationAtLocation(@NotNull NSTextLocation location)Returns the text layout orientation at location.@Nullable NSTextRangetextRangeForSelectionGranularityEnclosingLocation(long selectionGranularity, @NotNull NSTextLocation location)Returns a text range corresponding to selectionGranularity enclosing location.@NotNull NSTextSelectionNavigationtextSelectionNavigation()Returns an NSTextSelectionNavigation configured to have the text layout manager as NSTextSelectionDataSource@NotNull NSArray<? extends NSTextSelection>textSelections()An array of NSTextSelections associated by the text layout manager.@NotNull NSTextViewportLayoutControllertextViewportLayoutController()Returns NSTextViewportLayoutController associated with textContainer.CGRectusageBoundsForTextContainer()The usage bounds for textContainer.booleanusesFontLeading()If YES, uses the leading as specified by the font.booleanusesHyphenation()When YES, NSTextLayoutManager will attempt to hyphenate when wrapping lines.static booleanuseStoredAccessor()Deprecated.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
addRenderingAttributeValueForTextRange
public void addRenderingAttributeValueForTextRange(@NotNull @NotNull java.lang.String renderingAttribute, @Nullable @Nullable java.lang.Object value, @NotNull @NotNull NSTextRange textRange)Sets the rendering attribute. Passing nil value indicates overriding the specified attribute by removing from the final attributes passed to the layout and rendering engine. This is a convenience over -setRenderingAttributes:forTextRange:.
-
alloc
public static NSTextLayoutManager alloc()
-
allocWithZone
public static NSTextLayoutManager allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
baseWritingDirectionAtLocation
public long baseWritingDirectionAtLocation(@NotNull @NotNull NSTextLocation location)Description copied from interface:NSTextSelectionDataSourceReturns the base writing direction at location. It is recommended to return the resolved base direction either NSTextSelectionNavigationWritingDirectionLeftToRight or NSTextSelectionNavigationWritingDirectionRightToLeft.- Specified by:
baseWritingDirectionAtLocationin interfaceNSTextSelectionDataSource
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
delegate
@Nullable public @Nullable NSTextLayoutManagerDelegate delegate()
-
description_static
public static java.lang.String description_static()
-
documentRange
@NotNull public @NotNull NSTextRange documentRange()
Description copied from interface:NSTextSelectionDataSourceDeclares the starting and ending locations for the document.- Specified by:
documentRangein interfaceNSTextSelectionDataSource
-
encodeWithCoder
public void encodeWithCoder(@NotNull @NotNull NSCoder coder)- Specified by:
encodeWithCoderin interfaceNSCoding
-
ensureLayoutForBounds
public void ensureLayoutForBounds(CGRect bounds)
Performs the layout for filling bounds inside the last text container.
-
ensureLayoutForRange
public void ensureLayoutForRange(@NotNull @NotNull NSTextRange range)Performs the layout for textRange.
-
enumerateCaretOffsetsInLineFragmentAtLocationUsingBlock
public void enumerateCaretOffsetsInLineFragmentAtLocationUsingBlock(@NotNull @NotNull NSTextLocation location, @NotNull NSTextSelectionDataSource.Block_enumerateCaretOffsetsInLineFragmentAtLocationUsingBlock block)Description copied from interface:NSTextSelectionDataSourceLayout Enumerates all the caret offset from left to right in visual order. caretOffset should be in the coordinate system for the text container. When leadingEdge=YES, it indicates caretOffset is at the edge logically preceding the character. For LTR characters, it is on the left, and on the right for RTL characters.- Specified by:
enumerateCaretOffsetsInLineFragmentAtLocationUsingBlockin interfaceNSTextSelectionDataSource
-
enumerateContainerBoundariesFromLocationReverseUsingBlock
public void enumerateContainerBoundariesFromLocationReverseUsingBlock(@NotNull @NotNull NSTextLocation location, boolean reverse, @NotNull NSTextSelectionDataSource.Block_enumerateContainerBoundariesFromLocationReverseUsingBlock block)Description copied from interface:NSTextSelectionDataSourceThis optional method should be implemented enumerating the text container/page boundary when the text selection data provider supports such a layout functionality.- Specified by:
enumerateContainerBoundariesFromLocationReverseUsingBlockin interfaceNSTextSelectionDataSource
-
enumerateRenderingAttributesFromLocationReverseUsingBlock
public void enumerateRenderingAttributesFromLocationReverseUsingBlock(@NotNull @NotNull NSTextLocation location, boolean reverse, @NotNull @NotNull NSTextLayoutManager.Block_enumerateRenderingAttributesFromLocationReverseUsingBlock block)Enumerates the rendering attributes from location. It enumerates only ranges with rendering attributes specified. Returning NO from block breaks out of the enumeration.
-
enumerateSubstringsFromLocationOptionsUsingBlock
public void enumerateSubstringsFromLocationOptionsUsingBlock(@NotNull @NotNull NSTextLocation location, long options, @NotNull NSTextSelectionDataSource.Block_enumerateSubstringsFromLocationOptionsUsingBlock block)Description copied from interface:NSTextSelectionDataSourceEnumerating the textual segment boundaries starting at location. The segmentation logic should be based on the natural language semantics and rules such as Unicode Text Segmentation UAX 29. It is allowed to have custom text segmentation behavior for specialized document contents (i.e. text editors with structured document contents such as a programming language). NSStringEnumerationByLines should be aware of the visual line boundaries based on soft line wrapping.- Specified by:
enumerateSubstringsFromLocationOptionsUsingBlockin interfaceNSTextSelectionDataSource
-
enumerateTextLayoutFragmentsFromLocationOptionsUsingBlock
@Nullable public @Nullable NSTextLocation enumerateTextLayoutFragmentsFromLocationOptionsUsingBlock(@Nullable @Nullable NSTextLocation location, long options, @NotNull @NotNull NSTextLayoutManager.Block_enumerateTextLayoutFragmentsFromLocationOptionsUsingBlock block)
Enumerates the text layout fragments starting at textLocation. If textLocation=nil, it assumes self.textContentManager.documentRange.location; uses self.documentRange.endLocation for reverse enumeration. When enumerating backward, it starts with the fragment preceding the one containing textLocation. If enumerated at least one fragment, it returns the edge of the enumerated range. Note that the enumerated range might not match the range of the last element returned. It enumerates the elements in the sequence, but it can skip a range (it can limit the maximum number of text elements enumerated for a single invocation or hide some elements from the layout). Returning NO from block breaks out of the enumeration.
-
enumerateTextSegmentsInRangeTypeOptionsUsingBlock
public void enumerateTextSegmentsInRangeTypeOptionsUsingBlock(@NotNull @NotNull NSTextRange textRange, long type, long options, @NotNull @NotNull NSTextLayoutManager.Block_enumerateTextSegmentsInRangeTypeOptionsUsingBlock block)Enumerates text segments of type in textRange. A text segment is both logically and visually contiguous portion of the text content inside a line fragment. It can be defined with a single text range. The segments are enumerated visually from left to right. Returning NO from block breaks out of the enumeration.
-
hash_static
public static long hash_static()
-
init
public NSTextLayoutManager init()
-
initWithCoder
public NSTextLayoutManager initWithCoder(@NotNull @NotNull NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
invalidateLayoutForRange
public void invalidateLayoutForRange(@NotNull @NotNull NSTextRange range)Invalidates layout information for textRange
-
invalidateRenderingAttributesForTextRange
public void invalidateRenderingAttributesForTextRange(@NotNull @NotNull NSTextRange textRange)Invalidates the rendering attributes in textRange. Enumerating rendering attributes will skip the invalidated range.
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
layoutQueue
@Nullable public @Nullable NSOperationQueue layoutQueue()
If non-nil, it performs layout in the specified queue until estimatedUsageBounds=NO.
-
limitsLayoutForSuspiciousContents
public boolean limitsLayoutForSuspiciousContents()
When YES, enables internal security analysis for malicious inputs and activates defensive behaviors. By enabling this functionality, it's possible certain text such as a very long paragraph might result in unexpected layout. NO by default.
-
lineFragmentRangeForPointInContainerAtLocation
@Nullable public @Nullable NSTextRange lineFragmentRangeForPointInContainerAtLocation(CGPoint point, @NotNull @NotNull NSTextLocation location)
Description copied from interface:NSTextSelectionDataSourceReturns the range of the line fragment containing point inside the coordinate system containing location.- Specified by:
lineFragmentRangeForPointInContainerAtLocationin interfaceNSTextSelectionDataSource
-
linkRenderingAttributes
@NotNull public static @NotNull NSDictionary<java.lang.String,?> linkRenderingAttributes()
The default set of attributes for rendering NSLinkAttributeName. The base NSTextLayoutManager class returns with NSUnderlineStyleSingle for NSUnderlineStyleAttributeName and the platform link color for NSForegroundColorAttributeName. The platform color for macOS is +linkColor. Other platforms uses +blueColor.
-
locationFromLocationWithOffset
@Nullable public @Nullable NSTextLocation locationFromLocationWithOffset(@NotNull @NotNull NSTextLocation location, long offset)
Description copied from interface:NSTextSelectionDataSourceReturns a new location from location with offset. The offset value could be positive or negative indicating the logical direction. Could return nil when the inputs don't produce any legal location (i.e. out of bounds index).- Specified by:
locationFromLocationWithOffsetin interfaceNSTextSelectionDataSource
-
new_objc
public static NSTextLayoutManager new_objc()
-
offsetFromLocationToLocation
public long offsetFromLocationToLocation(@NotNull @NotNull NSTextLocation from, @NotNull @NotNull NSTextLocation to)Description copied from interface:NSTextSelectionDataSourceReturns the offset between from and to. The return value could be positive or negative. Could return NSNotFound when the offset cannot be represented in an integer value (i.e. locations are not in the same document).- Specified by:
offsetFromLocationToLocationin interfaceNSTextSelectionDataSource
-
removeRenderingAttributeForTextRange
public void removeRenderingAttributeForTextRange(@NotNull @NotNull java.lang.String renderingAttribute, @NotNull @NotNull NSTextRange textRange)Removes attribute from textRange. This is a convenience over -setRenderingAttributes:forTextRange:.
-
renderingAttributesForLinkAtLocation
@NotNull public @NotNull NSDictionary<java.lang.String,?> renderingAttributesForLinkAtLocation(@NotNull @NotNull java.lang.Object link, @NotNull @NotNull NSTextLocation location)
Returns a dictionary of rendering attributes for rendering NSLinkAttributeName. Just as other rendering attributes, specifying NSNull removes the attribute from the final attributes used for rendering. It has priority over the general rendering attributes.
-
renderingAttributesValidator
@Nullable public @Nullable NSTextLayoutManager.Block_renderingAttributesValidator_ret renderingAttributesValidator()
A callback block invoked whenever NSTextLayoutManager needs to validate the rendering attributes for the range. The validator should use -setRenderingAttributes:forTextRange: to fill the rendering attributes appropriate for the range inside textLayoutFragment.
-
replaceContentsInRangeWithAttributedString
public void replaceContentsInRangeWithAttributedString(@NotNull @NotNull NSTextRange range, @NotNull @NotNull NSAttributedString attributedString)
-
replaceContentsInRangeWithTextElements
public void replaceContentsInRangeWithTextElements(@NotNull @NotNull NSTextRange range, @NotNull @NotNull NSArray<? extends NSTextElement> textElements)
-
replaceTextContentManager
public void replaceTextContentManager(@NotNull @NotNull NSTextContentManager textContentManager)This method should be used in order to replace an NSTextContentManager with a new one, leaving all related objects intact. This method makes sure the NSTextLayoutManager doesn't get deallocated while migrating to the new manager.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setDelegate_unsafe
public void setDelegate_unsafe(@Nullable @Nullable NSTextLayoutManagerDelegate value)
-
setDelegate
public void setDelegate(@Nullable @Nullable NSTextLayoutManagerDelegate value)
-
setLayoutQueue
public void setLayoutQueue(@Nullable @Nullable NSOperationQueue value)If non-nil, it performs layout in the specified queue until estimatedUsageBounds=NO.
-
setLimitsLayoutForSuspiciousContents
public void setLimitsLayoutForSuspiciousContents(boolean value)
When YES, enables internal security analysis for malicious inputs and activates defensive behaviors. By enabling this functionality, it's possible certain text such as a very long paragraph might result in unexpected layout. NO by default.
-
setRenderingAttributesForTextRange
public void setRenderingAttributesForTextRange(@NotNull @NotNull NSDictionary<java.lang.String,?> renderingAttributes, @NotNull @NotNull NSTextRange textRange)Sets the rendering attributes.
-
setRenderingAttributesValidator
public void setRenderingAttributesValidator(@Nullable @Nullable NSTextLayoutManager.Block_setRenderingAttributesValidator value)A callback block invoked whenever NSTextLayoutManager needs to validate the rendering attributes for the range. The validator should use -setRenderingAttributes:forTextRange: to fill the rendering attributes appropriate for the range inside textLayoutFragment.
-
setTextContainer
public void setTextContainer(@Nullable @Nullable NSTextContainer value)The text container object providing geometric information for the layout destination. If isSimpleRectangularTextContainer=NO, NSTextLayoutManager always fill from the top instead of allowing non-contiguous layout support.
-
setTextSelectionNavigation
public void setTextSelectionNavigation(@NotNull @NotNull NSTextSelectionNavigation value)Returns an NSTextSelectionNavigation configured to have the text layout manager as NSTextSelectionDataSource
-
setTextSelections
public void setTextSelections(@NotNull @NotNull NSArray<? extends NSTextSelection> value)An array of NSTextSelections associated by the text layout manager. Each NSTextSelection represents an insertion point. The selection state is shared among all view ports connected to the text layout manager via text containers.
-
setUsesFontLeading
public void setUsesFontLeading(boolean value)
If YES, uses the leading as specified by the font. However, this is not appropriate for most UI text. YES by default.
-
setUsesHyphenation
public void setUsesHyphenation(boolean value)
When YES, NSTextLayoutManager will attempt to hyphenate when wrapping lines. May be overridden on a per-paragraph basis by the NSParagraphStyle's usesDefaultHyphenation. The receiver makes the best effort to decide the exact logic including the hyphenation factor based on the context. The default value is NO. Can be overridden by the preference key @"NSUsesDefaultHyphenation".
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.- Specified by:
_supportsSecureCodingin interfaceNSSecureCoding
-
textContainer
@Nullable public @Nullable NSTextContainer textContainer()
The text container object providing geometric information for the layout destination. If isSimpleRectangularTextContainer=NO, NSTextLayoutManager always fill from the top instead of allowing non-contiguous layout support.
-
textContentManager
@Nullable public @Nullable NSTextContentManager textContentManager()
Pointing to the NSTextContentManager object strongly referencing the text layout manager.
-
textLayoutFragmentForLocation
@Nullable public @Nullable NSTextLayoutFragment textLayoutFragmentForLocation(@NotNull @NotNull NSTextLocation location)
Returns the text layout fragment containing the document location, location.
-
textLayoutFragmentForPosition
@Nullable public @Nullable NSTextLayoutFragment textLayoutFragmentForPosition(CGPoint position)
Returns the text layout fragment containing position inside the coordinate system for textContainer.
-
textLayoutOrientationAtLocation
public long textLayoutOrientationAtLocation(@NotNull @NotNull NSTextLocation location)Description copied from interface:NSTextSelectionDataSourceReturns the text layout orientation at location. If not implemented, NSTextSelectionNavigation assumes it is NSTextSelectionNavigationLayoutOrientationHorizontal.- Specified by:
textLayoutOrientationAtLocationin interfaceNSTextSelectionDataSource
-
textRangeForSelectionGranularityEnclosingLocation
@Nullable public @Nullable NSTextRange textRangeForSelectionGranularityEnclosingLocation(long selectionGranularity, @NotNull @NotNull NSTextLocation location)
Description copied from interface:NSTextSelectionDataSourceReturns a text range corresponding to selectionGranularity enclosing location. Returns nil when documentRange.isEmpty=YES.- Specified by:
textRangeForSelectionGranularityEnclosingLocationin interfaceNSTextSelectionDataSource
-
textSelectionNavigation
@NotNull public @NotNull NSTextSelectionNavigation textSelectionNavigation()
Returns an NSTextSelectionNavigation configured to have the text layout manager as NSTextSelectionDataSource
-
textSelections
@NotNull public @NotNull NSArray<? extends NSTextSelection> textSelections()
An array of NSTextSelections associated by the text layout manager. Each NSTextSelection represents an insertion point. The selection state is shared among all view ports connected to the text layout manager via text containers.
-
textViewportLayoutController
@NotNull public @NotNull NSTextViewportLayoutController textViewportLayoutController()
Returns NSTextViewportLayoutController associated with textContainer.
-
usageBoundsForTextContainer
public CGRect usageBoundsForTextContainer()
The usage bounds for textContainer. KVO-compliant. Views can observe this property in order to trigger a resize operation. For example, UIView/NSView should call setNeedsUpdateConstraints() when the usage bounds changes.
-
usesFontLeading
public boolean usesFontLeading()
If YES, uses the leading as specified by the font. However, this is not appropriate for most UI text. YES by default.
-
usesHyphenation
public boolean usesHyphenation()
When YES, NSTextLayoutManager will attempt to hyphenate when wrapping lines. May be overridden on a per-paragraph basis by the NSParagraphStyle's usesDefaultHyphenation. The receiver makes the best effort to decide the exact logic including the hyphenation factor based on the context. The default value is NO. Can be overridden by the preference key @"NSUsesDefaultHyphenation".
-
version_static
public static long version_static()
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-