This is MiscTabCell.h in view mode; [Download] [Up]
// $Id$
//
// ---------------------- MiscTabCell Class Interface -------------------------
//
// NSMatrix cell designed to draw itself as a horizontal file folder tab across
// the top of a MiscSwitchView with a "file folder" border.
//
// Written by Art Isbell (derived from UITabActionCell by Bill Edney,
// Sean Hill, Mark Onyschuk).
// Copyright 1996 by Art Isbell.
// Version 1.0. All rights reserved.
//
// This notice may not be removed from this source code.
//
// This object is included in the MiscKit by permission from the author
// and its use is governed by the MiscKit license, found in the file
// "License.rtf" in the MiscKit distribution. Please refer to that file
// for a list of all applicable permissions and restrictions.
//
// ----------------------------------------------------------------------------
//
// ----------------------------- Header Files ---------------------------------
#import <AppKit/NSActionCell.h>
// ---------------- Typedef, Struct, and Union Declarations -------------------
// --------------------- Constant and Enum Definitions ------------------------
// MiscTabCell seems like a better NSTextFieldCell subclass because it needs
// NSTextFieldCell's text and background color capabilities. However,
// NSTextFieldCell's IB Attributes Inspector doesn't support disabling a cell,
// IBTextFieldInspector remains a private class, and I'm too lazy to
// implement a NSTextFieldCell subclass Attributes Inspector.
@interface MiscTabCell:NSActionCell
{
// -------------------- Instance Variable Declarations ------------------------
@private
BOOL _canDraw;
@protected
@public
}
// ---------------------- Factory Method Declarations -------------------------
// ---------------- Overridden Instance Method Declarations -------------------
- (id)init;
- (id)initTextCell:(NSString *)aString;
- (id)awakeAfterUsingCoder:(NSCoder *)aDecoder;
- (BOOL)isOpaque;
- (void)drawWithFrame:(NSRect)aCellFrame inView:(NSView *)aControlView;
- (void)drawInteriorWithFrame:(NSRect)aCellFrame inView:(NSView *)aControlView;
- (void)highlight:(BOOL)aFlag withFrame:(NSRect)aCellFrame
inView:(NSView *)aView;
- (NSSize)cellSizeForBounds:(NSRect)aRect;
- (NSRect)drawingRectForBounds:(NSRect)aRect;
- (NSRect)titleRectForBounds:(NSRect)aRect;
- (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)aCellFrame
ofView:(NSView *)aControlView untilMouseUp:(BOOL)aFlag;
// ------------------- New Instance Method Declarations -----------------------
- (void)setCanDraw:(BOOL)aFlag;
- (NSColor *)cellGrayWithIsSelected:(BOOL)aFlag;
- (NSColor *)textGrayWithIsSelected:(BOOL)aFlag;
- (NSColor *)leftBorderGrayWithIsSelected:(BOOL)aFlag;
- (NSColor *)rightBorderGrayWithIsSelected:(BOOL)aFlag;
- (NSColor *)upperBezelGrayWithIsSelected:(BOOL)aFlag;
- (NSColor *)lowerBezelGrayWithIsSelected:(BOOL)aFlag;
- (void)redrawCellsInView:(NSMatrix *)aMatrix;
- (NSRect)drawingRectForBounds:(NSRect)aRect inView:(NSView *)aControlView;
- (void)eraseWithFrame:(NSRect)aCellFrame inView:(NSView *)aControlView
isSelected:(BOOL)aFlag;
- (void)drawTabEndsWithFrame:(NSRect)aCellFrame inView:(NSView *)aControlView
isSelected:(BOOL)aFlag;
- (void)drawInteriorWithFrame:(NSRect)aCellFrame inView:(NSView *)aControlView
isSelected:(BOOL)aFlag;
- (void)drawUpperBezelWithFrame:(NSRect)aCellFrame
inView:(NSView *)aControlView
isSelected:(BOOL)aFlag;
- (void)drawLowerBezelWithFrame:(NSRect)aCellFrame
inView:(NSView *)aControlView
isResizing:(BOOL)aFlag;
// ----------------- Delegate Instance Method Declarations --------------------
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.