home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / Developer University / DU Projects / TalkerLib C++ Source / TTalker.h < prev   
Encoding:
Text File  |  1996-08-22  |  1.2 KB  |  42 lines  |  [TEXT/CWIE]

  1. // TTalker.h
  2. // Copyright © 1994 Apple Computer Inc. All rights reserved.
  3.  
  4. #ifndef _TTALKER_
  5. #define _TTALKER_
  6.  
  7. //=======================================================================
  8. #ifndef _SPEECH_
  9.     #include <Speech.h>
  10. #endif
  11.  
  12. #ifndef __TEXTEDIT__
  13.     #include <TextEdit.h>
  14. #endif
  15.  
  16. //=======================================================================
  17. class TTalker {
  18. public:
  19.                     TTalker();
  20.     virtual         ~TTalker();
  21.     virtual void     SayFloat(float number, short digitsDesired, Boolean wait);
  22.     virtual void     SayInteger(long number, Boolean wait);
  23.     virtual void     SayString(char* str, Boolean wait);
  24.     virtual void     SayText(Ptr textPtr, long textBytes, Boolean wait);
  25.     virtual void     SayTextEdit(TEHandle TEHdl, Boolean wait);
  26.     virtual void     Faster();
  27.     virtual void     Slower();
  28.     virtual void     UseVoiceNamed(char* name);
  29.     virtual void     UseVoice(short index);
  30.     virtual char*     GetVoiceName(short index);
  31.     virtual short     GetNumberVoices();
  32. protected:
  33.     virtual void    WaitUntilDone();
  34. private:
  35.     Boolean            fComputerHasTextToSpeech;
  36.     SpeechChannel    fSpeechChannel;        // Mac Speech Mgr record ptr
  37.     Fixed            fSpeechRate;
  38.     short             fNumVoices;
  39. };
  40.  
  41. //=======================================================================
  42. #endif