diff options
author | yangsu@google.com <yangsu@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-08-30 14:40:49 +0000 |
---|---|---|
committer | yangsu@google.com <yangsu@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-08-30 14:40:49 +0000 |
commit | a8540416f65b55aadbe68cdef9fece5a23257d5e (patch) | |
tree | 8d2c9362b35ccfda2781c82dd4a21424f7877de3 /src/utils/mac/SkOptionsTableView.h | |
parent | 1d388d7e279fcd9b2afb2a33137a40eddebdf7c8 (diff) |
Switched Mac SampleApp to use Cocoa, removed the seperate CocoaSampleApp, moved dependencies out of experimental
git-svn-id: http://skia.googlecode.com/svn/trunk@2190 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils/mac/SkOptionsTableView.h')
-rw-r--r-- | src/utils/mac/SkOptionsTableView.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/utils/mac/SkOptionsTableView.h b/src/utils/mac/SkOptionsTableView.h new file mode 100644 index 0000000000..33dc29f356 --- /dev/null +++ b/src/utils/mac/SkOptionsTableView.h @@ -0,0 +1,32 @@ +#import <Cocoa/Cocoa.h> +#import "SkNSView.h" +#import "SkOSMenu.h" +#import "SkEvent.h" +@interface SkOptionItem : NSObject { + NSCell* fCell; + const SkOSMenu::Item* fItem; +} +@property (nonatomic, assign) const SkOSMenu::Item* fItem; +@property (nonatomic, retain) NSCell* fCell; +@end + +@interface SkOptionsTableView : NSTableView <SkNSViewOptionsDelegate, NSTableViewDelegate, NSTableViewDataSource> { + NSMutableArray* fItems; + const SkTDArray<SkOSMenu*>* fMenus; + BOOL fShowKeys; +} +@property (nonatomic, retain) NSMutableArray* fItems; + +- (void)registerMenus:(const SkTDArray<SkOSMenu*>*)menus; +- (void)updateMenu:(const SkOSMenu*)menu; +- (void)loadMenu:(const SkOSMenu*)menu; +- (IBAction)toggleKeyEquivalents:(id)sender; + +- (NSCell*)createAction; +- (NSCell*)createList:(NSArray*)items current:(int)index; +- (NSCell*)createSlider:(float)value min:(float)min max:(float)max; +- (NSCell*)createSwitch:(BOOL)state; +- (NSCell*)createTextField:(NSString*)placeHolder; +- (NSCell*)createTriState:(NSCellStateValue)state; + +@end |