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.
|
|
|
|
Remove the old test code now that this is working.
|
|
Removing the pointer fixed the cascade, and now new document windows
open shifted by a full titlebar height.
Did a bit of searching on GitHub for `-cascadeTopLeftFromPoint:` and
found this code that does what I was trying to do:
https://github.com/dsa28s/android-studio-apple-m1/blob/c555e84728bfd82a0f9e705af012da37fb52291f/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m#L1399
The above code taught me about the `NSEqualPoints` function, which is
basically what I wanted to initialise the variable. But now I suppose I
don't actually need to do an initialisation of the variable.
|
|
Add some debug logs to see why the window cascade isn't shifting by the
height of a titlebar. `cascade_offset` appears to be changing values in
an inconsistent way and I haven't yet figured out what I'm doing wrong.
|
|
When creating a new document with Apple-N, try to cascade the new window
so that it opens a bit below and to the right of the previous window.
Store the previous window origin in a static variable for a relative
reference point.
Currently this seems to cascade, but not by a full titlebar height and
corresponding horizontal position. Needs some adjustment.
|
|
Add a "Your document contents here" label to the center of the
NSDocument window similar to the one that Xcode's document-based app
template.
Took inspiration from this Stack Overflow answer to get the center point
of the window's content view:
https://stackoverflow.com/questions/6560842/getting-the-center-point-of-an-nsview/14811056#14811056
|
|
Add the basic necessities for a document-based application. This is what
I came up with on 2023-09-10. The `DocumentWindowController` was just an
initial idea and doesn't do anything: we create the required window
controller in `Document`.
The `CFBundleDocumentTypes` entry enables us to interact with text
files.
This confirms that the "Open Recent" menu does get added automatically
below the "Open" menu.
|