michael@0: michael@0: /* michael@0: * Copyright 2011 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #import michael@0: #import "SkNSView.h" michael@0: #import "SkOSMenu.h" michael@0: #import "SkEvent.h" michael@0: @interface SkOptionItem : NSObject { michael@0: NSCell* fCell; michael@0: const SkOSMenu::Item* fItem; michael@0: } michael@0: @property (nonatomic, assign) const SkOSMenu::Item* fItem; michael@0: @property (nonatomic, retain) NSCell* fCell; michael@0: @end michael@0: michael@0: @interface SkOptionsTableView : NSTableView { michael@0: NSMutableArray* fItems; michael@0: const SkTDArray* fMenus; michael@0: BOOL fShowKeys; michael@0: } michael@0: @property (nonatomic, retain) NSMutableArray* fItems; michael@0: michael@0: - (void)registerMenus:(const SkTDArray*)menus; michael@0: - (void)updateMenu:(const SkOSMenu*)menu; michael@0: - (void)loadMenu:(const SkOSMenu*)menu; michael@0: - (IBAction)toggleKeyEquivalents:(id)sender; michael@0: michael@0: - (NSCell*)createAction; michael@0: - (NSCell*)createList:(NSArray*)items current:(int)index; michael@0: - (NSCell*)createSlider:(float)value min:(float)min max:(float)max; michael@0: - (NSCell*)createSwitch:(BOOL)state; michael@0: - (NSCell*)createTextField:(NSString*)placeHolder; michael@0: - (NSCell*)createTriState:(NSCellStateValue)state; michael@0: michael@0: @end