home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.bin / SourceCode / Palettes / TTools / TToolsPalette / Utilities.subproj / SortedList.h < prev    next >
Encoding:
Text File  |  1993-11-09  |  900 b   |  37 lines

  1. /* SortedList.h
  2.  * Written By:  Thomas Burkholder
  3.  *
  4.  * You may freely copy, distribute, and reuse the code in this example.
  5.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  6.  * fitness for any particular use.
  7.  */
  8.  
  9. #import <objc/List.h>
  10. #import <appkit/appkit.h>
  11. #import "SortedListAgent.h"
  12.  
  13. // a List that sorts according to a function
  14. @interface SortedList:List
  15. {
  16.     id        agent;
  17. }
  18.  
  19. - initCount:(unsigned)numSlots;
  20. - setAgent:anObject;
  21. - agent;
  22. - (id)subdirectoryForObjectAt:(int)at;
  23. - (BOOL)isLeafAt:(int)at;
  24. - (const char *)displayStringForObjectAt:(int)at;
  25. - (int)compareObjectAt:(int)at with:object;
  26. - addObject:anObject;
  27. - sort:sender;
  28.  
  29. // Browser delegation
  30. - (int)browser:sender fillMatrix:matrix inColumn:(int)column;
  31. - (const char *)browser:sender titleOfColumn:(int)column;
  32.  
  33. // archival methods
  34. - read:(NXTypedStream *)stream;
  35. - write:(NXTypedStream *)stream;
  36.  
  37. @end