productRefGroup = 034768DFFF38A50411DB9C8B;
projectDirPath = "";
targets = (
- 8DC2EF4F0486A6940098B216,
7C992F86054F5389000B93EA,
+ 8DC2EF4F0486A6940098B216,
);
};
0867D691FE84028FC02AAC07 = {
8DC2EF5A0486A6940098B216,
089C1666FE841158C02AAC07,
2A30D8BC056B3C5D0087AE54,
- 2A30D89A056B3B5C0087AE54,
- 7C992E3E054F5246000B93EA,
2A30D899056B3B390087AE54,
+ 7C992E3E054F5246000B93EA,
+ 2A30D89A056B3B5C0087AE54,
);
isa = PBXGroup;
name = Resources;
7C992F96054F53F7000B93EA,
7C992F9B054F547C000B93EA,
7C993057054F6832000B93EA,
- 7C992DC9054F5179000B93EA,
- 7C992DCA054F5179000B93EA,
- 7C992DD8054F5179000B93EA,
- 7C992DD9054F5179000B93EA,
+ 2AAF7B22056C3536009B9225,
7C992DED054F5179000B93EA,
7C992DEE054F5179000B93EA,
- 7C992DEF054F5179000B93EA,
- 7C992DF0054F5179000B93EA,
- 7C992DF1054F5179000B93EA,
- 7C992DF2054F5179000B93EA,
- 7C992DF3054F5179000B93EA,
- 7C992DF4054F5179000B93EA,
);
isa = PBXGroup;
name = Classes;
2A30D8A1056B3BE30087AE54,
);
isa = PBXGroup;
- name = HotKeys;
+ name = "Hot Keys";
refType = 4;
sourceTree = "<group>";
};
refType = 4;
sourceTree = "<group>";
};
+ 2AAF7B22056C3536009B9225 = {
+ children = (
+ 7C992DC9054F5179000B93EA,
+ 7C992DCA054F5179000B93EA,
+ 7C992DEF054F5179000B93EA,
+ 7C992DF0054F5179000B93EA,
+ 7C992DF1054F5179000B93EA,
+ 7C992DF2054F5179000B93EA,
+ 7C992DF3054F5179000B93EA,
+ 7C992DF4054F5179000B93EA,
+ );
+ isa = PBXGroup;
+ name = Views;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 2AC82794056C3AA000A7D7E2 = {
+ fileRef = 1058C7B1FEA5585E11CA2CBB;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 2AC8297F056C451900A7D7E2 = {
+ containerPortal = 0867D690FE84028FC02AAC07;
+ isa = PBXContainerItemProxy;
+ proxyType = 1;
+ remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
+ remoteInfo = ITKit;
+ };
+ 2AC82980056C451900A7D7E2 = {
+ isa = PBXTargetDependency;
+ target = 8DC2EF4F0486A6940098B216;
+ targetProxy = 2AC8297F056C451900A7D7E2;
+ };
//2A0
//2A1
//2A2
buildActionMask = 2147483647;
files = (
7C5B7C93054F6EC9008379B6,
+ 2AC82794056C3AA000A7D7E2,
);
isa = PBXFrameworksBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
buildRules = (
);
buildSettings = {
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREFIX_HEADER = "";
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = "ITKitShowcase-Info.plist";
WARNING_CFLAGS = "-Wmost";
};
dependencies = (
+ 2AC82980056C451900A7D7E2,
);
isa = PBXNativeTarget;
name = ITKitShowcase;
children = (
7C992DF9054F5179000B93EA,
7C992DFA054F5179000B93EA,
- 7C992DFB054F5179000B93EA,
- 7C992DFC054F5179000B93EA,
+ 7C992DD8054F5179000B93EA,
+ 7C992DD9054F5179000B93EA,
7C99305B054F687D000B93EA,
);
isa = PBXGroup;
};
7C99305B054F687D000B93EA = {
children = (
+ 7C992DFB054F5179000B93EA,
+ 7C992DFC054F5179000B93EA,
7C992DD4054F5179000B93EA,
7C992DD5054F5179000B93EA,
7C992DD6054F5179000B93EA,
#import <Cocoa/Cocoa.h>
+typedef enum _ITTSWBackgroundMode {
+ ITTSWBackgroundApple,
+ ITTSWBackgroundReadable,
+ ITTSWBackgroundColored
+} ITTSWBackgroundMode;
+
+
@interface ITTSWBackgroundView : NSView {
- NSBezierPath *_path;
+ NSBezierPath *_path;
+ NSColor *_color;
+ ITTSWBackgroundMode _mode;
}
+- (ITTSWBackgroundMode)backgroundMode;
+- (void)setBackgroundMode:(ITTSWBackgroundMode)newMode;
+
+- (NSColor *)backgroundColor;
+- (void)setBackgroundColor:(NSColor *)newColor;
+
@end
#import "ITTSWBackgroundView.h"
+#define RADIUS 24.0
+
+
+@interface ITTSWBackgroundView (Private)
+@end
+
+
@implementation ITTSWBackgroundView
+
- (id)initWithFrame:(NSRect)frameRect
{
if ( (self = [super initWithFrame:frameRect]) ) {
- _path = [[NSBezierPath bezierPath] retain];
+ _path = [[NSBezierPath bezierPath] retain];
+ _color = [[NSColor blueColor] retain];
+ _mode = ITTSWBackgroundApple;
}
return self;
}
-- (void)drawRect:(NSRect)theRect
+- (void)drawRect:(NSRect)rect
{
- float vh = NSHeight(theRect);
- float vw = NSWidth(theRect);
+ float vh = NSHeight(rect);
+ float vw = NSWidth(rect);
+ float indent = 0.0;
+
+ if ( (_mode == ITTSWBackgroundReadable) || (_mode == ITTSWBackgroundColored) ) {
+ indent = 2.0;
+ }
+
+ NSPoint pointA = NSMakePoint( ((vw - RADIUS) - indent) , (vh - indent) );
+ NSPoint pointB = NSMakePoint( (RADIUS + indent) , (vh - indent) );
+ NSPoint pointD = NSMakePoint( indent , (RADIUS + indent) );
+ NSPoint pointF = NSMakePoint( ((vw - RADIUS) - indent) , indent );
+ NSPoint pointH = NSMakePoint( (vw - indent) , ((vh - RADIUS) - indent) );
- NSPoint pointA = NSMakePoint( 24.0 , 0.0 );
-// NSPoint pointB = NSMakePoint( 0.0 , 24.0 ); reference
- NSPoint pointC = NSMakePoint( 0.0 , (vh - 24.0) );
-// NSPoint pointD = NSMakePoint( 24.0 , vh ); reference
- NSPoint pointE = NSMakePoint( (vw - 24.0) , vh );
-// NSPoint pointF = NSMakePoint( vw , (vh - 24.0) ); reference
- NSPoint pointG = NSMakePoint( vw , 24.0 );
-// NSPoint pointH = NSMakePoint( (vw - 24.0) , 0.0 ); reference
-
- NSPoint ctrAB = NSMakePoint( 24.0 , 24.0 );
- NSPoint ctrCD = NSMakePoint( 24.0 , (vh - 24.0) );
- NSPoint ctrEF = NSMakePoint( (vw - 24.0) , (vh - 24.0) );
- NSPoint ctrGH = NSMakePoint( (vw - 24.0) , 24.0 );
+ NSPoint ctrBC = NSMakePoint( (RADIUS + indent) , ((vh - RADIUS) - indent) );
+ NSPoint ctrDE = NSMakePoint( (RADIUS + indent) , (RADIUS + indent) );
+ NSPoint ctrFG = NSMakePoint( ((vw - RADIUS) - indent) , (RADIUS + indent) );
+ NSPoint ctrHA = NSMakePoint( ((vw - RADIUS) - indent) , ((vh - RADIUS) - indent) );
/*
* D E
* A H
*/
- [_path autorelease];
- _path = [[NSBezierPath bezierPath] retain];
-
+ [_path removeAllPoints];
+
[_path moveToPoint:pointA]; // first point
- [_path appendBezierPathWithArcWithCenter:ctrAB // bottom-left curve
- radius:24.0
+ [_path lineToPoint:pointB]; // top line
+ [_path appendBezierPathWithArcWithCenter:ctrBC // top-left curve
+ radius:RADIUS
startAngle:90.0
endAngle:180.0];
- [_path lineToPoint:pointC]; // left line
- [_path appendBezierPathWithArcWithCenter:ctrCD // top-left curve
- radius:24.0
+ [_path lineToPoint:pointD]; // left line
+ [_path appendBezierPathWithArcWithCenter:ctrDE // bottom-left curve
+ radius:RADIUS
startAngle:180.0
endAngle:270.0];
- [_path lineToPoint:pointE]; // top line
- [_path appendBezierPathWithArcWithCenter:ctrEF // top-right curve
- radius:24.0
+ [_path lineToPoint:pointF]; // top line
+ [_path appendBezierPathWithArcWithCenter:ctrFG // top-right curve
+ radius:RADIUS
startAngle:270.0
endAngle:0.0];
- [_path lineToPoint:pointG]; // right line
- [_path appendBezierPathWithArcWithCenter:ctrGH // bottom-right curve
- radius:24.0
+ [_path lineToPoint:pointH]; // right line
+ [_path appendBezierPathWithArcWithCenter:ctrHA // bottom-right curve
+ radius:RADIUS
startAngle:0.0
endAngle:90.0];
- [_path lineToPoint:pointA]; // right line
+
+ if ( _mode == ITTSWBackgroundApple ) {
+ [[NSColor colorWithCalibratedWhite:0.0 alpha:0.15] set];
+ } else if ( _mode == ITTSWBackgroundReadable ) {
+ [[NSColor colorWithCalibratedWhite:0.15 alpha:0.70] set];
+ } else if ( _mode == ITTSWBackgroundColored ) {
+ [_color set];
+ }
- [[NSColor colorWithCalibratedWhite:0.0 alpha:0.15] set];
[_path fill];
+
+ if ( (_mode == ITTSWBackgroundReadable) || (_mode == ITTSWBackgroundColored) ) {
+ [[NSColor colorWithCalibratedWhite:0.90 alpha:1.00] set];
+ [_path setLineWidth:3.0];
+ [_path stroke];
+ }
}
- (BOOL)isOpaque
return NO;
}
+- (ITTSWBackgroundMode)backgroundMode
+{
+ return _mode;
+}
+
+- (void)setBackgroundMode:(ITTSWBackgroundMode)newMode
+{
+ _mode = newMode;
+ [self setNeedsDisplay:YES];
+}
+
+- (NSColor *)backgroundColor
+{
+ return _color;
+}
+
+- (void)setBackgroundColor:(NSColor *)newColor
+{
+ [_color autorelease];
+ _color = [newColor copy];
+ [self setNeedsDisplay:YES];
+}
+
+
@end
shadowAmbient = 0.15;
shadowHeight = 1.00;
shadowRadius = 4.00;
- shadowSaturation = 1.2;
+ shadowSaturation = 1.0;
}
return self;
IBOutlet NSPopUpButton *swDefinedPositionPopup;
IBOutlet NSTextField *swVanishDelay;
IBOutlet NSTextField *swShadowSaturation;
- IBOutlet NSSlider *swSpeedSlider;
+ IBOutlet NSSlider *swEntrySpeedSlider;
+ IBOutlet NSSlider *swExitSpeedSlider;
}
// ITStatusItem Support
#import "Controller.h"
#import "ITTransientStatusWindow.h"
+#import "ITTSWBackgroundView.h"
#import "ITTextField.h"
#import "ITBevelView.h"
#import "ITCutWindowEffect.h"
statusWindow = [ITTransientStatusWindow sharedWindow];
[statusWindow setEntryEffect:[[ITCutWindowEffect alloc] initWithWindow:statusWindow]];
[statusWindow setExitEffect:[[ITDissolveWindowEffect alloc] initWithWindow:statusWindow]];
- [[statusWindow entryEffect] setEffectTime:[swSpeedSlider floatValue]];
- [[statusWindow exitEffect] setEffectTime:[swSpeedSlider floatValue]];
+ [[statusWindow entryEffect] setEffectTime:[swEntrySpeedSlider floatValue]];
+ [[statusWindow exitEffect] setEffectTime:[swExitSpeedSlider floatValue]];
// [tabView setAllowsDragging:YES];
-
+ [[NSColorPanel sharedColorPanel] setShowsAlpha:YES];
}
/*************************************************************************/
[textField setTextColor:[NSColor whiteColor]];
[textField setCastsShadow:YES];
[textField setStringValue:text];
- [textField setShadowSaturation:[swShadowSaturation floatValue]];
[[statusWindow contentView] addSubview:textField];
[[statusWindow contentView] setNeedsDisplay:YES];
[statusWindow setHorizontalPosition:[sender indexOfSelectedItem]];
} else if ( [sender tag] == 3060 ) {
[[statusWindow entryEffect] setEffectTime:[sender floatValue]];
+ } else if ( [sender tag] == 3061 ) {
[[statusWindow exitEffect] setEffectTime:[sender floatValue]];
} else if ( [sender tag] == 3070 ) {
[statusWindow setEntryEffect:[[[ITPivotWindowEffect alloc] initWithWindow:statusWindow] autorelease]];
}
- [[statusWindow entryEffect] setEffectTime:[swSpeedSlider floatValue]];
+ [[statusWindow entryEffect] setEffectTime:[swEntrySpeedSlider floatValue]];
} else if ( [sender tag] == 3080 ) {
[statusWindow setExitEffect:[[ITPivotWindowEffect alloc] initWithWindow:statusWindow]];
}
- [[statusWindow exitEffect] setEffectTime:[swSpeedSlider floatValue]];
+ [[statusWindow exitEffect] setEffectTime:[swExitSpeedSlider floatValue]];
+ } else if ( [sender tag] == 3090 ) {
+
+ if ( [sender indexOfSelectedItem] == 0 ) {
+ [(ITTSWBackgroundView *)[statusWindow contentView] setBackgroundMode:ITTSWBackgroundApple];
+ } else if ( [sender indexOfSelectedItem] == 1 ) {
+ [(ITTSWBackgroundView *)[statusWindow contentView] setBackgroundMode:ITTSWBackgroundReadable];
+ } else if ( [sender indexOfSelectedItem] == 2 ) {
+ [(ITTSWBackgroundView *)[statusWindow contentView] setBackgroundMode:ITTSWBackgroundColored];
+ }
+
+ } else if ( [sender tag] == 3100 ) {
+ [(ITTSWBackgroundView *)[statusWindow contentView] setBackgroundColor:[sender color]];
}
}
statusItemMenu = NSMenu;
swBackgroundTypePopup = NSPopUpButton;
swDefinedPositionPopup = NSPopUpButton;
+ swEntrySpeedSlider = NSSlider;
+ swExitSpeedSlider = NSSlider;
swSampleTextView = NSTextView;
swShadowSaturation = NSTextField;
- swSpeedSlider = NSSlider;
swVanishDelay = NSTextField;
swVanishModePopup = NSPopUpButton;
tabView = ITTabView;
{CLASS = ITBevelView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{CLASS = ITButton; LANGUAGE = ObjC; SUPERCLASS = NSButton; },
{CLASS = ITButtonCell; LANGUAGE = ObjC; SUPERCLASS = NSButtonCell; },
- {CLASS = ITGrayRoundedView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
- {CLASS = ITLED; LANGUAGE = ObjC; SUPERCLASS = NSControl; },
{CLASS = ITLEDCell; LANGUAGE = ObjC; SUPERCLASS = NSActionCell; },
+ {CLASS = ITTSWBackgroundView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{CLASS = ITTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },
{CLASS = ITTextField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; },
{CLASS = ITTextFieldCell; LANGUAGE = ObjC; SUPERCLASS = NSTextFieldCell; }
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>546 7 496 240 0 0 1056 770 </string>
+ <string>52 35 496 240 0 0 1056 770 </string>
<key>IBEditorPositions</key>
<dict>
<key>197</key>
- <string>103 21 153 120 0 0 1056 770 </string>
+ <string>564 424 153 99 0 0 1056 770 </string>
<key>29</key>
<string>1 271 349 44 0 0 1056 770 </string>
</dict>