home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
OpenStepConversion
/
IntermediateFrameworks3
/
AppKit.framework
/
Headers
/
NSButtonCell.h
< prev
next >
Wrap
Text File
|
1995-12-21
|
5KB
|
157 lines
/*
ButtonCell.h
Application Kit, Release 2.0
Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
*/
#import "NSActionCell.h"
/* Button Types */
typedef enum _NSButtonType {
NSMomentaryPushButton = 0,
NSPushOnPushOffButton = 1,
NSToggleButton = 2,
NSSwitchButton = 3,
NSRadioButton = 4,
NSMomentaryChangeButton = 5,
NSOnOffButton = 6,
NSMomentaryLight = 7
} NSButtonType;
@class NSEvent;
@interface NSButtonCell : NSActionCell
{
NSString *altContents;
union _icon {
struct _bmap {
id normal;
id alternate;
} bmap;
struct _ke {
id font;
float descent;
} ke;
} icon;
id sound;
struct _bcFlags1 {
#ifdef __BIG_ENDIAN__
unsigned int pushIn:1;
unsigned int changeContents:1;
unsigned int changeBackground:1;
unsigned int changeGray:1;
unsigned int lightByContents:1;
unsigned int lightByBackground:1;
unsigned int lightByGray:1;
unsigned int hasAlpha:1;
unsigned int bordered:1;
unsigned int iconOverlaps:1;
unsigned int horizontal:1;
unsigned int bottomOrLeft:1;
unsigned int iconAndText:1;
unsigned int lastState:1;
unsigned int iconSizeDiff:1;
unsigned int iconIsKeyEquivalent:1;
#else
unsigned int iconIsKeyEquivalent:1;
unsigned int iconSizeDiff:1;
unsigned int lastState:1;
unsigned int iconAndText:1;
unsigned int bottomOrLeft:1;
unsigned int horizontal:1;
unsigned int iconOverlaps:1;
unsigned int bordered:1;
unsigned int hasAlpha:1;
unsigned int lightByGray:1;
unsigned int lightByBackground:1;
unsigned int lightByContents:1;
unsigned int changeGray:1;
unsigned int changeBackground:1;
unsigned int changeContents:1;
unsigned int pushIn:1;
#endif
} bcFlags1;
struct _bcFlags2 {
#ifdef __BIG_ENDIAN__
unsigned int keyEquivalent:8;
unsigned int transparent:1;
unsigned int _RESERVED:4;
unsigned int _inset:2;
unsigned int _momentarySound:1;
#else
unsigned int _momentarySound:1;
unsigned int _inset:2;
unsigned int _RESERVED:4;
unsigned int transparent:1;
unsigned int keyEquivalent:8;
#endif
} bcFlags2;
unsigned short periodicDelay;
unsigned short periodicInterval;
}
- initTextCell:(NSString *)aString;
- initImageCell:(NSImage *)iconName;
- (NSString *)title;
- setTitle:(NSString *)aString;
- (NSString *)altTitle;
- setAltTitle:(NSString *)aString;
- (NSImage *)image;
- setImage:(NSImage *)iconName;
- (NSImage *)altImage;
- setAltImage:(NSImage *)iconName;
- image;
- setImage:image;
- altImage;
- setAltImage:image;
- (int)imagePosition;
- setImagePosition:(int)aPosition;
- sound;
- setSound:aSound;
- (int)highlightsBy;
- setHighlightsBy:(int)aType;
- (int)showsStateBy;
- setShowsStateBy:(int)aType;
- setType:(NSButtonType)aType;
- (BOOL)isOpaque;
- (NSString *)stringValue;
- setStringValue:(NSString *)aString;
- (int)intValue;
- setIntValue:(int)anInt;
- (float)floatValue;
- setFloatValue:(float)aFloat;
- (double)doubleValue;
- setDoubleValue:(double)aDouble;
- setFont:fontObj;
- (BOOL)isBordered;
- setBordered:(BOOL)flag;
- (BOOL)isTransparent;
- setTransparent:(BOOL)flag;
- setPeriodicDelay:(float)delay andInterval:(float)interval;
- getPeriodicDelay:(float *)delay andInterval:(float *)interval;
- (NSString *)keyEquivalent;
- setKeyEquivalent:(NSString *)characters;
- (NSFont *)keyEquivalentFont;
- setKeyEquivalentFont:fontObj;
- setKeyEquivalentFont:(NSString *)fontName size:(float)fontSize;
- (int)getParameter:(NSCellAttribute)aParameter;
- setParameter:(NSCellAttribute)aParameter to:(int)value;
- (NSRect)drawingRectForBounds:(NSRect)theRect;
- (NSRect)titleRectForBounds:(NSRect)theRect;
- (NSRect)imageRectForBounds:(NSRect)theRect;
- (NSSize)cellSizeForBounds:(NSRect)aRect;
- drawSelf:(NSRect)cellFrame inView:controlView;
- drawInside:(NSRect)aRect inView:controlView;
- highlight:(NSRect)cellFrame inView:controlView lit:(BOOL)flag;
- (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:controlView untilMouseUp:(BOOL)untilMouseUp;
- performClick:sender;
@end
@interface NSObject(SoundKitMethods)
- (int)play;
- (int)stop;
@end