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