Package apple.uikit

Class NSTextSelection

    • Constructor Detail

      • NSTextSelection

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • affinity

        public long affinity()
        Either upstream or downstream selection. NSTextSelectionAffinityDownstream by default. For a 0-length selection, it describes the visual location of the text cursor between the head of line containing the selection location (downstream) or tail of the previous line (upstream). For a selection with contents, it describes the logical direction of non-anchored edge of the selection.
      • allocWithZone

        public static NSTextSelection allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • anchorPositionOffset

        public double anchorPositionOffset()
        Represents the anchor position offset from the beginning of a line fragment in the visual order for the initial tap or mouse down. That is from the left for a horizontal line fragment and from the top for a vertical. Navigating between lines uses this point when the current line fragment associated with the selection is shorter than the next line visited. 0.0 by default.
      • 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()
      • granularity

        public long granularity()
        The granularity of the selection. NSTextSelectionGranularityByCharacter by default. Extending operations should modify the selection by the granularity.
      • hash_static

        public static long hash_static()
      • initWithRangeAffinityGranularity

        public NSTextSelection initWithRangeAffinityGranularity​(@NotNull
                                                                @NotNull NSTextRange range,
                                                                long affinity,
                                                                long granularity)
      • initWithRangesAffinityGranularity

        public NSTextSelection initWithRangesAffinityGranularity​(@NotNull
                                                                 @NotNull NSArray<? extends NSTextRange> textRanges,
                                                                 long affinity,
                                                                 long granularity)
        textRanges should be ordered and not overlapping. Otherwise, textRanges would get normalized by reordered and merging overlapping ranges.
      • instanceMethodSignatureForSelector

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

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isLogical

        public boolean isLogical()
        Indicates whether the selection should be interpreted as logical or visual.
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • isTransient

        public boolean isTransient()
        Transient text selection during drag handling
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

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

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

        @Nullable
        public @Nullable NSTextLocation secondarySelectionLocation()
        Specifies the secondary character location when user taps/clicks at a directional boundary. Setting non-nil location has a side effect of making -logical=NO.
      • setAnchorPositionOffset

        public void setAnchorPositionOffset​(double value)
        Represents the anchor position offset from the beginning of a line fragment in the visual order for the initial tap or mouse down. That is from the left for a horizontal line fragment and from the top for a vertical. Navigating between lines uses this point when the current line fragment associated with the selection is shorter than the next line visited. 0.0 by default.
      • setLogical

        public void setLogical​(boolean value)
        Indicates whether the selection should be interpreted as logical or visual.
      • setSecondarySelectionLocation

        public void setSecondarySelectionLocation​(@Nullable
                                                  @Nullable NSTextLocation value)
        Specifies the secondary character location when user taps/clicks at a directional boundary. Setting non-nil location has a side effect of making -logical=NO.
      • setTypingAttributes

        public void setTypingAttributes​(@NotNull
                                        @NotNull NSDictionary<java.lang.String,​?> value)
        The template attributes used for characters replacing the contents of this selection.
      • 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
      • textRanges

        @NotNull
        public @NotNull NSArray<? extends NSTextRange> textRanges()
        Represents an array of disjoint logical ranges in the selection. The array must be logically ordered. When editing, all ranges in a text selection constitute a single insertion point.
      • textSelectionWithTextRanges

        @NotNull
        public @NotNull NSTextSelection textSelectionWithTextRanges​(@NotNull
                                                                    @NotNull NSArray<? extends NSTextRange> textRanges)
        Returns a copy of this selection, replacing this instance's textRanges property with textRanges but keeping all other attributes the same.
      • typingAttributes

        @NotNull
        public @NotNull NSDictionary<java.lang.String,​?> typingAttributes()
        The template attributes used for characters replacing the contents of this selection.
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.