home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / Palettes / PAScrollViewDeluxe / PAScrollViewDeluxe.h < prev    next >
Encoding:
Text File  |  1993-05-04  |  5.2 KB  |  182 lines

  1. #import <appkit/appkit.h>
  2.  
  3. @interface PAScrollViewDeluxe:ScrollView
  4. {
  5.     id        topView;            // View at top that scrolls horiz with docView
  6.     BOOL    topViewVisible;        // Wheter to show topView
  7.     ClipView *topClip;            // The ClipView associated with topView
  8.  
  9.     id        leftView;            // View at left that scrolls vert with docView
  10.     BOOL    leftViewVisible;    // Whether to show leftView
  11.     ClipView *leftClip;            // The ClipView associated with leftView
  12.  
  13.     Class    rulerClass;            // The class to use for default top/left view
  14.     NXSize    rulerSize;            // The size to use for default top/left view
  15.  
  16.     id        syncViews;            // List of views to be sync'ed with docView
  17.     id        horizSyncViews;        // List of views to be sync'ed horizontally
  18.     id        vertSyncViews;        // List of views to be sync'ed vertically
  19.         
  20.     id        horizScrollerViews;// List of views in the horizontal scroller
  21.     id        vertScrollerViews;    // List of views in the vertical scroller
  22.  
  23.     Matrix    *pageUpDownButtons;            // Matrix with page up/down buttons
  24.     BOOL    pageUpDownButtonsVisible;    // Whether to show page up/down buttons
  25.  
  26.     Matrix    *pageLeftRightButtons;        // Matrix with page left/right buttons
  27.     BOOL    pageLeftRightButtonsVisible;// Whether to show page left/rt buttons
  28.     
  29.     Matrix    *zoomButton;                // Button with zoom popUp.
  30.     BOOL    zoomButtonVisible;            // Whether to show zoom popUp
  31.     
  32.     Panel    *zoomPanel;                    // Panel for arbitrary scale
  33.     TextField *zoomText;                // Text field in zoomPanel
  34. }
  35.  
  36. // Query and set the topView
  37. - topView;
  38. - setTopView:view;
  39.  
  40. // Query and set whether topView is visible
  41. - (BOOL)topViewVisible;
  42. - setTopViewVisible:(BOOL)flag;
  43.  
  44. // Convenience methods for setting topView visible inside of IB
  45. - showTopView:sender;
  46. - hideTopView:sender;
  47. - toggleTopView:sender;
  48.  
  49. // Query and set the leftView
  50. - leftView;
  51. - setLeftView:view;
  52.  
  53. // Query and set whether leftView is visible
  54. - (BOOL)leftViewVisible;
  55. - setLeftViewVisible:(BOOL)flag;
  56.  
  57. // Convenience methods for setting leftView visible inside of IB
  58. - showLeftView:sender;
  59. - hideLeftView:sender;
  60. - toggleLeftView:sender;
  61.  
  62. // Convenience methods for showing/hiding/toggling top/left views as a pair
  63. - showRulers:sender;
  64. - hideRulers:sender;
  65. - toggleRulers:sender;
  66.  
  67. // Query and set the default top/left view class
  68. - (Class)rulerClass;
  69. - setRulerClass:(Class)class;
  70.  
  71. // Query and set the default top/left view size
  72. - (NXSize)rulerSize;
  73. - setRulerSize:(NXSize)size;
  74.  
  75. // Query, add and remove views that are sync'ed horizontally with docView
  76. - syncViews;
  77. - addSyncView:view at:(int)at;
  78. - removeSyncView:view;
  79. - removeSyncViewAt:(int)at;
  80.  
  81. // Query, add and remove views that are sync'ed horizontally with docView
  82. - horizSyncViews;
  83. - addHorizSyncView:view at:(int)at;
  84. - removeHorizSyncView:view;
  85. - removeHorizSyncViewAt:(int)at;
  86.  
  87. // Query, add and remove views that are sync'ed vertically with docView
  88. - vertSyncViews;
  89. - addVertSyncView:view at:(int)at;
  90. - removeVertSyncView:view;
  91. - removeVertSyncViewAt:(int)at;
  92.  
  93. // Query, add and remove views in the horizontal scroller
  94. - horizScrollerViews;
  95. - addHorizScrollerView:view at:(int)at;
  96. - removeHorizScrollerView:view;
  97. - removeHorizScrollerViewAt:(int)at;
  98.  
  99. // Query, add and remove views in the vertical scroller
  100. - vertScrollerViews;
  101. - addVertScrollerView:view at:(int)at;
  102. - removeVertScrollerView:view;
  103. - removeVertScrollerViewAt:(int)at;
  104.  
  105. // Return the matrix with the page up/down & left/right buttons or zoom button
  106. - pageUpDownButtons;
  107. - pageLeftRightButtons;
  108. - zoomButton;
  109.  
  110. // Query and set whether page up/down buttons are visible or needed
  111. - (BOOL)pageUpDownButtonsVisible;
  112. - setPageUpDownButtonsVisible:(BOOL)flag;
  113. - (BOOL)needPageUpDownButtons;
  114.  
  115. // Query and set whether page left/right buttons are visible or needed
  116. - (BOOL)pageLeftRightButtonsVisible;
  117. - setPageLeftRightButtonsVisible:(BOOL)flag;
  118. - (BOOL)needPageLeftRightButtons;
  119.  
  120. // This is the target for the page buttons. Does page scroll based on tag
  121. - pageButton:sender;
  122.  
  123. // Query and set whether zoom buttons are visible
  124. - (BOOL)zoomButtonVisible;
  125. - setZoomButtonVisible:(BOOL)flag;
  126.  
  127. // This is the target for zoomButton's popUpList. Calls zoomTo::.
  128. - zoom:sender;
  129.  
  130. // This method tries to call zoomTo:: on support views. Failing that, it scales
  131. - (BOOL)zoomTo:(float)zoomX :(float)zoomY;
  132.  
  133. // This method stops the zoom panels modal session
  134. - stopZoomPanel:sender;
  135.  
  136. // This method is implemented to do scrolling for rulers and dependent views
  137. - scrollClip:(ClipView *)clipView to:(const NXPoint *)newBoundsOrigin;
  138.  
  139. // Used by scrollClip:to: to synchronize all dependent clipViews (ruler, etc)
  140. - synchronizeClipView:newClip withClipView:oldClip
  141.     horizontally:(BOOL)horizSync vertically:(BOOL)vertSync;
  142.  
  143. // Overridden to account for multiple clipviews in a scroll view
  144. - reflectScroll:view;
  145.  
  146. // Overridden to do extra work of tiling rulers & scroller views
  147. - tile;
  148. - tileScrollerViews;
  149.  
  150. // Archiving
  151. - write:(NXTypedStream *)stream;
  152. - read:(NXTypedStream *)stream;
  153.  
  154. @end
  155.  
  156. @interface RulerClass : Object
  157. - setHorizontal;
  158. - setVertical;
  159. @end
  160.  
  161. @interface View(Convenience)
  162. - (NXCoord)frameX;
  163. - (NXCoord)frameY;
  164. - (NXPoint)frameOrigin; 
  165. - (NXCoord)frameWidth;
  166. - (NXCoord)frameHeight;
  167. - (NXSize)frameSize;
  168. - (NXRect)frame;
  169.  
  170. - (NXCoord)boundsX;
  171. - (NXCoord)boundsY;
  172. - (NXPoint)boundsOrigin;
  173. - (NXCoord)boundsWidth;
  174. - (NXCoord)boundsHeight;
  175. - (NXSize)boundsSize;
  176. - (NXRect)bounds;
  177. @end
  178.  
  179. @interface Scroller(PerCent)
  180. - (float)perCent;
  181. @end
  182.