home *** CD-ROM | disk | FTP | other *** search
/ ftptest.leeds.ac.uk / 2015.02.ftptest.leeds.ac.uk.tar / ftptest.leeds.ac.uk / bionet / CAE-GROUP / SCL-WIN3x / SCL.EXE / DISPNODE.CPP < prev    next >
C/C++ Source or Header  |  1994-08-06  |  1KB  |  61 lines

  1.  
  2. /*
  3. * NIST STEP Editor Class Library
  4. * cleditor/dispnode.cc
  5. * February, 1994
  6. * David Sauder
  7. * K. C. Morris
  8.  
  9. * Development of this software was funded by the United States Government,
  10. * and is not subject to copyright.
  11. */
  12.  
  13. /* $Id: dispnode.cc,v 2.0.1.1 1994/04/05 16:42:26 sauderd Exp $ */ 
  14.  
  15. #include <gennode.h>
  16. #include <gennodel.h>
  17. #include <gennodei.h>
  18.  
  19. #include <dispnode.h>
  20. #include <dispnodl.h>
  21.  
  22. // define this to be the name of the display object
  23. class StepEntityEditor;
  24.  
  25. // This function needs to be defined outside the SCL libraries.  It needs to do
  26. // two things:
  27. // 1) unmap the StepEntityEditor window if it is mapped.
  28. // 2) delete the StepEntityEditor window
  29. // To see an example of this function used with the Data Probe look in
  30. // ../clprobe-ui/StepEntEditor.cc  Look at DeleteSEE() and ~StepEntityEditor().
  31. extern void DeleteSEE(StepEntityEditor *se);
  32.  
  33. DisplayNode::~DisplayNode()
  34. {
  35.     Remove();
  36.     if(see)
  37.     {
  38.     DeleteSEE((StepEntityEditor *)see);
  39. //DAS PORT need the cast from void*    DeleteSEE(see);
  40.     }
  41. }
  42.  
  43. void DisplayNode::Remove()
  44. {
  45.     GenericNode::Remove();
  46. // DON'T DO THIS!!    displayState = noMapState;
  47. }
  48.  
  49. int DisplayNode::ChangeState(displayStateEnum s)
  50. {
  51.     displayState = s;
  52.     return 1;
  53. }
  54.  
  55. int DisplayNode::ChangeList(DisplayNodeList *cmdList)
  56. {
  57.     Remove();
  58.     cmdList->Append(this);
  59.     return 1;
  60. }
  61.