home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / NeoIntroTCL3.0 folder / TCL / NeoBench / Source / CNeoText.cp < prev    next >
Encoding:
Text File  |  1992-12-19  |  1.1 KB  |  45 lines  |  [TEXT/KAHL]

  1. /***********************************************************************
  2.   CNeoText.c
  3.  
  4. ***********************************************************************/
  5.  
  6. #include "CNeoText.h"
  7.  
  8. /**********************************************************************
  9.  
  10. **********************************************************************/
  11. void    CNeoText::INeoText(CView            *anEnclosure,
  12.                             CBureaucrat        *aSupervisor,
  13.                             short            aWidth,
  14.                             short            aHeight,
  15.                             short            aHEncl,
  16.                             short            aVEncl,
  17.                             SizingOption    aHSizing,
  18.                             SizingOption    aVSizing)
  19. {
  20.     CEditText::IEditText(anEnclosure, aSupervisor, aWidth, aHeight,
  21.                             aHEncl, aVEncl, aHSizing, aVSizing, 0);
  22.  
  23.     SetWholeLines( FALSE );
  24.     SetWantsClicks( TRUE );
  25. }
  26.  
  27. /**********************************************************************
  28.  
  29. **********************************************************************/
  30. void    CNeoText::GetTextString(Str255  text)
  31. {
  32.     CharsHandle        theText;
  33.     long            size;
  34.  
  35.     theText = (CharsHandle)GetTextHandle();
  36.     size = GetHandleSize(theText);
  37.     if (size > 254L)
  38.         size = 254L;
  39.  
  40.     HLock(theText);
  41.     BlockMove(*theText, &text[1], size);
  42.     text[0] = (char)size;
  43.     HUnlock(theText);
  44.  
  45. }