home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / MMSTEREO / MLTWAVE.HPP < prev    next >
Text File  |  1995-05-01  |  3KB  |  116 lines

  1. #include "mltwave.h"
  2. #include <imcelcv.hpp>
  3. #include <immwave.hpp>
  4. #include <ifont.hpp>
  5. #include <immttime.hpp>
  6. #include <inotifev.hpp>
  7. #include <icolor.hpp>
  8. #include <ianimbut.hpp>
  9. #include <icmdhdr.hpp>
  10. #include <istattxt.hpp>
  11. #include <iobservr.hpp>
  12. #include <immplypn.hpp>
  13. #include <immplyhd.hpp>
  14. #include <ifiledlg.hpp>
  15. #include <iradiobt.hpp>
  16. #include <ipushbut.hpp>
  17.  
  18. class WaveHandler;
  19. class WaveObserver;
  20.  
  21. class WAVE  : public IMMPlayerPanel {
  22. //**************************************************************************
  23. // Class:   WAVE                                                           *
  24. //                                                                         *
  25. // Purpose: Provide a Wave player.                                         *
  26. //          It is a subclass of IMMPlayerPanel                             *
  27. //                                                                         *
  28. //**************************************************************************
  29. public:
  30.  
  31.   WAVE( IMMWaveAudio*     wave,
  32.         unsigned long     windowid,
  33.         IWindow*          parent,
  34.         IWindow*          owner);
  35.  
  36.   ~WAVE();
  37.  
  38. IAnimatedButton
  39.   *recordButton       () const;
  40.  
  41. /*-------------------------------- Device ------------------------------------*/
  42. IMMWaveAudio*
  43.   wavePlayer          () const;
  44.  
  45. IStaticText
  46.   name,
  47.   readout;
  48.  
  49. IRadioButton
  50.   lineIn,
  51.   microphone;
  52.  
  53. IPushButton
  54.   saveButton;
  55.  
  56. private:
  57. IMMWaveAudio
  58.   *pWavePlayer;
  59.  
  60. IAnimatedButton
  61.   loadit,
  62.   *rec;
  63.  
  64. WaveHandler
  65.   *handler;
  66.  
  67. WaveObserver
  68.   *observer;
  69.  
  70. };
  71.  
  72. class WaveHandler : public IMMPlayerPanelHandler {
  73. typedef IMMPlayerPanelHandler
  74.   Inherited;
  75. //**************************************************************************
  76. // Class:   WaveHandler                                                    *
  77. //                                                                         *
  78. // Purpose: Provide a Handler for processing the load and record buttons   *
  79. //                                                                         *
  80. //**************************************************************************
  81. public:
  82.  
  83.   WaveHandler ();
  84.  
  85. /*---------------------------- Event Dispatching -----------------------------*/
  86. virtual Boolean
  87.   command (ICommandEvent& event);
  88.  
  89. /*----------------------------- Event Processing -----------------------------*/
  90. virtual Boolean
  91.   stop               (const IMMPlayerPanel& panel);
  92.  
  93. };
  94.  
  95. class WaveObserver : public IObserver {
  96. typedef IObserver
  97.   Inherited;
  98. //**************************************************************************
  99. // Class:   WaveObserver                                                   *
  100. //                                                                         *
  101. // Purpose: Provide an Observer for processing the play notifications.     *
  102. //                                                                         *
  103. //**************************************************************************
  104. public:
  105.  
  106.   WaveObserver (WAVE& wavePanel);
  107.  
  108. virtual WaveObserver
  109.   &dispatchNotificationEvent(const INotificationEvent&);
  110.  
  111. private:
  112. WAVE
  113.   &panel;
  114.  
  115. };
  116.