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

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