System Status Icons?

Hi,
Sometimes apps display a small red or green dot (icon) in the OS X Status Bar. Does anyone know if these are default OS icons which developers are allowed to access, or is that just wishful thinking?

I think they are called status icons?

I am trying to put either a small red or green dot icon in my PopupMenu, and was wondering if there were some kind of system icon which could be used.

Thanks in advance.

“NSStatusAvailable” & “NSStatusNone” ( green and grey in Yosemite)

see more here NSStatusImages

Thanks Axel.

Axel

Where do I find a list of all the available OS X images?

Simon.

Simon you can find quite a few listed in the interface building section of Xcode.

There’s also some reference in the Apple developer docs about System Provided Images. The more you dig through the docs, the more of the native names you’ll find.

The actual images themselves can be extracted from various locations. The status dots aren’t actually in CoreServices, I extracted them from iChat at one point. You can find a lot of useful images in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources

Pro-Tip
If you navigate to /System/Library/CoreServices/ in the Finder first, you’ll sort of unlock the ability to Spotlight search for things like Network Utility.app and Screen Sharing.app which is pretty nifty.

[quote=191296:@Tim Parnell]Simon you can find quite a few listed in the interface building section of Xcode.

There’s also some reference in the Apple developer docs about System Provided Images. The more you dig through the docs, the more of the native names you’ll find.

The actual images themselves can be extracted from various locations. The status dots aren’t actually in CoreServices, I extracted them from iChat at one point. You can find a lot of useful images in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources

Pro-Tip
If you navigate to /System/Library/CoreServices/ in the Finder first, you’ll sort of unlock the ability to Spotlight search for things like Network Utility.app and Screen Sharing.app which is pretty nifty.[/quote]

I highly recommend against relying on the location of files on disk or, worse, bundling them with your application.

If you recommend against bundling them in, how would you recommend using them? Xojo doesn’t provide us easy access to the NSImageName* and Windows doesn’t even have any kind of way to handle that should one whip up a declare.

#if TargetCocoa ' use the system icons #else ' use custom icons for the platform (Windows or Linux) #end if

I think I wrote a class or module that should give you access to almost all of the Mac OS X icons… Will post later tonight…

Support for standard system images would make for a decent feature request, though I’m not sure if there’s much of a common subset between platforms.

I added the XFIcons module to XF Classes web page… Usage should be simple enough… Width and height defaults to 32 pixels…

All examples are in the Paint event of a canvas…

Show the Info icon using the default width and height

g.DrawPicture XFIcons.Info, 0, 0, 32, 32

Show the info icon at 512 pixels

g.DrawPicture XFIcons.Info(512, 512), 0, 0, 512, 512

There are many more system icons that are available for use, but you can also show an icon based on a file type or UTI…

Show PNG file icon using the file type and using the default size

g.DrawPicture XFIcons.FromFileType("png"), 0, 0, 32, 32

Show HTML file icon using the UTI and using a size of 128

g.DrawPicture XFIcons.FromFileType("public.html", 128, 128), 0, 0, 128, 128

And finally, you can load the contents of an image file and display it

DIM path As NEW FolderItem("/Library/Desktop\\ Pictures/Abstract.jpg", FolderItem.PathTypeShell) g.DrawPicture XFIcons.FromFolderItem(path, 512, 512), 0, 0, 512, 512

In Windows the common way is the fonts Windings/WebDings, and starting with Windows 8, SegoeUI Symbol. I have no idea about Linux.

[quote=191324:@shao sean]I added the XFIcons module to XF Classes web page… Usage should be simple enough… Width and height defaults to 32 pixels…

All examples are in the Paint event of a canvas…

Show the Info icon using the default width and height

g.DrawPicture XFIcons.Info, 0, 0, 32, 32

Show the info icon at 512 pixels

g.DrawPicture XFIcons.Info(512, 512), 0, 0, 512, 512

There are many more system icons that are available for use, but you can also show an icon based on a file type or UTI…

Show PNG file icon using the file type and using the default size

g.DrawPicture XFIcons.FromFileType("png"), 0, 0, 32, 32

Show HTML file icon using the UTI and using a size of 128

g.DrawPicture XFIcons.FromFileType("public.html", 128, 128), 0, 0, 128, 128

And finally, you can load the contents of an image file and display it

DIM path As NEW FolderItem("/Library/Desktop\\ Pictures/Abstract.jpg", FolderItem.PathTypeShell) g.DrawPicture XFIcons.FromFolderItem(path, 512, 512), 0, 0, 512, 512[/quote]
Thank you, perfect!

Simon.

[quote=191288:@Simon Berridge]Axel
Where do I find a list of all the available OS X images?
Simon.[/quote]

here
in pm.Open is the list

Is it really permitted for developers to use these icons in their apps?
I can’t seem to find any statement from Apple which confirms this?

Would be nice to know if there was a list of all images made by Apple, which are made available for developers to use freely.

Thanks.

Thank you, Axel, most appreciated.

I echo Richard’s words. Are we allowed to use these?

I believe you’re allowed to use them by NSImageName, but not by copying them in to resources. But that’s the easiest way to do it with Xojo.

Looked on the developer site, but cannot find any official confirmation?

https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/SystemProvided.html

Thanks Michel - that makes things a lot clearer.

Hello,
after downloading https://xojo.io/c96a9c68b984 (from Alex, above), I cannot decompress it. The decompressed file turns out to be another compressed file, and so on and so forth.
Does anybody know how to get the root-file?
Thanks.