Package apple.uikit

Class NSTextContentStorage

  • All Implemented Interfaces:
    NSCoding, NSSecureCoding, NSObject, NSTextElementProvider, NSTextStorageObserving

    public class NSTextContentStorage
    extends NSTextContentManager
    implements NSTextStorageObserving
    NSTextContentStorage is a concrete subclass of NSTextContentManager providing support for NSAttributedString backing-store. It also implements NSTextStorageObserving participating as a client of NSTextStorage. The facility only supports a single NSTextContentStorage associated with a text storage. When -textStorage!=nil, -attributedString is ignored. By default, NSTextContentStorage is initialized with NSTextStorage as the backing-store. API-Since: 15.0
    • Constructor Detail

      • NSTextContentStorage

        protected NSTextContentStorage​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • adjustedRangeFromRangeForEditingTextSelection

        @Nullable
        public @Nullable NSTextRange adjustedRangeFromRangeForEditingTextSelection​(@NotNull
                                                                                   @NotNull NSTextRange textRange,
                                                                                   boolean forEditingTextSelection)
        Should be implemented if the location backing store requires manual adjustment after editing. When textRange is intersecting or following the current edited range, the method returns the range adjusted for the modification in the editing session. Returns nil, when no adjustment necessary. forEditingTextSelection indicates if textRange is for the text selection associated with the edit session.
        Specified by:
        adjustedRangeFromRangeForEditingTextSelection in interface NSTextElementProvider
        Overrides:
        adjustedRangeFromRangeForEditingTextSelection in class NSTextContentManager
      • allocWithZone

        public static NSTextContentStorage allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • attributedString

        @Nullable
        public @Nullable NSAttributedString attributedString()
        The document contents. KVO-compliant
      • attributedStringForTextElement

        @Nullable
        public @Nullable NSAttributedString attributedStringForTextElement​(@NotNull
                                                                           @NotNull NSTextElement textElement)
        Returns a new attributed string for textElement. Returns if textElement cannot be mapped to NSAttributedString.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • 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()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • 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)
      • processEditingForTextStorageEditedRangeChangeInLengthInvalidatedRange

        public void processEditingForTextStorageEditedRangeChangeInLengthInvalidatedRange​(@NotNull
                                                                                          @NotNull NSTextStorage textStorage,
                                                                                          long editMask,
                                                                                          NSRange newCharRange,
                                                                                          long delta,
                                                                                          NSRange invalidatedCharRange)
        Description copied from interface: NSTextStorageObserving
        The newCharRange is the range in the final string which was explicitly edited. The invalidatedRange includes portions that changed as a result of attribute fixing. invalidatedRange is either equal to newCharRange or larger. Controllers should not change the contents of the text storage during the execution of this message.
        Specified by:
        processEditingForTextStorageEditedRangeChangeInLengthInvalidatedRange in interface NSTextStorageObserving
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setAttributedString

        public void setAttributedString​(@Nullable
                                        @Nullable NSAttributedString value)
        The document contents. KVO-compliant
      • 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: NSSecureCoding
        This 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:
        _supportsSecureCoding in interface NSSecureCoding
        Overrides:
        _supportsSecureCoding in class NSTextContentManager
      • textElementForAttributedString

        @Nullable
        public @Nullable NSTextElement textElementForAttributedString​(@NotNull
                                                                      @NotNull NSAttributedString attributedString)
        Returns NSTextElement corresponding to attributedString. Returns nil when attributedString contains attributes not mappable to NSTextElement.
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.