Checking in ITKit changes of late
authorMatthew Judy <mjudy@ithinksw.com>
Mon, 14 Jul 2003 07:33:44 +0000 (07:33 +0000)
committerMatthew Judy <mjudy@ithinksw.com>
Mon, 14 Jul 2003 07:33:44 +0000 (07:33 +0000)
Graphics/ITLEDBase.tiff [new file with mode: 0755]
Graphics/ITLEDBulb.tiff [new file with mode: 0755]
Graphics/ITLEDShine.tiff [new file with mode: 0755]
ITKit.h
ITLED.h [new file with mode: 0755]
ITLED.m [new file with mode: 0755]
Showcase/English.lproj/MainMenu.nib/classes.nib
Showcase/English.lproj/MainMenu.nib/info.nib
Showcase/English.lproj/MainMenu.nib/keyedobjects.nib

diff --git a/Graphics/ITLEDBase.tiff b/Graphics/ITLEDBase.tiff
new file mode 100755 (executable)
index 0000000..1dfb4c1
Binary files /dev/null and b/Graphics/ITLEDBase.tiff differ
diff --git a/Graphics/ITLEDBulb.tiff b/Graphics/ITLEDBulb.tiff
new file mode 100755 (executable)
index 0000000..dc8d6ed
Binary files /dev/null and b/Graphics/ITLEDBulb.tiff differ
diff --git a/Graphics/ITLEDShine.tiff b/Graphics/ITLEDShine.tiff
new file mode 100755 (executable)
index 0000000..accca00
Binary files /dev/null and b/Graphics/ITLEDShine.tiff differ
diff --git a/ITKit.h b/ITKit.h
index ca9c5dc..5b8f165 100755 (executable)
--- a/ITKit.h
+++ b/ITKit.h
@@ -19,5 +19,6 @@
 #import <ITKit/ITBevelView.h>
 #import <ITKit/ITTextField.h>
 #import <ITKit/ITTransientStatusWindow.h>
+#import <ITKit/ITLED.h>
 
 #import <ITKit/ITCategory-NSView.h>
diff --git a/ITLED.h b/ITLED.h
new file mode 100755 (executable)
index 0000000..5b3bcf2
--- /dev/null
+++ b/ITLED.h
@@ -0,0 +1,39 @@
+/*
+ *     ITKit
+ *  ITLED
+ *    NSButton subclass which resembles an LED, suitable for use
+ *    in applications which utilize the Metal or Pro look.
+ *
+ *  Original Author : Matt Judy <mjudy@ithinksw.com>
+ *   Responsibility : Matt Judy <mjudy@ithinksw.com>
+ *
+ *  Copyright (c) 2002 - 2003 iThink Software.
+ *  All Rights Reserved
+ *
+ */
+
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface ITLEDCell : NSActionCell {
+
+    NSColor *_ledColor;
+    BOOL     _state;
+
+}
+
+- (NSColor *)ledColor;
+- (void)setLEDColor:(NSColor *)newColor;
+
+@end
+
+
+@interface ITLED : NSControl {
+
+}
+
+- (NSColor *)ledColor;
+- (void)setLEDColor;
+
+@end
diff --git a/ITLED.m b/ITLED.m
new file mode 100755 (executable)
index 0000000..3ceb5ac
--- /dev/null
+++ b/ITLED.m
@@ -0,0 +1,101 @@
+#import "ITLED.h"
+
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark CELL IMPLEMENTATION
+/*************************************************************************/
+
+@implementation ITLEDCell
+
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark CELL INITIALIZATION METHODS
+/*************************************************************************/
+
+- (id)init {
+    if ( (self = [super init]) ) {
+        _ledColor = [[NSColor greenColor] retain];
+    }
+    return self;
+}
+
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark CELL INSTANCE METHODS
+/*************************************************************************/
+
+- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
+{
+    [[NSColor greenColor] set];
+    NSRectFill(cellFrame);
+}
+
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark CELL DEALLOCATION METHODS
+/*************************************************************************/
+
+- (void)dealloc {
+    [super dealloc];
+    [_ledColor release];
+}
+
+
+@end
+
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark CONTROL IMPLEMENTATION
+/*************************************************************************/
+
+@implementation ITLED
+
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark CONTROL INITIALIZATION METHODS
+/*************************************************************************/
+
++ (void)initialize {
+    if (self == [ITLED class]) {
+        [self setCellClass: [ITLEDCell class]];
+    }
+}
+
++ (Class)cellClass {
+    return [ITLEDCell class];
+}
+
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark CONTROL INSTANCE METHODS
+/*************************************************************************/
+
+- (NSColor *)ledColor
+{
+    return [[self cell] ledColor];
+}
+
+- (void)setLEDColor:(NSColor *)newColor
+{
+    [[self cell] setLEDColor:newColor];
+}
+
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark CONTROL DEALLOCATION METHODS
+/*************************************************************************/
+
+- (void)dealloc {
+    [super dealloc];
+}
+
+
+@end
index e76b9cf..c1ffceb 100755 (executable)
         }, 
         {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
         {CLASS = ITBevelView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, 
-        {
-            ACTIONS = {start = id; stop = id; }; 
-            CLASS = ITChasingArrowsView; 
-            LANGUAGE = ObjC; 
-            SUPERCLASS = NSView; 
-        }, 
+        {CLASS = ITLED; LANGUAGE = ObjC; SUPERCLASS = NSControl; }, 
+        {CLASS = ITLEDCell; LANGUAGE = ObjC; SUPERCLASS = NSActionCell; }, 
         {CLASS = ITTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; }, 
         {CLASS = ITTextField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; }
     ); 
index 3e992c5..206ddc1 100755 (executable)
@@ -3,11 +3,11 @@
 <plist version="1.0">
 <dict>
        <key>IBDocumentLocation</key>
-       <string>197 65 497 330 0 0 1056 770 </string>
+       <string>10 19 496 240 0 0 1056 770 </string>
        <key>IBEditorPositions</key>
        <dict>
                <key>197</key>
-               <string>69 252 75 120 0 0 1056 770 </string>
+               <string>103 21 153 120 0 0 1056 770 </string>
                <key>29</key>
                <string>1 271 349 44 0 0 1056 770 </string>
        </dict>
@@ -19,6 +19,6 @@
                <integer>21</integer>
        </array>
        <key>IBSystem Version</key>
-       <string>6L28</string>
+       <string>6L60</string>
 </dict>
 </plist>
index 70ac257..e339f7a 100755 (executable)
Binary files a/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib and b/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib differ