On Oct 18, 2013, at 4:49 AM, Alexander Scherbatiy 
<[email protected]> wrote:

>  Hello,
> 
>  The GetIconRef method is used in the CImage.m now to get the system icons on 
> MacOSX.
> 
>  The NSImage + (id)imageNamed:(NSString *)name method can be used directly 
> instead.
> 
>  There are NSImageNameFolder, NSImageNameFolderBurnable, and 
> NSImageNameFolderSmart constants but I can't find
>  the constant for the open folder icon.
> https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSImage_Class/Reference/Reference.html#//apple_ref/doc/constant_group/Toolbar_Named_Images
> 
>  The same is for the alert stop system icon. There are NSImageNameInfo and 
> NSImageNameCaution icons but I can't find
>  the constant for the alert stop icon.
> 
>  Where is it possible to get the open folder and stop icons that are defined 
> as kOpenFolderIcon and kAlertStopIcon for the GetIconRef method?

There are no corresponding constants for +[NSImage imageNamed:], however you 
can use the same constants you pass into GetIconRef(), and send them into:
[[NSWorkspace sharedWorkspace] iconForFileType: 
NSFileTypeForHFSTypeCode(kOpenFolderIcon)]

Regards,
Mike Swingler
Apple Inc.

Reply via email to