home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.bin / SourceCode / Starter / Source / KeyPanel.m < prev    next >
Encoding:
Text File  |  1994-12-08  |  728 b   |  37 lines

  1.  
  2. #import <appkit/appkit.h>
  3. #import "KeyPanel.h"
  4.  
  5. @implementation KeyPanel
  6.  
  7. - setDefaultButton:aButton
  8. {    defaultButton=aButton;
  9.     return self;
  10. }
  11.  
  12. - _reflectChangeInKeyStatusTo:(BOOL)isKeyWindow
  13. {
  14.     if(!defaultButton) return self;
  15.     if (isKeyWindow) [defaultButton setIconPosition:NX_ICONRIGHT];
  16.     else [defaultButton setIconPosition:NX_TITLEONLY];
  17.     return self;
  18. }
  19.  
  20. - keyDown:(NXEvent *)e
  21. {    //printf("in window keyDown\n");
  22.     return self;
  23. }
  24.  
  25. - miniaturize:sender
  26. {    /*  it is necessary to override this method because
  27.         the window by default does not send 'updateWindows'
  28.         message
  29.      */
  30.  
  31.     [super miniaturize:sender];
  32.     [NXApp perform:@selector(updateWindows) with:nil
  33.        afterDelay:1 cancelPrevious:YES];
  34.     return self;
  35. }    
  36. @end
  37.