File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / SortingInAction / SortView.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:40 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

#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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.