*
*/
-/*
- * This subclass does 4 things to approximate NSMenuExtra's functionality:
- *
- * 1. Makes the status item smarter about highlighting.
- * 2. Allows you to set an alternate (inverted) image.
- * 3. Eliminates the pre-Jaguar shadow behind a normal status item.
- * 4. If you use an image AND title, the text will be made slightly smaller
- * to resemble the visual interface of an NSMenuExtra.
- *
- * Note: In order to have the shadow not overlap the bottom of the
- * menubar, Apple moves the image up one pixel. Since that shadow is
- * no longer drawn, please adjust your images DOWN one pixel to compensate.
- *
- */
-#import <AppKit/AppKit.h>
+#import <Cocoa/Cocoa.h>
@interface ITTableCornerView : NSPopUpButton {
NSTableHeaderCell *headerCell;
-//
-// ITTableCornerView.m
-//
-//
-// Created by Joseph Spiros on Wed Jan 22 2003.
-// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
#import "ITTableCornerView.h"
@implementation ITTableCornerView
*
*/
-#import <AppKit/AppKit.h>
-#import "ITTableCornerView.h"
+#import <Cocoa/Cocoa.h>
+
+@class ITTableCornerView;
@interface ITTableView : NSTableView {
ITTableCornerView *corner;
-// ITTableView.m
-
#import "ITTableView.h"
+#import "ITTableCornerView.h"
@implementation ITTableView
#import <Cocoa/Cocoa.h>
+@class ITTextField;
+@class ITGrayRoundedView;
+
+
#define DEFAULT_EXIT_DELAY 3.0
#import "ITTextField.h"
#import "ITGrayRoundedView.h"
+@class ITTextField;
+@class ITGrayRoundedView;
/*************************************************************************/
#pragma mark -
- (void)orderFront:(id)sender
{
- if ( _exitMode = ITTransientStatusWindowExitAfterDelay ) {
+ if ( _exitMode == ITTransientStatusWindowExitAfterDelay ) {
// set the timer, and orderOut: when it lapses.
}
- (void)makeKeyAndOrderFront:(id)sender
{
- if ( _exitMode = ITTransientStatusWindowExitAfterDelay ) {
+ if ( _exitMode == ITTransientStatusWindowExitAfterDelay ) {
// set the timer, and orderOut: when it lapses.
}
return _visibilityState;
}
-- (ITTransientStatusWindowExitMode)ExitMode
+- (ITTransientStatusWindowExitMode)exitMode
{
return _exitMode;
}
if ( _entryEffect == ITTransientStatusWindowEffectDissolve ) {
[self dissolveEffect:YES];
} else if ( _entryEffect == ITTransientStatusWindowEffectSlideVertically ) {
- [self slideEffect:YES];
+ [self slideVerticalEffect:YES];
} else if ( _entryEffect == ITTransientStatusWindowEffectSlideHorizontally ) {
- [self slideEffect:YES];
+ [self slideHorizontalEffect:YES];
}
} else if ( _visibilityState == ITTransientStatusWindowVisibleState ) {
if ( _exitEffect == ITTransientStatusWindowEffectDissolve ) {
[self dissolveEffect:NO];
} else if ( _exitEffect == ITTransientStatusWindowEffectSlideVertically ) {
- [self slideEffect:NO];
+ [self slideVerticalEffect:NO];
} else if ( _exitEffect == ITTransientStatusWindowEffectSlideHorizontally ) {
- [self slideEffect:NO];
+ [self slideHorizontalEffect:NO];
}
}
}
- (void)dissolveEffect:(BOOL)entering
{
-
- [super orderFront:self];
+ if ( entering ) {
+ [super orderFront:self];
+ } else {
+ [super orderOut:self];
+ }
}
- (void)slideVerticalEffect:(BOOL)entering
{
- [super orderFront:self];
+ if ( entering ) {
+ [super orderFront:self];
+ } else {
+ [super orderOut:self];
+ }
}
- (void)slideHorizontalEffect:(BOOL)entering
{
- [super orderFront:self];
+ if ( entering ) {
+ [super orderFront:self];
+ } else {
+ [super orderOut:self];
+ }
}
// ITTransientStatusWindow Support
ITTransientStatusWindow *statusWindow;
- IBOutlet NSTextView *swSampleTextView;
- IBOutlet NSPopUpButton *swVanishModePopup;
- IBOutlet NSPopUpButton *swBackgroundTypePopup;
- IBOutlet NSPopUpButton *swDefinedPositionPopup;
- IBOutlet NSTextField *swVanishDelay;
- IBOutlet NSMatrix *swVanishOnClick;
+ IBOutlet NSTextView *swSampleTextView;
+ IBOutlet NSPopUpButton *swVanishModePopup;
+ IBOutlet NSPopUpButton *swBackgroundTypePopup;
+ IBOutlet NSPopUpButton *swDefinedPositionPopup;
+ IBOutlet NSTextField *swVanishDelay;
}
// ITStatusItem Support
// ITTransientStatusWindow Support
- (IBAction)buildStatusWindow:(id)sender;
- (IBAction)showStatusWindow:(id)sender;
+- (IBAction)hideStatusWindow:(id)sender;
@end
animate:YES];
}
+- (IBAction)hideStatusWindow:(id)sender
+{
+ [statusWindow orderOut:self];
+}
/*************************************************************************/
#pragma mark -
{
ACTIONS = {
buildStatusWindow = id;
+ hideStatusWindow = id;
showStatusWindow = id;
toggleCastsShadow = id;
toggleImage = id;
swSampleTextView = NSTextView;
swVanishDelay = NSTextField;
swVanishModePopup = NSPopUpButton;
- swVanishOnClick = NSMatrix;
tabView = ITTabView;
testTextField = ITTextField;
useInvertedCheckBox = NSButton;