General OS X Questions

Hi,
I have a couple of questions which I thought you guys may be able to help me with:

  1. What font does OS X use for buttons, text areas etc?

  2. Is it possible to somehow tap in to the icons used by OS X - for example the print icon, folder icon etc? Or do I need to make my own?

  3. I am looking for a SourceList Control - any idea which is the best to use?

Thank you all in advance.

  1. The OS X font is Lucida Grande. However, in Xojo you can simply use “System” as the font (and 0 as the size) to get the system-defined font and size for each control.

  2. Yes. MacOSLib is one way to do this. I believe the MBS plugin has functions for this as well. I’m sure there are others.

  3. They exist, but I have no specific recommendations.

I’m quite partial to FGSourceList and have found it easy enough to modify as I need.

Also for your reference, OS X Human Interface Guidelines: System-Provided Icons
And the whole list: NSImage Class Reference: System Entity Images

Thank you Scott and Tim,
I looked at the OS X HIG, but had no idea how to tap into them via XOJO, until you just recommended MacOSLib or MBS plugins.

Thanks.

There is a third way. When you get info for a document, select the icon on the top left corner and copy it (Right click/copy, Edit/Copy, Command-C). Then you can paste the icon in a graphics program and you have your icon material.

For icons from other programs, use Command-shift-4 to capture them.

Thanks Michel,
The icons I was referring to though were icons which are used in toolbars etc (as opposed to app icons).

Thanks.

All the icons like this one : can be obtained from these links :

[quote=82918:@Tim Parnell]Also for your reference, OS X Human Interface Guidelines: System-Provided Icons
And the whole list: NSImage Class Reference: System Entity Images [/quote]

Go to the page, right click on the icon, and select Save image as…

You may need to resize them in an image editing program according to their use : menu, toolbar, etc.

Then you can drag it into your project and use it without additional tool.

Another approach is to use icons from one of the free collections available. For instance one of the 3800 included in
http://www.fatcow.com/free-icons

Thanks Michel,
I was just a bit cautious as to right-clicking and using the Apple images, due to any possible copyright infringements.

[quote=83010:@Richard Summers]Thanks Michel,
I was just a bit cautious as to right-clicking and using the Apple images, due to any possible copyright infringements.[/quote]

Then go to the fatcow collection. It is quite extensive and often beautiful.

But I suppose if Apple provides a collection of icons through their framework and recommend them to be employed in their guidelines, using them for Mac OS programs is expected.

I agree - one would expect that is ok to use the Apple images, but I will need to somehow find out for sure, as I do not want any unexpected surprises :frowning:

Wasn’t going to post this earlier, but now that you’ve asked.

Michel’s way is not the way to go.
First, the images in the documentation are shrunk. You’d have to upscale them if you right-click > save. Ick.
Second, the Apple images are for use within the Mac OS. If you use them in your app, you cannot present them on Windows (there’s legalese somewhere)

The way to present them is using the NSImageName constants. The secondary benefit to the official method is that you’d get the high resolution images automagically.

If you’re doing a Mac only build, I would recommend the NSImageName constants.
Otherwise grab some toolbar icons either from a free set or purchase a set. The only downside to the fatcow icons is there’s no high resolution versions if you’re using them as toolbar icons (32px works as @2x for 16px though, so they’re okay for a SourceList!)

That is evident.

OK Tim. Thanks. Then the question becomes : how does one use the NSImageName constants in Xojo ? Any code to share by any chance ? Anybody help ?

Poking through the macoslib git I see NSImage inside macoslib/Cocoa; so my guess would be in there. Looking even further inside I see them actually. There’s the network icon! So however one uses macoslib, call up Network() to see the network icon.

I haven’t used macoslib yet, so I don’t know how to do this off the top of my head - but I’m sure it’s in the manual somewhere :slight_smile:

Making things up as I go, I’m looking at the examples, it looks like it’s as easy as NSImage.Network which would return the image. (after adding macoslib to your project)

I have not used MacOSLib yet, so I have absolutely no idea how to use it or what it exactly is.
I will now look into it.

Thank you everyone for your input / ideas / recommendations - I am extremely grateful.

In your application it’s fine to use Apple images, however you can’t use them in the application icon or some other marketing related things.

The Retina Kit also has support for getting at the native OS X images http://www.ohanaware.com/retinakit/

Sam,
I was already going to purchase your Retina Kit in the near future :slight_smile:

Do you remember where it stated that they can be used but not as app icons or in marketing?
I would like to take a screenshot of official Apple permission - just as a precautionary measure :slight_smile:

It was a rejection letter from Apple, they rejected one of my applications for having Apple icons in the application icon. I then contacted Apple legal to see if I could gain permission… However it wasn’t granted, so I modified my icon.

I didn’t keep a copy of the letter and iTunes connect (the dashboard for managing apps on the app store) doesn’t seem to allow us access to history,

No problem - thanks anyway.
I will not use any Apple images (just for my own peace of mind).

Will still be getting your Retina Kit, as I need Retina images in my app.

Thank you.

[quote=83071:@Sam Rowlands]In your application it’s fine to use Apple images, however you can’t use them in the application icon or some other marketing related things.
[/quote]

Thank you for clarifying Sam :slight_smile:

[quote=83077:@Richard Summers]I will not use any Apple images (just for my own peace of mind).
[/quote]

Richard, when one of the most competent of us, Sam Rowlands, tells you it is OK to use Apple images, why do you persist on saying that you will not use them ? Sometimes, worse than fear, is fear itself …