How can I make a window with same basic structure as the Finder window (a menu/source list to the left with icons that can be organized, and the content in a larger view on the right)?
I think you might be confusing 'left' and 'right'. But I digress.
To create a window with a similar structure you would use, for the icons portion, an NSOutlineView
, if memory serves. You might also be able to use an NSTableView
.
Unless of course I'm misunderstanding your question; in which case you would use for the right part an NSCollectionView
, I suppose. You would still use one of the two mentioned above for the source list on the left side.
To replicate the content view of the Finder, use:
- Icon view: NSCollectionView
- List view: NSOutlineView
- Column view: NSBrowser
- CoverFlow: Custom on top, NSOutlineView (list view) below
You can probably find a third-party open-source implementation of CoverFlow for the Mac with a bit of Googling.
As Williham Totland already mentioned, the way to make a source list (sidebar) is NSOutlineView. There are a few questions here on Stack Overflow about getting it to look more like that.
A toolbar is, of course, NSToolbar.
Apple provides sample code to do exactly what you are trying to achieve:
http://developer.apple.com/mac/library/samplecode/SourceView/
As others have pointed out, it uses an NSOutlineView
for the source list and an NSCollectionView
for the content.