Age | Commit message (Collapse) | Author |
|
Since this is intended to be template code upon which to build a full
application, I didn't like that the prior license required the full
license text to be reproduced in distributions.
I want the code to be a base for developers to use when starting a Cocoa
application, like the template code that's generated in a new Xcode
project. As such, I want people to be allowed to remove my license when
distributing the code.
|
|
Set a BSD-3-Clause license on all the application code so that it can be
freely used as a base template for an application.
Use the GNU GPLv3+ for the log script as it's a helper utility that
isn't compiled into the application.
|
|
Make the window's `contentView` the `_scroll_view` so that resizing the
window causes the scroll view to resize with the window instead of
having a fixed size.
|
|
|
|
* Remove the `NSTextFinder` code as it's not necessary to get a find bar
for an `NSTextView`.
* Remove the commented notes for the "Find" menu.
|
|
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.
|
|
Just discovered this property which enables basic undo/redo
functionality on the NSTextView.
I can now confirm that the Undo and Redo menu bar items do in fact work.
|
|
|
|
This creates the whole font menu for me, and the actions work correctly,
very nice! Read about this in the `NSFontManager` documentation.
The only hitch is that some menu items don't appear to have the proper
keyEquivalents set. For example, "Show Colors", "Copy Style", and "Paste
Style" are all missing the Apple key from the shortcuts.
|
|
Most options seem to work, except for Undo, Redo, and the Find commands.
|
|
This enables the "Close" menu item in the File menu and allows it to
work.
|
|
Decided to use Core Foundation naming conventions here instead of
C-style lowercase. It seems to fit better with the Objective-C code.
|
|
Put the menu code in its own file to keep it more organised. We're also
going to be adding a lot more code here for the base main menu.
Wasn't sure if I should be releasing these menu objects, but it looks
like the application works when I do release them, so maybe
`setMainMenu` does a retain or copy.
I can't decide if I should use C-style identifiers or Foundation-style
in the menu file.
|
|
Move the window creation to a separate class, and also allow us to take
advantage of `NSApplicationDelegate` protocol methods.
|