home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / NSScroller.h < prev    next >
Text File  |  1995-05-12  |  2KB  |  94 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 "NSControl.h"
  8.  
  9. typedef enum _NSScrollArrowPosition {
  10.     NSScrollerArrowsMaxEnd        = 0,
  11.     NSScrollerArrowsMinEnd        = 1,
  12.     NSScrollerArrowsNone        = 2
  13. } NSScrollArrowPosition;
  14.  
  15. typedef enum _NSUsableScrollerParts {
  16.     NSNoScrollerParts            = 0,
  17.     NSOnlyScrollerArrows        = 1,
  18.     NSAllScrollerParts            = 2
  19. } NSUsableScrollerParts;
  20.  
  21. typedef enum _NSScrollerPart {
  22.     NSScrollerNoPart            = 0,
  23.     NSScrollerDecrementPage        = 1,
  24.     NSScrollerKnob            = 2,
  25.     NSScrollerIncrementPage        = 3,
  26.     NSScrollerDecrementLine        = 4,
  27.     NSScrollerIncrementLine        = 5,
  28.     NSScrollerKnobSlot            = 6
  29. } NSScrollerPart;
  30.  
  31.  
  32. extern const float NSScrollerWidth;
  33.  
  34. @interface NSScroller : NSControl
  35. {
  36.     float               curValue;
  37.     float               perCent;
  38.     float             _knobSize;
  39.     int                 hitPart;
  40.     id                  target;
  41.     SEL                 action;
  42.     struct _sFlags {
  43. #ifdef __BIG_ENDIAN__
  44.     unsigned int        isHoriz:1;
  45.     unsigned int        arrowsLoc:2;
  46.     unsigned int        partsUsable:2;
  47.     unsigned int        _fine:1;
  48.     unsigned int        _RESERVED:6;
  49.     unsigned int        _needsEnableFlush:1;
  50.     unsigned int        _thumbing:1;
  51.     unsigned int        _slotDrawn:1;
  52.     unsigned int        _knobDrawn:1;
  53. #else
  54.     unsigned int        _knobDrawn:1;
  55.     unsigned int        _slotDrawn:1;
  56.     unsigned int        _thumbing:1;
  57.     unsigned int        _needsEnableFlush:1;
  58.     unsigned int        _RESERVED:6;
  59.     unsigned int        _fine:1;
  60.     unsigned int        partsUsable:2;
  61.     unsigned int        arrowsLoc:2;
  62.     unsigned int        isHoriz:1;
  63. #endif
  64.     }                   sFlags;
  65. }
  66.  
  67. + (float)scrollerWidth;
  68.  
  69. - initFrame:(NSRect)frameRect;
  70. - drawParts;
  71. - (NSRect)rectForPart:(int)partCode;
  72. - checkSpaceForParts;
  73. - target;
  74. - setTarget:anObject;
  75. - (SEL)action;
  76. - setAction:(SEL)aSelector;
  77. - setFrameSize:(NSSize)_newSize;
  78. - setArrowsPosition:(NSScrollArrowPosition)where;
  79. - drawArrow:(BOOL)whichButton :(BOOL)flag;
  80. - drawKnob;
  81. - drawRect:(NSRect)rect;
  82. - highlight:(BOOL)flag;
  83. - (NSScrollerPart)testPart:(NSPoint)thePoint;
  84. - trackKnob:(NSEvent *)theEvent;
  85. - trackScrollButtons:(NSEvent *)theEvent;
  86. - mouseDown:(NSEvent *)theEvent;
  87. - (int)hitPart;
  88. - (float)floatValue;
  89. - setFloatValue:(float)aFloat :(float)percent;
  90. - setFloatValue:(float)aFloat;
  91. - (BOOL)acceptsFirstMouse;
  92.  
  93. @end
  94.