home *** CD-ROM | disk | FTP | other *** search
- #import <appkit/View.h>
-
- #define VIEW_HEIGHT 110.0 // default height of a SortView
- #define VIEW_WIDTH 510.0 // default width of a SortView
-
- @interface SortView:View
-
- {
- id sort; /* the Sort object for this SortView */
- id titleFont,numberFont; /* fonts used to display in the SortView */
- int numRows, numPixelsInRow;/* various integers which describe */
- int barWidth, elementWidth; /* the shape and size of the elements */
- int rowHeight;
- NXRect drawRect; /* rectangle for drawing the sort elements */
- char *tickString,*moveString,/* strings obtained from the NXStringTable */
- *compString,* fcallString; /* to label different statistics */
-
- }
-
- - initSort:aSort;
-
- - setUpForSize:(int)numElements;
-
- - compare:(int)element1 value:(int)value1 with:(int)element2 value:(int)value2;
- - swap:(int)element1 value:(int)value1 with:(int)element2 value:(int)value2;
- - moveValue:(int)new to:(int)position oldValue:(int)old;
-
- - drawSelf:(const NXRect*)rects :(int)rectCount;
- - drawStatistics;
- - displayFinished;
-
- @end