home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / VCOLORS.ZIP / MYEDITLN.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-18  |  1022 b   |  61 lines

  1. //
  2. //    myeditln.cpp
  3. //
  4. //    Copyright (c) 1993, by Liant Software Corp.
  5. //    ALL RIGHTS RESERVED.
  6. //
  7. //    Revision History:
  8. //    -----------------
  9. //
  10.  
  11. #include "myeditln.h"
  12. #include "notifier.h"
  13.  
  14.  
  15. defineClass(MyEditLine, VEditLine)
  16.  
  17.  
  18. MyEditLine::MyEditLine()
  19. {
  20.     ;
  21. }
  22.  
  23. MyEditLine::~MyEditLine()
  24. {
  25.     ;
  26. }
  27.  
  28. boolean MyEditLine::free()
  29. {
  30.     delete this;
  31.     return(TRUE);
  32. }
  33.  
  34. //-------------------------------------------------------------------------
  35. MyEditLine::MyEditLine(VFrame &frame, VWindow *win, short style) :
  36.             VEditLine(frame, win, style)
  37. {
  38.     exitMethod = NIL_METHOD;
  39. }
  40.  
  41. //-------------------------------------------------------------------------
  42. void MyEditLine::uponExit(id clnt, method exit)
  43. {
  44.     client = clnt;
  45.     exitMethod = exit;
  46. }
  47.  
  48. boolean MyEditLine::clearFocus() 
  49.     boolean allowExit;
  50.  
  51.     if (client && (exitMethod != NIL_METHOD)) {
  52.         allowExit = client->perform(exitMethod);
  53.         if (!allowExit) {
  54.             selectAll(NIL);
  55.             notifier->setFocus(this);
  56.         }
  57.     }
  58.  
  59.     return FALSE;
  60. }