home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CADSP 1.0 / Demo / CADSPOutPane.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  890 b   |  44 lines  |  [TEXT/KAHL]

  1. /****
  2.  * CADSPInPane.c
  3.  *
  4.  *    Methods for a pane which gets input from ADSP
  5.  *
  6.  *  Copyright © 1990 Symantec Corporation.  All rights reserved.
  7.  *
  8.  ****/
  9.  
  10. #include "CADSPOutPane.h"
  11. #include "CMessenger.h"
  12.  
  13. /***
  14.  * IADSPOutPane
  15.  *
  16.  *        Setup the pane
  17.  ***/
  18. void CADSPOutPane::IADSPOutPane(
  19.                 CView            *anEnclosure,
  20.                 CBureaucrat        *aSupervisor,
  21.                 CMessenger        *aMessenger)
  22. {
  23.     CEditText::IEditText(anEnclosure, aSupervisor,
  24.                      10, 10, 0, 0, sizELASTIC, sizELASTIC, -1);
  25.                      
  26.     itsMessenger = aMessenger;
  27. }
  28.  
  29. /***
  30.  * TypeChar
  31.  *
  32.  *        If the character is being typed, we want to send it too.
  33.  ***/
  34. void CADSPOutPane::TypeChar(char theChar, short theModifiers)
  35. {
  36.     EventRecord theEvent;
  37.  
  38.     inherited::TypeChar(theChar, theModifiers);
  39.     theEvent.what = keyDown;
  40.     theEvent.message = (short)theChar;
  41.     theEvent.modifiers = theModifiers;
  42.     itsMessenger->SendMessage(&theEvent, sizeof(EventRecord));
  43. }
  44.