home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Misc / aa_m68k_Only / NDCamera.0.21 / Examples / NDCameraRC / RemoteController.m < prev    next >
Encoding:
Text File  |  1995-07-18  |  1.3 KB  |  76 lines

  1. #import "RemoteController.h"
  2.  
  3. @implementation RemoteController
  4.  
  5. - start:sender
  6. {
  7.     id    ourPort;
  8.  
  9.     if( !camera )
  10.     {
  11.         camera = [NXConnection connectToName:"localhost/NDCamera" onHost:"*"];
  12.         ourPort = [camera connectionForProxy];
  13.         [ourPort runFromAppKit];
  14.     }
  15.  
  16.     if( camera )
  17.     {
  18.         [camera start:nil];
  19.     }
  20.     return self;
  21. }
  22.  
  23. - stop:sender
  24. {
  25.     if( camera )
  26.     {
  27.         [camera stop:nil];
  28.     }
  29.     return self;
  30. }
  31.  
  32. - pause:sender
  33. {
  34.     if( camera )
  35.     {
  36.         // well..does nothing right now...it the future it might stop the
  37.         // continuous frame grabbing.
  38.     }
  39.     return self;
  40. }
  41.  
  42. - record:sender
  43. {
  44.     if( camera )
  45.     {
  46.         [camera grab:nil];
  47.  
  48.         // In a custom version you might call ZAP or any other VCR controlling
  49.         // code from here to ensure that it will advance two images before
  50.         // you let the camera grab another two shots.
  51.  
  52.         // [MiscZAPShell executeFromString:"zap ~/advanceTwoFrames"];
  53.  
  54.         // Now ensure that another grab will come soon.
  55.         // Perhaps one should chance the way the button behaves...it might
  56.         // stay highlighted etc. pp.
  57.  
  58.         // [Application perform:@selector(grab:) with:self andTarget:self
  59.         //            afterDelay:10 cancelPrevious:NO];
  60.         //
  61.         // ...ummh which is from the top of my head...perhaps the method is 
  62.         // slightliy different.
  63.     }
  64.     return self;
  65. }
  66.  
  67. - takeNewCassette:sender
  68. {
  69.     if( camera )
  70.     {
  71.         [camera adjustOutputFile:sender];
  72.     }
  73.     return self;
  74. }
  75.  
  76. @end