home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / mmstereo / mltwave.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  5.2 KB  |  144 lines

  1. /******************************************************************************
  2. * .FILE:         mltwave.hpp                                                  *
  3. *                                                                             *
  4. * .DESCRIPTION:  Multimedia Stereo Sample:             Class Definition       *
  5. *                                                                             *
  6. * .CLASSES:      WAVE                                                         *
  7. *                WaveHandler                                                  *
  8. *                WaveObserver                                                 *
  9. *                                                                             *
  10. * .COPYRIGHT:                                                                 *
  11. *    Licensed Material - Program-Property of IBM                              *
  12. *    (C) Copyright IBM Corp. 1992, 1996 - All Rights Reserved                 *
  13. *                                                                             *
  14. * .DISCLAIMER:                                                                *
  15. *   The following [enclosed] code is sample code created by IBM               *
  16. *   Corporation.  This sample code is not part of any standard IBM product    *
  17. *   and is provided to you solely for the purpose of assisting you in the     *
  18. *   development of your applications.  The code is provided 'AS IS',          *
  19. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  20. *   arising out of your use of the sample code, even if they have been        *
  21. *   advised of the possibility of such damages.                               *
  22. *                                                                             *
  23. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  24. *                                                                             *
  25. ******************************************************************************/
  26. #ifndef _MLTWAVE_
  27. #define _MLTWAVE_
  28. #include <imcelcv.hpp>
  29. #include <immwave.hpp>
  30. #include <ifont.hpp>
  31. #include <immttime.hpp>
  32. #include <inotifev.hpp>
  33. #include <icolor.hpp>
  34. #include <ianimbut.hpp>
  35. #include <icmdhdr.hpp>
  36. #include <istattxt.hpp>
  37. #include <iobservr.hpp>
  38. #include <immplypn.hpp>
  39. #include <immplyhd.hpp>
  40. #include <ifiledlg.hpp>
  41. #include <iradiobt.hpp>
  42. #include <ipushbut.hpp>
  43. #include "mltwave.h"
  44.  
  45. class WaveHandler;
  46. class WaveObserver;
  47.  
  48. class WAVE  : public IMMPlayerPanel {
  49. //**************************************************************************
  50. // Class:   WAVE                                                           *
  51. //                                                                         *
  52. // Purpose: Provide a Wave player.                                         *
  53. //          It is a subclass of IMMPlayerPanel                             *
  54. //                                                                         *
  55. //**************************************************************************
  56. public:
  57.  
  58.   WAVE( IMMWaveAudio*     wave,
  59.         unsigned long     windowid,
  60.         IWindow*          parent,
  61.         IWindow*          owner);
  62.  
  63.   ~WAVE();
  64.  
  65. IAnimatedButton
  66.   *recordButton       () const;
  67.  
  68. /*-------------------------------- Device ------------------------------------*/
  69. IMMWaveAudio*
  70.   wavePlayer          () const;
  71.  
  72. IStaticText
  73.   name,
  74.   readout;
  75.  
  76. IRadioButton
  77.   lineIn,
  78.   microphone;
  79.  
  80. IPushButton
  81.   saveButton;
  82.  
  83. private:
  84. IMMWaveAudio
  85.   *pWavePlayer;
  86.  
  87. IAnimatedButton
  88.   loadit,
  89.   *rec;
  90.  
  91. WaveHandler
  92.   *handler;
  93.  
  94. WaveObserver
  95.   *observer;
  96.  
  97. };
  98.  
  99. class WaveHandler : public IMMPlayerPanelHandler {
  100. typedef IMMPlayerPanelHandler
  101.   Inherited;
  102. //**************************************************************************
  103. // Class:   WaveHandler                                                    *
  104. //                                                                         *
  105. // Purpose: Provide a Handler for processing the load and record buttons   *
  106. //                                                                         *
  107. //**************************************************************************
  108. public:
  109.  
  110.   WaveHandler ();
  111.  
  112. /*---------------------------- Event Dispatching -----------------------------*/
  113. virtual Boolean
  114.   command (ICommandEvent& event);
  115.  
  116. /*----------------------------- Event Processing -----------------------------*/
  117. virtual Boolean
  118.   stop               (const IMMPlayerPanel& panel);
  119.  
  120. };
  121.  
  122. class WaveObserver : public IObserver {
  123. typedef IObserver
  124.   Inherited;
  125. //**************************************************************************
  126. // Class:   WaveObserver                                                   *
  127. //                                                                         *
  128. // Purpose: Provide an Observer for processing the play notifications.     *
  129. //                                                                         *
  130. //**************************************************************************
  131. public:
  132.  
  133.   WaveObserver (WAVE& wavePanel);
  134.  
  135. virtual WaveObserver
  136.   &dispatchNotificationEvent(const INotificationEvent&);
  137.  
  138. private:
  139. WAVE
  140.   &panel;
  141.  
  142. };
  143. #endif
  144.