aboutsummaryrefslogtreecommitdiffstats
path: root/src/Document.h
diff options
context:
space:
mode:
authorTeddy Wing2023-09-09 20:35:01 +0200
committerTeddy Wing2023-09-09 20:35:01 +0200
commit70a98332cba2a71fe6ffb109e40877bf48e89386 (patch)
tree3a7c68ed82409d2175b0604550c4d20214cccdc6 /src/Document.h
parent059f8a488eae81aa5a023e7fb0df6a437684106b (diff)
downloadBase-Windowed-Application-70a98332cba2a71fe6ffb109e40877bf48e89386.tar.bz2
AppDelegate: Add NSTextFinder find bar
Add a find bar leveraging NSTextFinder. It turns out I didn't need to do anything custom with `NSTextFinder` since `NSTextView` conveniently already has a `usesFindBar` property to turn on built-in support for it. I discovered that by looking at the TextEdit source code available here: https://developer.apple.com/library/archive/samplecode/TextEdit/Introduction/Intro.html I added an `NSScrollView` because you kind of need one to implement `NSTextFinder`. Not sure if the finding functionality would still work without the scroll view. Also use the proper `-performTextFinderAction:` selector for the "Find…" menu item to open the find bar. Now we can confirm that the "Find" menu items work correctly.
Diffstat (limited to 'src/Document.h')
0 files changed, 0 insertions, 0 deletions