Package apple.uikit

Class NSTextContainer

    • Constructor Detail

      • NSTextContainer

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static 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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

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

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

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • exclusionPaths

        public NSArray<? extends UIBezierPath> exclusionPaths()
        Default value : empty array An array of UIBezierPath representing the exclusion paths inside the receiver's bounding rect.
      • heightTracksTextView

        public boolean heightTracksTextView()
      • initWithSize

        public NSTextContainer initWithSize​(CGSize size)
        Initialization ***************************
      • isSimpleRectangularTextContainer

        public boolean isSimpleRectangularTextContainer()
        Returns YES if the receiver is a rectangular shape defined simply by -size. TextKit utilizes this information for enabling various layout optimizations. NSLayoutManager disables non-contiguous layout when this property is NO. The default implementation returns NO when -exclusionPaths has 1 or more items, -maximumNumberOfLines is not 0, or -lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect: is overridden. It's recommended to override this property when -lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect: is overridden.
      • layoutManager

        public NSLayoutManager layoutManager()
        Accessor for the NSLayoutManager object owning the receiver. Avoid assigning a layout manager directly through this property. Adding a text container to a layout manager through -[NSLayoutManager addTextContainer:] will use the property for assigning the new layout manager.
      • layoutOrientation

        public long layoutOrientation()
        Description copied from interface: NSTextLayoutOrientationProvider
        A property describing the receiver's layout orientation. This property defines the default value for the range of string laid out in the receiver in absence of explicit NSVerticalGlyphFormAttributeName attribute. For example, when NSTextLayoutOrientationVertical, the default value for NSVerticalGlyphFormAttributeName is 1. When rendering into the receiver, the Text System assumes the coordinate system is appropriately rotated.
        Specified by:
        layoutOrientation in interface NSTextLayoutOrientationProvider
      • lineBreakMode

        public long lineBreakMode()
        Default value: NSLineBreakByWordWrapping The line break mode defines the behavior of the last line inside the text container.
      • lineFragmentPadding

        public double lineFragmentPadding()
        Default value: 5.0 The layout padding at the beginning and end of the line fragment rects insetting the layout width available for the contents. This value is utilized by NSLayoutManager for determining the layout width.
      • lineFragmentRectForProposedRectAtIndexWritingDirectionRemainingRect

        public CGRect lineFragmentRectForProposedRectAtIndexWritingDirectionRemainingRect​(CGRect proposedRect,
                                                                                          long characterIndex,
                                                                                          long baseWritingDirection,
                                                                                          CGRect remainingRect)
        Returns the bounds of a line fragment rect inside the receiver for proposedRect. This is the intersection of proposedRect and the receiver's bounding rect defined by -size property. The regions defined by -exclusionPaths property are excluded from the return value. charIndex is the character location inside the text storage for the line fragment being processed. It is possible that proposedRect can be divided into multiple line fragments due to exclusion paths. In that case, remainingRect returns the remainder that can be passed in as the proposed rect for the next iteration. baseWritingDirection determines the direction of advancement for line fragments inside a visual horizontal line. The values passed into the method are either NSWritingDirectionLeftToRight or NSWritingDirectionRightToLeft. This method can be overridden by subclasses for further text container region customization.
      • maximumNumberOfLines

        public long maximumNumberOfLines()
        Default value: 0 (no limit) The maximum number of lines that can be stored in the receiver. This value is utilized by NSLayoutManager for determining the maximum number of lines associated with the text container.
      • replaceLayoutManager

        public void replaceLayoutManager​(NSLayoutManager newLayoutManager)
        This method should be used instead of the primitive -setLayoutManager: if you need to replace a container's layoutManager with a new one leaving the rest of the web intact. All the NSTextContainers on the old NSLayoutManager get transferred to the new one. This method deals with all the work of making sure the containers don't get deallocated and removing the old layoutManager from the text storage and replacing it with the new one.
      • setExclusionPaths

        public void setExclusionPaths​(NSArray<? extends UIBezierPath> value)
        Default value : empty array An array of UIBezierPath representing the exclusion paths inside the receiver's bounding rect.
      • setHeightTracksTextView

        public void setHeightTracksTextView​(boolean value)
      • setLayoutManager_unsafe

        public void setLayoutManager_unsafe​(NSLayoutManager value)
        Accessor for the NSLayoutManager object owning the receiver. Avoid assigning a layout manager directly through this property. Adding a text container to a layout manager through -[NSLayoutManager addTextContainer:] will use the property for assigning the new layout manager.
      • setLayoutManager

        public void setLayoutManager​(NSLayoutManager value)
        Accessor for the NSLayoutManager object owning the receiver. Avoid assigning a layout manager directly through this property. Adding a text container to a layout manager through -[NSLayoutManager addTextContainer:] will use the property for assigning the new layout manager.
      • setLineBreakMode

        public void setLineBreakMode​(long value)
        Default value: NSLineBreakByWordWrapping The line break mode defines the behavior of the last line inside the text container.
      • setLineFragmentPadding

        public void setLineFragmentPadding​(double value)
        Default value: 5.0 The layout padding at the beginning and end of the line fragment rects insetting the layout width available for the contents. This value is utilized by NSLayoutManager for determining the layout width.
      • setMaximumNumberOfLines

        public void setMaximumNumberOfLines​(long value)
        Default value: 0 (no limit) The maximum number of lines that can be stored in the receiver. This value is utilized by NSLayoutManager for determining the maximum number of lines associated with the text container.
      • setSize

        public void setSize​(CGSize value)
        Default value: CGSizeZero Defines the maximum size for the layout area returned from -lineFragmentRectForProposedRect:writingDirection:remainingRect:. 0.0 and less means no limitation.
      • setWidthTracksTextView

        public void setWidthTracksTextView​(boolean value)
        Default value: NO Define whether the text container view bounds changes can affect the text container size.
      • size

        public CGSize size()
        Default value: CGSizeZero Defines the maximum size for the layout area returned from -lineFragmentRectForProposedRect:writingDirection:remainingRect:. 0.0 and less means no limitation.
      • widthTracksTextView

        public boolean widthTracksTextView()
        Default value: NO Define whether the text container view bounds changes can affect the text container size.
      • 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