home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / AppKit.framework / Versions / B / Headers / NSScrollView.h < prev    next >
Text File  |  1996-10-17  |  4KB  |  125 lines

  1. /*
  2.     NSScrollView.h
  3.     Application Kit
  4.     Copyright (c) 1994-1996, NeXT Software, Inc.
  5.     All rights reserved.
  6. */
  7.  
  8. #import <AppKit/NSView.h>
  9.  
  10. @class NSScroller;
  11. @class NSClipView;
  12. @class NSColor;
  13. @class NSRulerView;
  14.  
  15. typedef struct __SFlags {
  16. #ifdef __BIG_ENDIAN__
  17.     unsigned int        vScrollerRequired:1;
  18.     unsigned int        hScrollerRequired:1;
  19.     unsigned int        vScrollerStatus:1;
  20.     unsigned int        hScrollerStatus:1;
  21.     unsigned int        noDynamicScrolling:1;
  22.     NSBorderType        borderType:2;
  23.     unsigned int        oldRulerInstalled:1;
  24.     unsigned int        showRulers:1;
  25.     unsigned int        hasHorizontalRuler:1;
  26.     unsigned int        hasVerticalRuler:1;
  27.     unsigned int        needsTile:1;
  28.     unsigned int        RESERVED:20;
  29. #else
  30.     unsigned int        RESERVED:20;
  31.     unsigned int        needsTile:1;
  32.     unsigned int        hasVerticalRuler:1;
  33.     unsigned int        hasHorizontalRuler:1;
  34.     unsigned int        showRulers:1;
  35.     unsigned int        oldRulerInstalled:1;
  36.     NSBorderType        borderType:2;
  37.     unsigned int        noDynamicScrolling:1;
  38.     unsigned int        hScrollerStatus:1;
  39.     unsigned int        vScrollerStatus:1;
  40.     unsigned int        hScrollerRequired:1;
  41.     unsigned int        vScrollerRequired:1;
  42. #endif
  43. } _SFlags;
  44.  
  45. @interface NSScrollView : NSView
  46. {
  47.     NSScroller    *_vScroller;
  48.     NSScroller    *_hScroller;
  49.     NSClipView    *_contentView;
  50.     float    _pageContext;
  51.     float    _lineAmount;
  52.     id        _ruler;
  53.     _SFlags     _sFlags;
  54.     void       *_reserved1;
  55.     
  56.     // new rulers
  57.     NSRulerView *_horizontalRuler;
  58.     NSRulerView *_verticalRuler;
  59. }
  60.  
  61. + (NSSize)frameSizeForContentSize:(NSSize)cSize hasHorizontalScroller:(BOOL)hFlag hasVerticalScroller:(BOOL)vFlag borderType:(NSBorderType)aType;
  62. + (NSSize)contentSizeForFrameSize:(NSSize)fSize hasHorizontalScroller:(BOOL)hFlag hasVerticalScroller:(BOOL)vFlag borderType:(NSBorderType)aType;
  63.  
  64. - (NSRect)documentVisibleRect;
  65. - (NSSize)contentSize;
  66.  
  67. - (void)setDocumentView:(NSView *)aView;
  68. - (id)documentView;
  69. - (void)setContentView:(NSClipView *)contentView;
  70. - (NSClipView *)contentView;
  71. - (void)setDocumentCursor:(NSCursor *)anObj;
  72. - (NSCursor *)documentCursor;
  73. - (void)setBorderType:(NSBorderType)aType;
  74. - (NSBorderType)borderType;
  75. - (void)setBackgroundColor:(NSColor *)color;
  76. - (NSColor *)backgroundColor;
  77. - (void)setHasVerticalScroller:(BOOL)flag;
  78. - (BOOL)hasVerticalScroller;
  79. - (void)setHasHorizontalScroller:(BOOL)flag;
  80. - (BOOL)hasHorizontalScroller;
  81. - (void)setVerticalScroller:(NSScroller *)anObject;
  82. - (NSScroller *)verticalScroller;
  83. - (void)setHorizontalScroller:(NSScroller *)anObject;
  84. - (NSScroller *)horizontalScroller;
  85. - (void)setLineScroll:(float)value;
  86. - (float)lineScroll;
  87. - (void)setPageScroll:(float)value;
  88. - (float)pageScroll;
  89. - (void)setScrollsDynamically:(BOOL)flag;
  90. - (BOOL)scrollsDynamically;
  91. - (void)tile;
  92. - (void)reflectScrolledClipView:(NSClipView *)cView;
  93.  
  94. @end
  95.  
  96. #ifndef STRICT_OPENSTEP
  97.  
  98. @interface NSScrollView(NSRulerSupport)
  99.  
  100. + (void)setRulerViewClass:(Class)rulerViewClass;
  101. + (Class)rulerViewClass;
  102.  
  103. - (void)setRulersVisible:(BOOL)flag;
  104. - (BOOL)rulersVisible;
  105.  
  106. - (void)setHasHorizontalRuler:(BOOL)flag;
  107. - (BOOL)hasHorizontalRuler;
  108. - (void)setHasVerticalRuler:(BOOL)flag;
  109. - (BOOL)hasVerticalRuler;
  110.  
  111. - (void)setHorizontalRulerView:(NSRulerView *)ruler;
  112. - (NSRulerView *)horizontalRulerView;
  113. - (void)setVerticalRulerView:(NSRulerView *)ruler;
  114. - (NSRulerView *)verticalRulerView;
  115.  
  116. @end
  117.  
  118. #endif
  119.  
  120. @interface NSScrollView(NSOldRuler)
  121. - (void)toggleRuler:(id)sender;
  122. - (BOOL)isRulerVisible;
  123. @end
  124.  
  125.