home *** CD-ROM | disk | FTP | other *** search
- #import <appkit/appkit.h>
-
- @interface PAScrollViewDeluxe:ScrollView
- {
- id topView; // View at top that scrolls horiz with docView
- BOOL topViewVisible; // Wheter to show topView
- ClipView *topClip; // The ClipView associated with topView
-
- id leftView; // View at left that scrolls vert with docView
- BOOL leftViewVisible; // Whether to show leftView
- ClipView *leftClip; // The ClipView associated with leftView
-
- Class rulerClass; // The class to use for default top/left view
- NXSize rulerSize; // The size to use for default top/left view
-
- id syncViews; // List of views to be sync'ed with docView
- id horizSyncViews; // List of views to be sync'ed horizontally
- id vertSyncViews; // List of views to be sync'ed vertically
-
- id horizScrollerViews;// List of views in the horizontal scroller
- id vertScrollerViews; // List of views in the vertical scroller
-
- Matrix *pageUpDownButtons; // Matrix with page up/down buttons
- BOOL pageUpDownButtonsVisible; // Whether to show page up/down buttons
-
- Matrix *pageLeftRightButtons; // Matrix with page left/right buttons
- BOOL pageLeftRightButtonsVisible;// Whether to show page left/rt buttons
-
- Matrix *zoomButton; // Button with zoom popUp.
- BOOL zoomButtonVisible; // Whether to show zoom popUp
-
- Panel *zoomPanel; // Panel for arbitrary scale
- TextField *zoomText; // Text field in zoomPanel
- }
-
- // Query and set the topView
- - topView;
- - setTopView:view;
-
- // Query and set whether topView is visible
- - (BOOL)topViewVisible;
- - setTopViewVisible:(BOOL)flag;
-
- // Convenience methods for setting topView visible inside of IB
- - showTopView:sender;
- - hideTopView:sender;
- - toggleTopView:sender;
-
- // Query and set the leftView
- - leftView;
- - setLeftView:view;
-
- // Query and set whether leftView is visible
- - (BOOL)leftViewVisible;
- - setLeftViewVisible:(BOOL)flag;
-
- // Convenience methods for setting leftView visible inside of IB
- - showLeftView:sender;
- - hideLeftView:sender;
- - toggleLeftView:sender;
-
- // Convenience methods for showing/hiding/toggling top/left views as a pair
- - showRulers:sender;
- - hideRulers:sender;
- - toggleRulers:sender;
-
- // Query and set the default top/left view class
- - (Class)rulerClass;
- - setRulerClass:(Class)class;
-
- // Query and set the default top/left view size
- - (NXSize)rulerSize;
- - setRulerSize:(NXSize)size;
-
- // Query, add and remove views that are sync'ed horizontally with docView
- - syncViews;
- - addSyncView:view at:(int)at;
- - removeSyncView:view;
- - removeSyncViewAt:(int)at;
-
- // Query, add and remove views that are sync'ed horizontally with docView
- - horizSyncViews;
- - addHorizSyncView:view at:(int)at;
- - removeHorizSyncView:view;
- - removeHorizSyncViewAt:(int)at;
-
- // Query, add and remove views that are sync'ed vertically with docView
- - vertSyncViews;
- - addVertSyncView:view at:(int)at;
- - removeVertSyncView:view;
- - removeVertSyncViewAt:(int)at;
-
- // Query, add and remove views in the horizontal scroller
- - horizScrollerViews;
- - addHorizScrollerView:view at:(int)at;
- - removeHorizScrollerView:view;
- - removeHorizScrollerViewAt:(int)at;
-
- // Query, add and remove views in the vertical scroller
- - vertScrollerViews;
- - addVertScrollerView:view at:(int)at;
- - removeVertScrollerView:view;
- - removeVertScrollerViewAt:(int)at;
-
- // Return the matrix with the page up/down & left/right buttons or zoom button
- - pageUpDownButtons;
- - pageLeftRightButtons;
- - zoomButton;
-
- // Query and set whether page up/down buttons are visible or needed
- - (BOOL)pageUpDownButtonsVisible;
- - setPageUpDownButtonsVisible:(BOOL)flag;
- - (BOOL)needPageUpDownButtons;
-
- // Query and set whether page left/right buttons are visible or needed
- - (BOOL)pageLeftRightButtonsVisible;
- - setPageLeftRightButtonsVisible:(BOOL)flag;
- - (BOOL)needPageLeftRightButtons;
-
- // This is the target for the page buttons. Does page scroll based on tag
- - pageButton:sender;
-
- // Query and set whether zoom buttons are visible
- - (BOOL)zoomButtonVisible;
- - setZoomButtonVisible:(BOOL)flag;
-
- // This is the target for zoomButton's popUpList. Calls zoomTo::.
- - zoom:sender;
-
- // This method tries to call zoomTo:: on support views. Failing that, it scales
- - (BOOL)zoomTo:(float)zoomX :(float)zoomY;
-
- // This method stops the zoom panels modal session
- - stopZoomPanel:sender;
-
- // This method is implemented to do scrolling for rulers and dependent views
- - scrollClip:(ClipView *)clipView to:(const NXPoint *)newBoundsOrigin;
-
- // Used by scrollClip:to: to synchronize all dependent clipViews (ruler, etc)
- - synchronizeClipView:newClip withClipView:oldClip
- horizontally:(BOOL)horizSync vertically:(BOOL)vertSync;
-
- // Overridden to account for multiple clipviews in a scroll view
- - reflectScroll:view;
-
- // Overridden to do extra work of tiling rulers & scroller views
- - tile;
- - tileScrollerViews;
-
- // Archiving
- - write:(NXTypedStream *)stream;
- - read:(NXTypedStream *)stream;
-
- @end
-
- @interface RulerClass : Object
- - setHorizontal;
- - setVertical;
- @end
-
- @interface View(Convenience)
- - (NXCoord)frameX;
- - (NXCoord)frameY;
- - (NXPoint)frameOrigin;
- - (NXCoord)frameWidth;
- - (NXCoord)frameHeight;
- - (NXSize)frameSize;
- - (NXRect)frame;
-
- - (NXCoord)boundsX;
- - (NXCoord)boundsY;
- - (NXPoint)boundsOrigin;
- - (NXCoord)boundsWidth;
- - (NXCoord)boundsHeight;
- - (NXSize)boundsSize;
- - (NXRect)bounds;
- @end
-
- @interface Scroller(PerCent)
- - (float)perCent;
- @end
-