home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / gik2 / ewyio2eu.d2x / EWYBAAH.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-04  |  4.9 KB  |  86 lines

  1. /*
  2. GIK/2 1.0.1 EWYBAAH.C 5621-432 (C) COPYRIGHT IBM CORP 1993.  ALL RIGHTS RESERVED.  LICENSED MATERIALS - PROPERTY OF IBM.
  3. */
  4. /**********************************************************************/
  5. /*                                                                    */
  6. /*                         MODULE PROLOGUE                            */
  7. /*                                                                    */
  8. /* COMPONENT NAME:   C++ CLASS BROWSER EXAMPLE                        */
  9. /*                                                                    */
  10. /* MODULE NAME:      EWYBAAH                                          */
  11. /*                                                                    */
  12. /* DESCRIPTIVE NAME: C++ Parser                                       */
  13. /*                                                                    */
  14. /* PURPOSE:                                                           */
  15. /*                                                                    */
  16. /*   This module contains the action handler function for the         */
  17. /*   C++ class browser example.                                       */
  18. /*                                                                    */
  19. /* COPYRIGHT:        (C) 1993 IBM Corporation                         */
  20. /*                                                                    */
  21. /* DISCLAIMER OF WARRANTIES.  The following [enclosed] code is        */
  22. /* sample code created by IBM Corporation. This sample code is not    */
  23. /* part of any standard or IBM product and is provided to you solely  */
  24. /* for the purpose of assisting you in the development of your        */
  25. /* applications.  The code is provided "AS IS", without               */
  26. /* warranty of any kind.  IBM shall not be liable for any damages     */
  27. /* arising out of your use of the sample code, even if they have been */
  28. /* advised of the possibility of such damages.                        */
  29. /**********************************************************************/
  30.  
  31. /*--------------------------------------------------------------------*/
  32. /* INCLUDE RELATED DEFINES                                            */
  33. /*--------------------------------------------------------------------*/
  34.  
  35. #define  INCL_DOS                      /* OS/2 definitions            */
  36. #define  INCL_PM                       /* PM definitions              */
  37.  
  38. /*--------------------------------------------------------------------*/
  39. /* HEADER FILES                                                       */
  40. /*--------------------------------------------------------------------*/
  41.  
  42. #include <os2.h>                       /* OS/2 header file            */
  43. #include <ewyga.h>                     /* GIK/2 header file           */
  44. #include "ewybadf.h"                   /* Generated header file       */
  45.  
  46. /*--------------------------------------------------------------------*/
  47. /* LOCAL FUNCTION PROTOTYPES                                          */
  48. /*--------------------------------------------------------------------*/
  49.  
  50. SHORT GSENTRY ActionHandler(DHND,USHORT,MPARAM,MPARAM);
  51.  
  52. /**********************************************************************/
  53. /* ActionHandler                                                      */
  54. /*                                                                    */
  55. /* Parameters:                                                        */
  56. /*    DHND      dhnd      (I):    Diagram handle.                     */
  57. /*    USHORT    menu_id   (I):    Action selected by user.            */
  58. /*    MPARAM    mparam1   (I):    PM-data.                            */
  59. /*    MPARAM    mparam2   (I):    PM-data.                            */
  60. /*                                                                    */
  61. /* Returns:                                                           */
  62. /*    GS_OK                                                           */
  63. /*                                                                    */
  64. /* Description:                                                       */
  65. /*    The function handles all non-generic actions.                   */
  66. /*                                                                    */
  67. /*    (Here you normally find a big switch statement with a case      */
  68. /*     for each custom action in your main menu bar.                  */
  69. /*     In this example we just have one custom action, which imports  */
  70. /*     (opens) a c++ header file)                                     */
  71. /**********************************************************************/
  72.  
  73. SHORT GSENTRY ActionHandler(DHND dhnd,USHORT menu_id,MPARAM mparam1,
  74.                              MPARAM mparam2)
  75. {
  76.   switch (menu_id)
  77.   {
  78.     case  AID_OPEN :                   /* ~Import...                  */
  79.       GsPutDiagModify(dhnd, GS_NO);
  80.       GsTriggerGenericAction(dhnd, GE_OPEN, NULL);
  81.       GsTriggerGenericAction(dhnd, GE_LAYOUT, NULL);
  82.       break;
  83.   }
  84.   return  GS_OK;
  85. }
  86.