home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / UIFlow 1.0.1 / UIFlow Source / CFDFront / TFortranView.cp < prev    next >
Encoding:
Text File  |  1992-02-21  |  1.5 KB  |  38 lines  |  [TEXT/MPS ]

  1. // **********************************************************************
  2. //    TFortranView Methods.
  3. // **********************************************************************
  4. // --------------------------------------------------------------------------------------------------
  5. //    Method:        IRes
  6. // --------------------------------------------------------------------------------------------------
  7. pascal void TFortranView::IRes (TDocument * itsDocument, TView * itsSuperView, Ptr * itsParams)
  8.     {
  9.     inherited::IRes(itsDocument, itsSuperView, itsParams);
  10.     return;
  11.     }
  12.  
  13. // --------------------------------------------------------------------------------------------------
  14. //    Method:        PutLine
  15. //     This routine takes a line of text received from the DTM connection and will insert
  16. //         it into the text edit record.
  17. // --------------------------------------------------------------------------------------------------
  18. void TFortranView::PutLine (char * message)
  19.     {
  20.     Handle itsText = fText;                                     // what is in there already
  21.     long size = GetHandleSize (itsText);             // how long is it (handle is always full so handle size == # of chars)
  22.     long add = strlen (message);                             // how long will it be after we print
  23.     
  24.     if (add + size > fMaxChars)                             // cannot exceed its size limit
  25.         return;                                                                 // Failure (minErr, 0);
  26.  
  27.     TEInsert((const void *) message, strlen (message), fHTE);
  28.     this->SynchView(TRUE);
  29.     this->Update();
  30.     this->ForceRedraw();
  31.     }
  32.  
  33. pascal void TFortranView::Close()
  34.     {
  35.     gFortranView = NULL;
  36.     inherited::Close();
  37.     }
  38.