home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.bin / SourceCode / Palettes / TTools / TToolsPalette / SwitchView.subproj / SwitchView.h < prev    next >
Encoding:
Text File  |  1993-11-09  |  1.0 KB  |  40 lines

  1. /* SwitchView.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.  
  10. #import <appkit/appkit.h>
  11.  
  12. // A Box subclass that can swap views in and out of it's content view
  13. @interface SwitchView:Box
  14. {
  15.     id    (views);           // list of views to be shown
  16.     SEL    valueSelector;     // callback method to control
  17.     int    initialViewNumber; // number of the first view to show
  18. }
  19.  
  20. - initFrame:(const NXRect *)frameRect;
  21. - free;
  22. - views;
  23.  
  24. // action method to use to swap in a view
  25. - takeViewNumberFrom:sender;
  26. - takeTagFrom:sender;
  27. - takeIntValueFrom:sender;
  28. - takeSelectedRowFrom:sender;
  29. - takeSelectedColFrom:sender;
  30.  
  31. - setValueSelector:(SEL)aSelector;  // use to set the callback
  32. - (SEL)valueSelector;
  33. - setInitialViewNumber:(int)num;
  34. - (int)initialViewNumber;
  35. - (SEL)guessValueSelectorForSwitchSource:sender;
  36. - read:(NXTypedStream *)stream;
  37. - write:(NXTypedStream *)stream;
  38.  
  39. @end
  40.