home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks2 / AppKit.framework / Headers / NSButtonCell.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-21  |  4.4 KB  |  155 lines

  1. /*
  2.     ButtonCell.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "NSActionCell.h"
  8.  
  9. /* Button Types */
  10.  
  11. typedef enum _NSButtonType {
  12.     NSMomentaryPushButton        = 0,
  13.     NSPushOnPushOffButton        = 1,
  14.     NSToggleButton            = 2,
  15.     NSSwitchButton            = 3,
  16.     NSRadioButton            = 4,
  17.     NSMomentaryChangeButton        = 5,
  18.     NSOnOffButton            = 6,
  19.     NSMomentaryLight            = 7
  20. } NSButtonType;
  21.  
  22. @interface NSButtonCell : NSActionCell
  23. {
  24.     NSString               *altContents;
  25.     union _icon {
  26.     struct _bmap {
  27.         id                  normal;
  28.         id                  alternate;
  29.     }                   bmap;
  30.     struct _ke {
  31.         id                  font;
  32.         float               descent;
  33.     }                   ke;
  34.     }                   icon;
  35.     id                  sound;
  36.     struct _bcFlags1 {
  37. #ifdef __BIG_ENDIAN__
  38.     unsigned int        pushIn:1;
  39.     unsigned int        changeContents:1;
  40.     unsigned int        changeBackground:1;
  41.     unsigned int        changeGray:1;
  42.     unsigned int        lightByContents:1;
  43.     unsigned int        lightByBackground:1;
  44.     unsigned int        lightByGray:1;
  45.     unsigned int        hasAlpha:1;
  46.     unsigned int        bordered:1;
  47.     unsigned int        iconOverlaps:1;
  48.     unsigned int        horizontal:1;
  49.     unsigned int        bottomOrLeft:1;
  50.     unsigned int        iconAndText:1;
  51.     unsigned int        lastState:1;
  52.     unsigned int        iconSizeDiff:1;
  53.     unsigned int        iconIsKeyEquivalent:1;
  54. #else
  55.     unsigned int        iconIsKeyEquivalent:1;
  56.     unsigned int        iconSizeDiff:1;
  57.     unsigned int        lastState:1;
  58.     unsigned int        iconAndText:1;
  59.     unsigned int        bottomOrLeft:1;
  60.     unsigned int        horizontal:1;
  61.     unsigned int        iconOverlaps:1;
  62.     unsigned int        bordered:1;
  63.     unsigned int        hasAlpha:1;
  64.     unsigned int        lightByGray:1;
  65.     unsigned int        lightByBackground:1;
  66.     unsigned int        lightByContents:1;
  67.     unsigned int        changeGray:1;
  68.     unsigned int        changeBackground:1;
  69.     unsigned int        changeContents:1;
  70.     unsigned int        pushIn:1;
  71. #endif
  72.     }                   bcFlags1;
  73.     struct _bcFlags2 {
  74. #ifdef __BIG_ENDIAN__
  75.     unsigned int        keyEquivalent:8;
  76.     unsigned int        transparent:1;
  77.     unsigned int        _RESERVED:4;
  78.     unsigned int        _inset:2;
  79.     unsigned int        _momentarySound:1;
  80. #else
  81.     unsigned int        _momentarySound:1;
  82.     unsigned int        _inset:2;
  83.     unsigned int        _RESERVED:4;
  84.     unsigned int        transparent:1;
  85.     unsigned int        keyEquivalent:8;
  86. #endif
  87.     }                   bcFlags2;
  88.     unsigned short      periodicDelay;
  89.     unsigned short      periodicInterval;
  90. }
  91.  
  92. - initTextCell:(NSString *)aString;
  93. - initImageCell:(NSImage *)iconName;
  94.  
  95. - (NSString *)title;
  96. - setTitle:(NSString *)aString;
  97. - (NSString *)altTitle;
  98. - setAltTitle:(NSString *)aString;
  99. - (NSImage *)image;
  100. - setImage:(NSImage *)iconName;
  101. - (NSImage *)altImage;
  102. - setAltImage:(NSImage *)iconName;
  103. - image;
  104. - setImage:image;
  105. - altImage;
  106. - setAltImage:image;
  107. - (int)imagePosition;
  108. - setImagePosition:(int)aPosition;
  109. - sound;
  110. - setSound:aSound;
  111. - (int)highlightsBy;
  112. - setHighlightsBy:(int)aType;
  113. - (int)showsStateBy;
  114. - setShowsStateBy:(int)aType;
  115. - setType:(NSButtonType)aType;
  116. - (BOOL)isOpaque;
  117. - (NSString *)stringValue;
  118. - setStringValue:(NSString *)aString;
  119. - (int)intValue;
  120. - setIntValue:(int)anInt;
  121. - (float)floatValue;
  122. - setFloatValue:(float)aFloat;
  123. - (double)doubleValue;
  124. - setDoubleValue:(double)aDouble;
  125. - setFont:fontObj;
  126. - (BOOL)isBordered;
  127. - setBordered:(BOOL)flag;
  128. - (BOOL)isTransparent;
  129. - setTransparent:(BOOL)flag;
  130. - setPeriodicDelay:(float)delay andInterval:(float)interval;
  131. - getPeriodicDelay:(float *)delay andInterval:(float *)interval;
  132. - (NSString *)keyEquivalent;
  133. - setKeyEquivalent:(NSString *)characters;
  134. - (NSFont *)keyEquivalentFont;
  135. - setKeyEquivalentFont:fontObj;
  136. - setKeyEquivalentFont:(NSString *)fontName size:(float)fontSize;
  137. - (int)getParameter:(NSCellAttribute)aParameter;
  138. - setParameter:(NSCellAttribute)aParameter to:(int)value;
  139. - (NSRect)drawingRectForBounds:(NSRect)theRect;
  140. - (NSRect)titleRectForBounds:(NSRect)theRect;
  141. - (NSRect)imageRectForBounds:(NSRect)theRect;
  142. - (NSSize)cellSizeForBounds:(NSRect)aRect;
  143. - drawSelf:(NSRect)cellFrame inView:controlView;
  144. - drawInside:(NSRect)aRect inView:controlView;
  145. - highlight:(NSRect)cellFrame inView:controlView lit:(BOOL)flag;
  146. - (BOOL)trackMouse:(NXEvent *)theEvent inRect:(NSRect)cellFrame ofView:controlView untilMouseUp:(BOOL)untilMouseUp;
  147. - performClick:sender;
  148.  
  149. @end
  150.  
  151. @interface NSObject(SoundKitMethods)
  152. - (int)play;
  153. - (int)stop;
  154. @end
  155.