summaryrefslogtreecommitdiff
path: root/src/osx/MultiCombo.m
diff options
context:
space:
mode:
authorrandomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64>2012-01-06 13:44:40 +0000
committerrandomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64>2012-01-06 13:44:40 +0000
commit2ed61cfb3ad3d404b9a44bbb3f4c8083b469ae22 (patch)
tree9939c67d95720a330bd7b884363d801cc7d5811d /src/osx/MultiCombo.m
Move everything into trunk.
Also add branches and tags directories. git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@348 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
Diffstat (limited to 'src/osx/MultiCombo.m')
-rw-r--r--src/osx/MultiCombo.m38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/osx/MultiCombo.m b/src/osx/MultiCombo.m
new file mode 100644
index 0000000..8930460
--- /dev/null
+++ b/src/osx/MultiCombo.m
@@ -0,0 +1,38 @@
+//
+// MultiCombo.m
+// TikZiT
+//
+// Created by Aleks Kissinger on 21/04/2011.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "MultiCombo.h"
+
+
+@implementation MultiCombo
+
+- (void)textDidChange:(NSNotification *)notification {
+ [super textDidChange:notification];
+ [self setMulti:NO];
+}
+
+- (void)setMulti:(BOOL)m {
+ multi = m;
+ if (multi) {
+ [self setTextColor:[NSColor grayColor]];
+ [self setStringValue:@"multiple values"];
+ }
+}
+
+- (BOOL)multi { return multi; }
+
+- (BOOL)becomeFirstResponder {
+ [super becomeFirstResponder];
+ if ([self multi]) {
+ [self setTextColor:[NSColor blackColor]];
+ [self setStringValue:@""];
+ }
+ return YES;
+}
+
+@end