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

  1. #include "mltcd.h"
  2. #include <immcdda.hpp>
  3. #include <ifont.hpp>
  4. #include <immttime.hpp>
  5. #include <inotifev.hpp>
  6. #include <icolor.hpp>
  7. #include <ianimbut.hpp>
  8. #include <icmdhdr.hpp>
  9. #include <istattxt.hpp>
  10. #include <iobservr.hpp>
  11. #include <immplypn.hpp>
  12. #include <immplyhd.hpp>
  13. class CDHandler;
  14. class CDObserver;
  15.  
  16. class CD  : public IMMPlayerPanel {
  17. //**************************************************************************
  18. // Class:   CD                                                             *
  19. //                                                                         *
  20. // Purpose: Provide a CD player.                                           *
  21. //          It is a subclass of IMMPlayerPanel                             *
  22. //                                                                         *
  23. //**************************************************************************
  24. public:
  25.  
  26.   CD( IMMAudioCD*        cd,
  27.       unsigned long     windowid,
  28.       IWindow*          parent,
  29.       IWindow*          owner);
  30.  
  31.   ~CD();
  32.  
  33. IAnimatedButton
  34.   *ejectButton              () const,
  35.   *scanForwardButton        () const,
  36.   *scanBackwardButton       () const;
  37.  
  38. /*-------------------------------- Device ------------------------------------*/
  39. IMMAudioCD*
  40.   cdPlayer() const;
  41.  
  42. IStaticText
  43.   name,
  44.   discReadout,
  45.   readout;
  46.  
  47. private:
  48. IMMAudioCD
  49.   *pCDPlayer;
  50.  
  51. IAnimatedButton
  52.   *trackF,
  53.   *trackB,
  54.   *scanF,
  55.   *scanB,
  56.   *eject;
  57.  
  58. CDHandler
  59.   *handler;
  60.  
  61. CDObserver
  62.   *observer;
  63.  
  64. };
  65.  
  66. class CDHandler : public IMMPlayerPanelHandler {
  67. typedef IMMPlayerPanelHandler
  68.   Inherited;
  69. //**************************************************************************
  70. // Class:   CDHandler                                                      *
  71. //                                                                         *
  72. // Purpose: Provide a Handler for processing the track and scan buttons    *
  73. //                                                                         *
  74. //**************************************************************************
  75. public:
  76.  
  77.   CDHandler ();
  78.  
  79. /*---------------------------- Event Dispatching -----------------------------*/
  80. virtual Boolean
  81.   command (ICommandEvent& event);
  82.  
  83. /*----------------------------- Event Processing -----------------------------*/
  84. virtual Boolean
  85.   rewind      (const IMMPlayerPanel& panel),
  86.   fastForward (const IMMPlayerPanel& panel);
  87.  
  88. };
  89.  
  90. class CDObserver : public IObserver {
  91. typedef IObserver
  92.   Inherited;
  93. //**************************************************************************
  94. // Class:   CDObserver                                                     *
  95. //                                                                         *
  96. // Purpose: Provide an Observer for processing the play notifications.     *
  97. //                                                                         *
  98. //**************************************************************************
  99. public:
  100.  
  101.   CDObserver (CD& cdPanel);
  102.  
  103. virtual CDObserver
  104.   &dispatchNotificationEvent(const INotificationEvent&);
  105.  
  106. private:
  107. CD
  108.   &panel;
  109.  
  110. };
  111.