home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Palettes / MiscShell / MiscShellPalette.m < prev    next >
Encoding:
Text File  |  1995-04-12  |  1.3 KB  |  64 lines

  1. // Copyright (C) 1995 Steve Hayman
  2. // Use is governed by the MiscKit license
  3.  
  4. #import "MiscShellPalette.h"
  5. #import "MiscShell.h"
  6. #import "MiscShellInspector.h"
  7. #import "MiscAwakeAction.h"
  8.  
  9. @implementation  MiscShellPalette
  10. - finishInstantiate
  11. {
  12.  
  13.     [self associateObject:aMiscShell
  14.             type:IBObjectPboardType with:aButton];
  15.     [self associateObject:anAwakeAction
  16.             type:IBObjectPboardType with:anotherButton];
  17.  
  18.     return self;
  19. }
  20. @end
  21.  
  22.  
  23. /*
  24.  * Add some IB support stuff for MiscShell here rather than cluttering
  25.  * up the MiscShell source itself.
  26.  */
  27. @implementation MiscShell(IBSupport)
  28.  
  29. - (const char *)getInspectorClassName
  30. {
  31.     return "MiscShellInspector";
  32. }
  33.  
  34. -(NXImage *) getIBImage
  35. {
  36.     id  idBundle;
  37.     id idImage = nil;
  38.     char buf[MAXPATHLEN + 1];
  39.     
  40.     idBundle = [NXBundle bundleForClass:[MiscShellInspector class]];
  41.     [idBundle getPath:buf forResource:"MiscShell" ofType:"tiff"];
  42.     idImage = [[NXImage alloc] initFromFile:buf];
  43.     return idImage;
  44. }
  45.  
  46. @end
  47.  
  48.  
  49. @implementation MiscAwakeAction(IBSupport)
  50.  
  51. -(NXImage *) getIBImage
  52. {
  53.     id  idBundle;
  54.     id idImage = nil;
  55.     char buf[MAXPATHLEN + 1];
  56.     
  57.     idBundle = [NXBundle bundleForClass:[MiscShellInspector class]];
  58.     [idBundle getPath:buf forResource:"MiscAwakeAction" ofType:"tiff"];
  59.     idImage = [[NXImage alloc] initFromFile:buf];
  60.     return idImage;
  61. }
  62.  
  63. @end
  64.