From: Matthew Judy Date: Sun, 13 Apr 2003 07:54:31 +0000 (+0000) Subject: Incremental checkin for Status Windows, and correcting a path setting. X-Git-Tag: v0.1~50 X-Git-Url: http://git.ithinksw.org/ITKit.git/commitdiff_plain/956cd3a65d5db0783f21b732aba63316bfb77fbe Incremental checkin for Status Windows, and correcting a path setting. --- diff --git a/ITPivotWindowEffect.m b/ITPivotWindowEffect.m index 52b2858..85b5f50 100755 --- a/ITPivotWindowEffect.m +++ b/ITPivotWindowEffect.m @@ -14,8 +14,7 @@ - (void)performAppear { - // Cast so the compiler won't gripe - [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowAppearingState]; + [self setWindowVisibility:ITTransientStatusWindowAppearingState]; [self setPivot:315.0]; _effectProgress = 0.0; [_window setAlphaValue:0.0]; @@ -29,8 +28,7 @@ - (void)performVanish { - // Cast so the compiler won't gripe - [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowVanishingState]; + [self setWindowVisibility:ITTransientStatusWindowVanishingState]; [self setPivot:0.0]; _effectProgress = 1.0; [_window setAlphaValue:1.0]; @@ -48,8 +46,7 @@ [_window orderOut:self]; [self setPivot:0.0]; [_window setAlphaValue:1.0]; - // Cast so the compiler won't gripe - [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowHiddenState]; + [self setWindowVisibility:ITTransientStatusWindowHiddenState]; } - (void)cancelVanish @@ -59,8 +56,7 @@ [_window setAlphaValue:1.0]; [_window orderFront:self]; [_window display]; - // Cast so the compiler won't gripe - [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowVisibleState]; + [self setWindowVisibility:ITTransientStatusWindowVisibleState]; } - (void)appearStep @@ -95,16 +91,14 @@ { [_effectTimer invalidate]; _effectTimer = nil; - // Cast so the compiler won't gripe - [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowVisibleState]; + [self setWindowVisibility:ITTransientStatusWindowVisibleState]; } - (void)vanishFinish { [_effectTimer invalidate]; _effectTimer = nil; - // Cast so the compiler won't gripe - [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowHiddenState]; + [self setWindowVisibility:ITTransientStatusWindowHiddenState]; } - (void)setPivot:(float)angle diff --git a/ITWindowEffect.h b/ITWindowEffect.h index 1c4e3cb..907a39a 100755 --- a/ITWindowEffect.h +++ b/ITWindowEffect.h @@ -61,4 +61,7 @@ typedef enum { - (void)setWindowVisibility:(ITWindowVisibilityState)visibilityState; +- (float)effectTime; +- (void)setEffectTime:(float)newTime; + @end diff --git a/ITWindowEffect.m b/ITWindowEffect.m index 9eb75a6..d485df5 100755 --- a/ITWindowEffect.m +++ b/ITWindowEffect.m @@ -48,6 +48,16 @@ } } +- (float)effectTime +{ + return _effectTime; +} + +- (void)setEffectTime:(float)newTime +{ + _effectTime = newTime; +} + - (void)performAppear { NSLog(@"ITWindowEffect does not implement performAppear."); diff --git a/Showcase/Controller.h b/Showcase/Controller.h index e1a8230..4b6d72e 100755 --- a/Showcase/Controller.h +++ b/Showcase/Controller.h @@ -41,7 +41,7 @@ - (IBAction)buildStatusWindow:(id)sender; - (IBAction)showStatusWindow:(id)sender; - (IBAction)hideStatusWindow:(id)sender; -- (IBAction)setRotation:(id)sender; +- (IBAction)changeWindowSetting:(id)sender; // ITTabView support - (IBAction)toggleTabDragging:(id)sender; diff --git a/Showcase/Controller.m b/Showcase/Controller.m index 1a9eab2..a8914aa 100755 --- a/Showcase/Controller.m +++ b/Showcase/Controller.m @@ -207,22 +207,7 @@ - (IBAction)showStatusWindow:(id)sender { [[statusWindow contentView] setNeedsDisplay:YES]; -/* - [statusWindow setFrame:NSMakeRect( (0.0 - NSWidth([statusWindow frame])), - SW_BORDER, - NSWidth([statusWindow frame]), - NSHeight([statusWindow frame]) ) - display:YES]; -*/ [statusWindow appear:self]; -/* - [statusWindow setFrame:NSMakeRect( SW_BORDER, - SW_BORDER, - NSWidth([statusWindow frame]), - NSHeight([statusWindow frame]) ) - display:YES - animate:YES]; -*/ } - (IBAction)hideStatusWindow:(id)sender @@ -230,11 +215,35 @@ [statusWindow vanish:self]; } -- (IBAction)setRotation:(id)sender +- (IBAction)changeWindowSetting:(id)sender { - NSLog(@"no longer supported"); + switch ( [sender tag] ) + { + case 3010: // Not yet supported. + break; + case 3020: // Not yet supported. + break; + case 3030: // Change vanish delay + [statusWindow setExitDelay:[sender floatValue]]; + break; + case 3040: // Change vertical position + [statusWindow setVerticalPosition:[sender indexOfSelectedItem]]; + break; + case 3050: // Change horizontal position + [statusWindow setHorizontalPosition:[sender indexOfSelectedItem]]; + break; + case 3060: // Change effect speed + [[statusWindow entryEffect] setEffectTime:[sender floatValue]]; + [[statusWindow exitEffect] setEffectTime:[sender floatValue]]; + break; + case 3070: // Change entry effect + break; + case 3080: // Change exit effect + break; + } } + /*************************************************************************/ #pragma mark - #pragma mark ITTabView SUPPORT diff --git a/Showcase/English.lproj/MainMenu.nib/classes.nib b/Showcase/English.lproj/MainMenu.nib/classes.nib index 2eb1c4d..89dc17d 100755 --- a/Showcase/English.lproj/MainMenu.nib/classes.nib +++ b/Showcase/English.lproj/MainMenu.nib/classes.nib @@ -3,8 +3,8 @@ { ACTIONS = { buildStatusWindow = id; + changeWindowSetting = id; hideStatusWindow = id; - setRotation = id; showStatusWindow = id; toggleCastsShadow = id; toggleCommandDragging = id; diff --git a/Showcase/English.lproj/MainMenu.nib/info.nib b/Showcase/English.lproj/MainMenu.nib/info.nib index ec37e93..a169d02 100755 --- a/Showcase/English.lproj/MainMenu.nib/info.nib +++ b/Showcase/English.lproj/MainMenu.nib/info.nib @@ -3,13 +3,13 @@ IBDocumentLocation - 3 3 356 240 0 0 1056 770 + 2 1 356 240 0 0 1056 770 IBEditorPositions 197 69 252 75 120 0 0 1056 770 29 - 38 293 349 44 0 0 1056 770 + 1 271 349 44 0 0 1056 770 IBFramework Version 286.0 @@ -19,6 +19,6 @@ 29 IBSystem Version - 6I32 + 6L28 diff --git a/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib b/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib index 8ed526b..a831893 100755 Binary files a/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib and b/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib differ