How to show "unsaved" bullet in native macOS title bar?

#1

I have a DocumentWindow with a native title bar that manages a FileBasedDocument.

Apple’s Human Interface Guidelines (link) say that, if AutoSave isn’t available (it isn’t in my app), then a window with unsaved changes should show a “bullet” symbol in its native title bar. Like this:

36

It’s simple enough to make the window listen to document changes.

However, I cannot figure out how to make JUCE show the actual bullet, and I cannot find anything on Google or this forum on that topic.

Please help!

Thanks,
Timur

0 Likes

#2

I believe you want to use juce::ComponentPeer::setDocumentEditedStatus()

3 Likes

#3

Brilliant, thank you! This works perfectly. Somehow I was unable to find it.

1 Like

#4

I feel like there is a ton of stuff in ComponentPeer that is just never discussed on the forum, doesn’t have good documentation, isn’t used in any of the demos, and is the key to making apps appear REAAAALLY polished. setDocumentEditedStatus() being one of those things…

3 Likes