Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create a 'source list' on Mac OS X?

Tags:

macos

The Apple guidelines talk about using a source list - how do I create this source list, either in Carbon or Cocoa? Is there an official API somewhere for this component?

like image 483
Mark Avatar asked Jun 06 '09 23:06

Mark


People also ask

How do you create an input source on a Mac?

To open this pane, choose Apple menu > System Preferences, click Keyboard , then click Input Sources. The input sources that have been enabled for use. Add or remove an input source from the list. If the selected input source provides preferences, they appear in the area on the right.

What are input sources Mac?

On your Mac, use the Input Sources pane of Keyboard System Preferences to add input sources that allow you to type in other languages, and change options for specific sources. When you use an input source, you can type in any language that uses the same script or alphabet. Learn how to use input sources.

Is Apple OSX open source?

Apple announced open sourcing its Swift programming language last year. Now it has shocked the world by announcing that it is going to open source its flagship Mac OS X operating system.

What is ABC input source on Mac?

ABC is just the same as US but you don't have an American flag. Some users outside the US may find that preferable. ABC-Extended (formerly called US Extended) is much like US or ABC, but it lets you type a whole lot more accented characters via option key shortcuts.


1 Answers

A source list in Cocoa is just an NSOutlineView configured in a particular way. You can drag one out in Interface Builder and set the highlight mode to Source List. You'll probably also want to turn off the header row, change it to a single column, and change the visible scrollbars on the enclosing NSScrollView.

You'll also need to implement the delegate method to determine which rows should be the "Group Rows":

- (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item

Apple provided sample code http://developer.apple.com/samplecode/SourceView demonstrates how to build a fully featured source list.

like image 90
Joey Hagedorn Avatar answered Oct 25 '22 01:10

Joey Hagedorn