|
1 |
|
2 /* |
|
3 * Copyright 2011 Google Inc. |
|
4 * |
|
5 * Use of this source code is governed by a BSD-style license that can be |
|
6 * found in the LICENSE file. |
|
7 */ |
|
8 |
|
9 #import <Cocoa/Cocoa.h> |
|
10 #import "SkNSView.h" |
|
11 #import "SkOSMenu.h" |
|
12 #import "SkEvent.h" |
|
13 @interface SkOptionItem : NSObject { |
|
14 NSCell* fCell; |
|
15 const SkOSMenu::Item* fItem; |
|
16 } |
|
17 @property (nonatomic, assign) const SkOSMenu::Item* fItem; |
|
18 @property (nonatomic, retain) NSCell* fCell; |
|
19 @end |
|
20 |
|
21 @interface SkOptionsTableView : NSTableView <SkNSViewOptionsDelegate, NSTableViewDelegate, NSTableViewDataSource> { |
|
22 NSMutableArray* fItems; |
|
23 const SkTDArray<SkOSMenu*>* fMenus; |
|
24 BOOL fShowKeys; |
|
25 } |
|
26 @property (nonatomic, retain) NSMutableArray* fItems; |
|
27 |
|
28 - (void)registerMenus:(const SkTDArray<SkOSMenu*>*)menus; |
|
29 - (void)updateMenu:(const SkOSMenu*)menu; |
|
30 - (void)loadMenu:(const SkOSMenu*)menu; |
|
31 - (IBAction)toggleKeyEquivalents:(id)sender; |
|
32 |
|
33 - (NSCell*)createAction; |
|
34 - (NSCell*)createList:(NSArray*)items current:(int)index; |
|
35 - (NSCell*)createSlider:(float)value min:(float)min max:(float)max; |
|
36 - (NSCell*)createSwitch:(BOOL)state; |
|
37 - (NSCell*)createTextField:(NSString*)placeHolder; |
|
38 - (NSCell*)createTriState:(NSCellStateValue)state; |
|
39 |
|
40 @end |