aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/CocoaSampleApp/SkOptionsTableView.h
diff options
context:
space:
mode:
authorGravatar yangsu@google.com <yangsu@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-01 17:07:12 +0000
committerGravatar yangsu@google.com <yangsu@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-01 17:07:12 +0000
commit12d177d1f3b61851c782930d5bd7cce80525deb3 (patch)
tree672f2e6a91feacc06754ade37cf0ff52b47052d9 /experimental/CocoaSampleApp/SkOptionsTableView.h
parentdea2f8d86378b791a2de94384a18e29f13f65a3e (diff)
Cocoa SampleApp files
Diffstat (limited to 'experimental/CocoaSampleApp/SkOptionsTableView.h')
-rw-r--r--experimental/CocoaSampleApp/SkOptionsTableView.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/experimental/CocoaSampleApp/SkOptionsTableView.h b/experimental/CocoaSampleApp/SkOptionsTableView.h
new file mode 100644
index 0000000000..d9e77e280a
--- /dev/null
+++ b/experimental/CocoaSampleApp/SkOptionsTableView.h
@@ -0,0 +1,31 @@
+#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;
+}
+@property (nonatomic, retain) NSMutableArray* fItems;
+
+- (void)registerMenus:(const SkTDArray<SkOSMenu*>*)menus;
+- (void)updateMenu:(const SkOSMenu*)menu;
+- (void)loadMenu:(const SkOSMenu*)menu;
+
+- (NSCell*)createAction;
+- (NSCell*)createList:(NSArray*)items current:(int)index;
+- (NSCell*)createSegmented:(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