Package apple.pdfkit

Class PDFSelection

    • Constructor Detail

      • PDFSelection

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addSelection

        public void addSelection​(PDFSelection selection)
        Add a selection to this selection. Selections don't have to be contiguous. If the selection added overlaps with this selection, overlaps are removed.
      • addSelections

        public void addSelections​(NSArray<? extends PDFSelection> selections)
        For adding several selections, you can get better performance calling -[addSelections:] and passing in an array of PDFSelections than calling -[addSelection] above inside a loop. It is the "normalization" (removing the overlaps) that can be slow when adding a selection to another. This function adds all the selections first and then normalizes just once at the end.
      • allocWithZone

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

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

        public CGRect boundsForPage​(PDFPage page)
        Given a PDFPage, returns the bounds in page-space of the text covered by the selection on that page. Note that the bounds are relative to the origin of the page content, not the origin of any particular PDFDisplayBox.
      • 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()
      • color

        public UIColor color()
        If no color is ever specified, PDFSelections will draw using [NSColor selectedTextBackgroundColor] when active and [NSColor secondarySelectedControlColor] when not active. Calling -[setColor] will force the specified color to be used for both active and inactive drawing.
      • copyWithZone

        public java.lang.Object copyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • debugDescription_static

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

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

        public void drawForPageActive​(PDFPage page,
                                      boolean active)
        Calls the below method passing kPDFDisplayBoxCropBox for box.
      • drawForPageWithBoxActive

        public void drawForPageWithBoxActive​(PDFPage page,
                                             long box,
                                             boolean active)
        Draws the selection in page space relative to the origin of box. Box can be kPDFDisplayBoxMediaBox, kPDFDisplayBoxCropBox, kPDFDisplayBoxBleedBox, kPDFDisplayBoxTrimBox or kPDFDisplayBoxArtBox. If active is true, it is drawn using -[NSColor selectedTextBackgroundColor], otherwise it is drawn using -[NSColor secondarySelectedControlColor].
      • extendSelectionAtEnd

        public void extendSelectionAtEnd​(long succeed)
        Extends the selection at either end. Selections can be extended right off onto neighboring pages even to include the entire PDF document.
      • extendSelectionAtStart

        public void extendSelectionAtStart​(long precede)
      • extendSelectionForLineBoundaries

        public void extendSelectionForLineBoundaries()
        Extend to the selection to the beginning and end of the currently selected lines of text. If the current selection is on a single line, then this will extend it to the entire line width. If the selection is across multiple lines, then the first and last lines are expected to wholly contain their respective rows of text.
      • hash_static

        public static long hash_static()
      • initWithDocument

        public PDFSelection initWithDocument​(PDFDocument document)
        Returns and empty PDFSelection. Generally this is not useful but you can use this empty PDFSelection as a container into which you -[addSelection] or -[addSelections] below.
      • 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()
      • numberOfTextRangesOnPage

        public long numberOfTextRangesOnPage​(PDFPage page)
        Returns the number of contiguous ranges of text on the specified page. Returns zero if page is not in selection. A typical, simple selection will contain a single range of text.
      • pages

        public NSArray<? extends PDFPage> pages()
        Array of pages covered by the selection. These are sorted by page index.
      • rangeAtIndexOnPage

        public NSRange rangeAtIndexOnPage​(long index,
                                          PDFPage page)
        Returns a range of contiguous text at index on the specified page. A typical, simple selection will contain a single range of text.
      • resolveClassMethod

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

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

        public NSArray<? extends PDFSelection> selectionsByLine()
        Returns an array of PDFSelection objects - one for each line of text covered by the receiver. For example if the receiver PDFSelection represents a selected paragraph, calling this method would return several PDFSelections - one for each line of text in the paragraph.
      • setColor

        public void setColor​(UIColor value)
        If no color is ever specified, PDFSelections will draw using [NSColor selectedTextBackgroundColor] when active and [NSColor secondarySelectedControlColor] when not active. Calling -[setColor] will force the specified color to be used for both active and inactive drawing.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • string

        public java.lang.String string()
        String representing the text covered by the selection. May contain line-feeds.
      • superclass_static

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

        public static long version_static()