home *** CD-ROM | disk | FTP | other *** search
- /*
- GIK/2 1.0.1 EWYBAAH.C 5621-432 (C) COPYRIGHT IBM CORP 1993. ALL RIGHTS RESERVED. LICENSED MATERIALS - PROPERTY OF IBM.
- */
- /**********************************************************************/
- /* */
- /* MODULE PROLOGUE */
- /* */
- /* COMPONENT NAME: C++ CLASS BROWSER EXAMPLE */
- /* */
- /* MODULE NAME: EWYBAAH */
- /* */
- /* DESCRIPTIVE NAME: C++ Parser */
- /* */
- /* PURPOSE: */
- /* */
- /* This module contains the action handler function for the */
- /* C++ class browser example. */
- /* */
- /* COPYRIGHT: (C) 1993 IBM Corporation */
- /* */
- /* DISCLAIMER OF WARRANTIES. The following [enclosed] code is */
- /* sample code created by IBM Corporation. This sample code is not */
- /* part of any standard or IBM product and is provided to you solely */
- /* for the purpose of assisting you in the development of your */
- /* applications. The code is provided "AS IS", without */
- /* warranty of any kind. IBM shall not be liable for any damages */
- /* arising out of your use of the sample code, even if they have been */
- /* advised of the possibility of such damages. */
- /**********************************************************************/
-
- /*--------------------------------------------------------------------*/
- /* INCLUDE RELATED DEFINES */
- /*--------------------------------------------------------------------*/
-
- #define INCL_DOS /* OS/2 definitions */
- #define INCL_PM /* PM definitions */
-
- /*--------------------------------------------------------------------*/
- /* HEADER FILES */
- /*--------------------------------------------------------------------*/
-
- #include <os2.h> /* OS/2 header file */
- #include <ewyga.h> /* GIK/2 header file */
- #include "ewybadf.h" /* Generated header file */
-
- /*--------------------------------------------------------------------*/
- /* LOCAL FUNCTION PROTOTYPES */
- /*--------------------------------------------------------------------*/
-
- SHORT GSENTRY ActionHandler(DHND,USHORT,MPARAM,MPARAM);
-
- /**********************************************************************/
- /* ActionHandler */
- /* */
- /* Parameters: */
- /* DHND dhnd (I): Diagram handle. */
- /* USHORT menu_id (I): Action selected by user. */
- /* MPARAM mparam1 (I): PM-data. */
- /* MPARAM mparam2 (I): PM-data. */
- /* */
- /* Returns: */
- /* GS_OK */
- /* */
- /* Description: */
- /* The function handles all non-generic actions. */
- /* */
- /* (Here you normally find a big switch statement with a case */
- /* for each custom action in your main menu bar. */
- /* In this example we just have one custom action, which imports */
- /* (opens) a c++ header file) */
- /**********************************************************************/
-
- SHORT GSENTRY ActionHandler(DHND dhnd,USHORT menu_id,MPARAM mparam1,
- MPARAM mparam2)
- {
- switch (menu_id)
- {
- case AID_OPEN : /* ~Import... */
- GsPutDiagModify(dhnd, GS_NO);
- GsTriggerGenericAction(dhnd, GE_OPEN, NULL);
- GsTriggerGenericAction(dhnd, GE_LAYOUT, NULL);
- break;
- }
- return GS_OK;
- }