home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / modu1096.zip / sample / pmdemo / README < prev    next >
Text File  |  1995-09-20  |  2KB  |  37 lines

  1.              GPM Sample Presentation Manager Application
  2.          -------------------------------------------
  3.  
  4. This sample code demonstrates the use of gpm-emx to create a PM application.
  5. A makefile is provided.  gpm-emx has been tested with IBM CSet2 and Borland
  6. C++ for OS/2.
  7.  
  8. The cubes respond to double-clicks of the left and right mouse buttons. The
  9. right button toggles the cubes' motion, the left button toggles the redrawing
  10. of the background.
  11.  
  12. SPINCUBE.MOD implements a custom control, which it exports as the "SPINCUBE"
  13. class.  It demonstrates the use of a variety of OS/2 API, the implementation
  14. of window procedures in Modula-2 and the use of GPM library modules in a PM
  15. application.  The code is similar to the equivalent C language program with
  16. the main differences arising from the stricter type rules of Modula-2.
  17.  
  18. SPINTEST.MOD creates the application window and four "SPINCUBE" controls. It
  19. responds to the WM_SIZE message by re-sizing the controls so that each takes
  20. up a quarter of the application window, with a small border.  It demonstrates
  21. the application initialization API, message handling and the implementation
  22. of dialog procedures in Modula-2.
  23.  
  24. The dialog procedures and menu interface is provided by a FOREIGN definition
  25. module SPINDLG.DEF.  There is of course no implementation part.  The resource
  26. compiler, RC, is used to compile these and gcc adds the compiled resources to
  27. the executable.
  28.  
  29. There are four options on the sample's menu.  The "About..." option displays
  30. a typical static dialog box.  The "Dialog..." option demonstrates the use of
  31. the custom control in a dialog box.  No extra application code is required to
  32. implement this.  The "Assert error" option causes a runtime assertion to fail,
  33. while the "Range error" option causes a runtime range error.  Future releases
  34. of GPM will implement the draft WG-13 exception handling model.  This will
  35. allow applications to intercept all exceptions including runtime errors and
  36. provide retrial and abort semantics.
  37.