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