2

The visible portion of a document in a window in a desktop app

I'd like to show information in a second view that's contextualized to what's appearing in the first view. To do that, I'd like to get just the text that's scrolled into view in the NSView. As in the picture I've attached, the whole document is A. The portion that's visible is B. I'm writing this using Objective-C and Swift, so a suggestion in either language would be welcome. Thank you.

johnrubythecat
  • 1,003
  • 1
  • 13
  • 31
  • wondering if it might have something to do with NSClipView's documentView. I see you can get the visibleRect, an NSRect. https://developer.apple.com/reference/appkit/nsclipview/1524587-documentview – johnrubythecat Sep 15 '16 at 17:13
  • http://stackoverflow.com/questions/16675997/using-nsglyph-and-memory-allocation Looking at this now. – johnrubythecat Sep 16 '16 at 15:08
  • Did you ever find an answer for this? If yes, could you please answer your question. – adev Jul 08 '18 at 18:12

0 Answers0