home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / MiscKit1.2.6 / Palettes / MiscValueFieldPalette / MiscSliderField.subproj / MiscSliderCell.h < prev    next >
Encoding:
Text File  |  1994-02-21  |  2.9 KB  |  110 lines

  1. //
  2. //    MiscSliderCell.h -- a TextFieldCell subclass that adds a SliderCell.
  3. //       Written by David Fedchenko. Copyright 1994 by David Fedchenko.
  4. //                    Version 1.0  All rights reserved.
  5. //
  6. //        This notice may not be removed from this source code.
  7. //
  8. //    This object is included in the MiscKit by permission from the author
  9. //    and its use is governed by the MiscKit license, found in the file
  10. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  11. //    for a list of all applicable permissions and restrictions.
  12. //    
  13.  
  14. #import <appkit/appkit.h>
  15.  
  16. #define MSC_SPACING      4
  17. #define MSC_WIDTH        16
  18. #define MSC_MINWIDTH     30
  19. // these values are the cell tags from the matrix in the inspector
  20. #define MSC_ABOVELEFT    1
  21. #define MSC_ABOVECENTER  2
  22. #define MSC_ABOVERIGHT   3
  23. #define MSC_LEFT         4
  24. #define MSC_RIGHT        5
  25. #define MSC_BELOWLEFT    6
  26. #define MSC_BELOWCENTER  7
  27. #define MSC_BELOWRIGHT   8
  28.  
  29. @interface MiscSliderCell:TextFieldCell
  30.     {
  31.     id      (idSlider);
  32.     id      stringList;
  33.     
  34.     int     layout;
  35.     float   split;
  36.     double  actualValue;
  37.     double  limitMinValue;
  38.     double  limitMaxValue;
  39.     double  limitMinBound;
  40.     double  limitMaxBound;
  41.     BOOL    fExpandMin;
  42.     BOOL    fExpandMax;
  43.     BOOL    fInt;
  44.     
  45.     BOOL    fLoop;
  46.     BOOL    fFeedback;
  47.     BOOL    fValidRect;
  48.     NXRect  rectFrame;
  49.     }
  50.  
  51. - initTextCell:(const char *)sz;
  52. - copyFromZone:(NXZone *)zone;
  53.  
  54. - drawInside:(const NXRect *)aRect inView:controlView;
  55. - drawSelf:(const NXRect *)cellFrame inView:controlView;
  56. - resetCursorRect:(const NXRect *)cellFrame inView:aView;
  57.  
  58. - calcCellSize:(NXSize *)theSize inRect:(const NXRect *)aRect;
  59. - edit:(const NXRect *)aRect inView:controlView editor:textObj
  60.     delegate:anObject event:(NXEvent *)theEvent;
  61. - getDrawRect:(NXRect *)theRect;
  62. - getTitleRect:(NXRect *)theRect;
  63. - highlight:(const NXRect *)cellFrame inView:aView lit:(BOOL)flag;
  64. - select:(const NXRect *)aRect inView:aView editor:aTextObject
  65.     delegate:anObject start:(int)selStart length:(int)selLength;
  66. - setEditable:(BOOL)flag;
  67.  
  68. - setIntValue:(int)anInt;
  69. - setFloatValue:(float)aFloat;
  70. - setDoubleValue:(double)anDouble;
  71. - setStringValue:(const char *)aString;
  72. -(int) intValue;
  73. -(float) floatValue;
  74. -(double) doubleValue;
  75.  
  76. - moved:sender;
  77.  
  78. - setMinValue:(double)value;
  79. - setMaxValue:(double)value;
  80. - setMinBoundary:(double)value;
  81. - setMaxBoundary:(double)value;
  82. -(double) minValue;
  83. -(double) maxValue;
  84. -(double) minBoundary;
  85. -(double) maxBoundary;
  86. - setExpandMin:(BOOL)flag;
  87. - setExpandMax:(BOOL)flag;
  88. -(BOOL) expandMin;
  89. -(BOOL) expandMax;
  90. - setPosition:(int)where;
  91. - setSplit:(int)percent;
  92. - setIntegerOnly:(BOOL)flag;
  93. -(int) position;
  94. -(int) split;
  95. -(BOOL) integerOnly;
  96.  
  97. - setStringList:anObject;
  98. - stringList;
  99.  
  100. - write:(NXTypedStream *)stream;
  101. - read:(NXTypedStream *)stream;
  102. - awake;
  103. - awakeFromNib;
  104.  
  105. @end
  106.  
  107. @interface Object(MiscValueDelegate)
  108. -(const char *) stringAt:(int)item;
  109. @end
  110.