home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / appkit / Scroller.h < prev    next >
Text File  |  1990-10-15  |  2KB  |  90 lines

  1. /*
  2.     Scroller.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "Control.h"
  8.  
  9. /* Location of scroll arrows within the scroller */
  10.  
  11. #define    NX_SCROLLARROWSMAXEND    0
  12. #define    NX_SCROLLARROWSMINEND    1
  13. #define    NX_SCROLLARROWSNONE    2
  14.  
  15. /* Useable parts in the scroller */
  16.  
  17. #define    NX_SCROLLERNOPARTS    0
  18. #define    NX_SCROLLERONLYARROWS    1
  19. #define    NX_SCROLLERALLPARTS    2
  20.  
  21. /* Part codes for various parts of the scroller */
  22.  
  23. #define    NX_NOPART    0
  24. #define NX_DECPAGE    1
  25. #define    NX_KNOB        2
  26. #define    NX_INCPAGE    3
  27. #define NX_DECLINE    4
  28. #define NX_INCLINE    5
  29. #define    NX_KNOBSLOT    6
  30. #define    NX_JUMP        6
  31.  
  32. #define    NX_SCROLLERWIDTH    (18.0)
  33.  
  34. @interface Scroller : Control
  35. {
  36.     float               curValue;
  37.     float               perCent;
  38.     NXCoord             _knobSize;
  39.     int                 hitPart;
  40.     id                  target;
  41.     SEL                 action;
  42.     struct _sFlags {
  43.     unsigned int        isHoriz:1;
  44.     unsigned int        arrowsLoc:2;
  45.     unsigned int        partsUsable:2;
  46.     unsigned int        _fine:1;
  47.     unsigned int        _RESERVED:6;
  48.     uUEDned int        _needsEnableFlush:1;
  49.     unsigned int        _thumbing:1;
  50.     unsigned int        _slotDrawn:1;
  51.     unsigned int        _knobDrawn:1;
  52.     }                   sFlags;
  53. }
  54.  
  55. - initFrame:(const NXRect *)frameRect;
  56. - drawParts;
  57. - awake;
  58. - (NXRect *)calcRect:(NXRect *)aRect forPart:(int)partCode;
  59. - checkSpaceForParts;
  60. - target;
  61. - setTarget:anObject;
  62. - (SEL)action;
  63. - setAction:(SEL)aSelector;
  64. - sizeTo:(NXCoord)width :(NXCoord)height;
  65. - setArrowsPosition:(int)where;
  66. - drawArrow:(BOOL)whichButton :(BOOL)flag;
  67. - drawKnob;
  68. - drawSelf:(const NXRect *)rects :(int)rectCount;
  69. - highlight:(BOOL)flag;
  70. - (int)testPart:(const NXPoint *)thePoint;
  71. - trackKnob:(NXEvent *)theEvent;
  72. - trackScrollButtons:(NXEvent *)theEvent;
  73. - mouseDown:(NXEvent *)theEvent;
  74. - (int)hitPart;
  75. - (float)floatValue;
  76. - setFloatValue:(float)aFloat :(float)percent;
  77. - setFloatValue:(float)aFloat;
  78. - (BOOL)acceptsFirstMouse;
  79. - write:(NXTypedStream *)stream;
  80. - read:(NXTypedStream *)stream;
  81.  
  82. /* 
  83.  * The following new... methods are now obsolete.  They remain in this  
  84.  * interface file for backward compatibility only.  Use Object's alloc method  
  85.  * and the init... methods defined in this class instead.
  86.  */
  87. + newFrame:(const NXRect *)frameRect;
  88.  
  89. @end
  90.