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

  1. /******************************************************************************/
  2. /* MMRemote SAMPLE PROGRAM - Version 1: Class Header (MMREMOTE.HPP)           */
  3. /*                                                                            */
  4. /* COPYRIGHT: Copyright (C) International Business Machines Corp., 1992,1995. */
  5. /*                                                                            */
  6. /* DISCLAIMER OF WARRANTIES:                                                  */
  7. /*   The following [enclosed] code is sample code created by IBM              */
  8. /*   Corporation.  This sample code is not part of any standard IBM product   */
  9. /*   and is provided to you solely for the purpose of assisting you in the    */
  10. /*   development of your applications.  The code is provided "AS IS",         */
  11. /*   without warranty of any kind.  IBM shall not be liable for any damages   */
  12. /*   arising out of your use of the sample code, even if they have been       */
  13. /*   advised of the possibility of such damages.                              */
  14. /******************************************************************************/
  15. #include "mmremote.h"
  16. #include <icolor.hpp>
  17. #include <ianimbut.hpp>
  18. #include <iframe.hpp>
  19. #include <icmdhdr.hpp>
  20. #include <immcdda.hpp>
  21. #include <immwave.hpp>
  22. #include <immdigvd.hpp>
  23. #include <immsequ.hpp>
  24. #include <immtime.hpp>
  25. #include <isetcv.hpp>
  26. #include <imcelcv.hpp>
  27. #include <ipushbut.hpp>
  28. #include <ifiledlg.hpp>
  29. #include <istattxt.hpp>
  30. #include <iobservr.hpp>
  31. #include <iflytext.hpp>
  32. #include <iflyhhdr.hpp>
  33. class MainHandler;
  34. class MainObserver;
  35.  
  36. //**************************************************************************
  37. // Class:   Keypad                                                         *
  38. //                                                                         *
  39. // Purpose: Provide a keypad for use by the cd and video players.          *
  40. //          It is a subclass of IMultiCell                                 *
  41. //                                                                         *
  42. //**************************************************************************
  43. class KeyPad : public IMultiCellCanvas
  44. {
  45. public:
  46.  
  47.   KeyPad(unsigned long     windowid,
  48.          IWindow*          parent,
  49.          IWindow*          owner);
  50.  
  51. IPushButton
  52.   one,
  53.   two,
  54.   three,
  55.   four,
  56.   five,
  57.   six,
  58.   seven,
  59.   eight,
  60.   nine,
  61.   zero;
  62.  
  63. };
  64.  
  65. //**************************************************************************
  66. // Class:   MainWindow                                                     *
  67. //                                                                         *
  68. // Purpose: Main Window for C++ mmremote sample application.               *
  69. //          It is a subclass of IFrameWindow                               *
  70. //                                                                         *
  71. //**************************************************************************
  72. class MainWindow : public IFrameWindow
  73. {
  74. public:                               //Define the Public Information
  75.  
  76.   MainWindow  ( unsigned long windowId);
  77. virtual
  78.   ~MainWindow ( );
  79.  
  80. MainWindow
  81.   &newDigit(int digit);
  82.  
  83.  
  84. IMultiCellCanvas
  85.   remoteCanvas,
  86.   devices,
  87.   controls,
  88.   volkey,
  89.   volume;
  90.  
  91. IAnimatedButton
  92.   powerbtn,
  93.   volupbtn,
  94.   voldnbtn,
  95.   playbtn ,
  96.   stopbtn ,
  97.   rewbtn  ,
  98.   ffbtn   ,
  99.   pausebtn,
  100.   stepOrTrackFBtn,
  101.   stepOrTrackBBtn,
  102.   videobtn,
  103.   midibtn,
  104.   cdbtn,
  105.   wavebtn;
  106.  
  107. IFlyText
  108.   flyText;
  109.  
  110. IFlyOverHelpHandler
  111.   flyHelpHandler;
  112.  
  113. IMMPlayableDevice
  114.   *player;
  115.  
  116. IMMAudioCD
  117.   *cdPlayer;
  118.  
  119. IMMDigitalVideo
  120.   *digPlayer;
  121.  
  122. IMMSequencer
  123.   *midPlayer;
  124.  
  125. IMMWaveAudio
  126.   *wavPlayer;
  127.  
  128. unsigned long
  129.   playerDevice;
  130.  
  131. KeyPad
  132.   pad;
  133.  
  134. IStaticText
  135.   readout;
  136.  
  137. int
  138.   newTrackDigit1,
  139.   newTrackDigit2;
  140.  
  141. MainHandler
  142.   *handler;
  143.  
  144. MainObserver
  145.   *observer;
  146. private:
  147. };
  148. class MainHandler : public ICommandHandler {
  149. typedef ICommandHandler
  150.   Inherited;
  151. //**************************************************************************
  152. // Class:   MainHandler                                                    *
  153. //                                                                         *
  154. // Purpose: Provide a Handler for processing the buttons.                  *
  155. //                                                                         *
  156. //**************************************************************************
  157. public:
  158.  
  159.   MainHandler ();
  160.  
  161. /*---------------------------- Event Dispatching -----------------------------*/
  162. virtual Boolean
  163.   command (ICommandEvent& event);
  164.  
  165. };
  166.  
  167. class MainObserver : public IObserver {
  168. typedef IObserver
  169.   Inherited;
  170. //**************************************************************************
  171. // Class:   MainObserver                                                   *
  172. //                                                                         *
  173. // Purpose: Provide an Observer for processing the play notifications.     *
  174. //                                                                         *
  175. //**************************************************************************
  176. public:
  177.  
  178.   MainObserver (MainWindow& mainPanel);
  179.  
  180. virtual MainObserver
  181.   &dispatchNotificationEvent(const INotificationEvent&);
  182.  
  183. private:
  184. MainWindow
  185.   &panel;
  186.  
  187. };
  188.  
  189.