
//# This file was generated by the SOM Compiler.
//# FileName: wpstutor.id2.
//# Generated using:
//#     SOM Precompiler somopc: 2.7
//#     SOM Emitter emitidl: 2.22

//
//
//   Module Name: WPSTUTOR
//
//   Description: OS/2 Work Place Shell Sample Program
//
//                This class subclasses the WPDataFile class.  Most WPS
//                instance and class methods are overridden to invoke
//                'DisplayMethodInfo'.  This function uses a named pipe
//                to communicate with the 'Show Method Description'
//                (SHOWDESC.EXE) program, which displays the name and a
//                description of the method that invoked
//                'DisplayMethodInfo'.
//
//   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.
//

#ifndef wpstutor_idl
#define wpstutor_idl

#include "wpdataf.idl"
#include <somcls.idl>

interface M_WPSTutorial;

interface WPSTutorial : WPDataFile

//
// CLASS: WPSTutorial
//
// CLASS HIERARCHY:
//
//     SOMObject
//       ÀÄÄ WPObject
//             ÀÄÄ WPFileSystem
//                   ÀÄÄ WPDataFile
//                         ÀÄÄ WPSTutorial
//
// DESCRIPTION:
//
//    This is the sample WPS tutorial object class.  This class subclasses
//    the WPDataFile class.  Most WPS instance and class methods are
//    overridden to invoke 'DisplayMethodInfo'.  This function uses a named
//    pipe to communicate with the 'Show Method Description' (SHOWDESC.EXE)
//    program, which displays the name and a description of the method that
//    invoked 'DisplayMethodInfo'.
//
//    An instance of this class can be created as a Workplace object.
//

{
  HWND DisplayTitleInfo();

  //
  // METHOD: DisplayTitleInfo                               ( ) PRIVATE
  //                                                        (X) PUBLIC
  // DESCRIPTION:
  //
  //   This method handles the processing of the "Open tutorial" menu item
  //   in the "Open" menu of the object's context menu.  The method creates a
  //   PM window in order to display the (backwards) title of the object in
  //   the window's title bar.
  //
  // RETURN:
  //
  //   HWND - Handle to the window created
  //



#ifdef __SOMIDL__
  implementation {

    releaseorder: DisplayTitleInfo;

    //# Class Modifiers
    filestem = wpstutor;
    functionprefix = wpstut_;
    majorversion = 1;
    minorversion = 1;
    local;
    metaclass = M_WPSTutorial;
    callstyle = oidl;

#ifdef __PRIVATE__
    passthru C_h_after =      ""
"/*"
"**  The following structure is used to store window specific data"
"**  and a pointer to the object that created the window."
"**"
"**  This structure is allocated when the Client window is created."
"**  This allows us to pass the *somSelf pointer and use it in our window"
"**  and dialog procedures (the system only passes this pointer to"
"**  methods)."
"*/"
""
"typedef struct _WINDOWDATA"
"{"
"   USHORT       cb;            /* size of this structure */"
"   WPSTutorial  *somSelf;       /* pointer to this instance */"
"   USEITEM      UseItem;       /* global class usage information */"
"   VIEWITEM     ViewItem;      /* global class view information */"
"} WINDOWDATA;"
"typedef WINDOWDATA *PWINDOWDATA;"
""
"/*"
"**  Private debug helpers go here.  They can be enabled or disabled by"
"**  defining DEBUG as a compiler directive."
"*/"
"#if defined(DEBUG)"
""
"   #define DebugBox(title, text) \"
"                                 \"
"              WinMessageBox(     \"
"                 HWND_DESKTOP,   \"
"                 HWND_DESKTOP,   \"
"                 (PSZ) text,     \"
"                 (PSZ) title,    \"
"                 20,             \"
"                 MB_OK | MB_INFORMATION | MB_MOVEABLE)"
"#else"
""
"   #define DebugBox(title, text)   /* do nothing if not debugging */"
""
"#endif  /* DEBUG */"
"";
#endif  /*__ PRIVATE__ */

    passthru C_ih =     ""
"#define INCL_WIN"
"#define INCL_DOS"
"#define INCL_WPCLASS"
""
"#include <os2.h>"
"#include <stdlib.h>"
"#include <string.h>"
""
"/*"
"**   The following user-defined Popup menu items (ID_xxx) should be higher"
"**   than WPMENUID_USER."
"**"
"**   The ID_OPENMENU will become a submenu of the system's popup open menu"
"**   id, WPMENUID_OPEN."
"*/"
"#define ID_OPENMENU     (WPMENUID_USER+1)   /* \"Open\" item in context menu   */"
"#define IDM_OPENTUT     (WPMENUID_USER+2)   /* \"Open tutorial\" item added    */"
"                                            /*   to \"Open\" menu              */"
"#define ID_ICON         101                 /* Icon for the WPSTutorial class*/"
""
"/*"
"**  Window IDs"
"*/"
"#define ID_FRAME        3000                /* Client window ID for the      */"
"                                            /*   \"open\" view                 */"
"/*"
"**  Unique view IDs"
"*/"
"#define OPEN_TUTORIAL   ID_OPENMENU         /* \"Open tutorial\" view ID       */"
"";


    //# Method Modifiers
    wpAddFileMenuPage: override;
    wpAddFileTypePage: override;
    wpAddFile1Page: override;
    wpAddFile2Page: override;
    wpAddFile3Page: override;
    wpAddObjectGeneralPage: override;
    wpAddSettingsPages: override;
    wpAddToObjUseList: override;
    wpAllocMem: override;
    wpClose: override;
    wpCopiedFromTemplate: override;
    wpCopyObject: override;
    wpCreateFromTemplate: override;
    wpCreateShadowObject: override;
    wpDelete: override;
    wpDeleteFromObjUseList: override;
    wpDoesObjectMatch: override;
    wpDraggedOverObject: override;
    wpDragOver: override;
    wpDrop: override;
    wpDroppedOnObject: override;
    wpEndConversation: override;
    wpFilterPopupMenu: override;
    wpFindUseItem: override;
    wpFormatDragItem: override;
    wpFree: override;
    wpFreeMem: override;
    wpHide: override;
    wpInitData: override;
    wpInsertPopupMenuItems: override;
    wpInsertSettingsPage: override;
    wpMenuItemSelected: override;
    wpModifyPopupMenu: override;
    wpOpen: override;
    wpQueryConfirmations: override;
    wpQueryDefaultView: override;
    wpQueryDetailsData: override;
    wpQueryHandle: override;
    wpQueryIcon: override;
    wpQueryIconData: override;
    wpQueryRealName: override;
    wpQueryStyle: override;
    wpQueryTitle: override;
    wpQueryType: override;
    wpRegisterView: override;
    wpRender: override;
    wpRenderComplete: override;
    wpRestore: override;
    wpRestoreData: override;
    wpRestoreLong: override;
    wpRestoreState: override;
    wpRestoreString: override;
    wpSaveData: override;
    wpSaveDeferred: override;
    wpSaveImmediate: override;
    wpSaveLong: override;
    wpSaveState: override;
    wpSaveString: override;
    wpSetDefaultView: override;
    wpSetIcon: override;
    wpSetIconData: override;
    wpSetRealName: override;
    wpSetStyle: override;
    wpSetTitle: override;
    wpSetType: override;
    wpSetup: override;
    wpSwitchTo: override;
    wpUnlockObject: override;
    wpUnInitData: override;

  };
#endif /* __SOMIDL__ */
};

interface M_WPSTutorial
{
  HMODULE clsQueryModuleHandle();

  //
  // METHOD: clsQueryModuleHandle
  //
  // DESCRIPTION:
  //
  //   This method obtains and returns the module handle for the object class.
  //
  // RETURN:
  //
  //   0        - Unsuccessful execution
  //   Non-zero - Module handle
  //



#ifdef __SOMIDL__
  implementation {

    releaseorder: clsQueryModuleHandle;

    //# Class Modifiers
    filestem = wpstutor;
    functionprefix = wpstutM_;
    majorversion = 1;
    minorversion = 1;
    local;
    callstyle = oidl;

    //# Method Modifiers
    wpclsCreateDefaultTemplates: override;
    wpclsFindObjectEnd: override;
    wpclsFindObjectFirst: override;
    wpclsFindObjectNext: override;
    wpclsInitData: override;
    wpclsMakeAwake: override;
    wpclsNew: override;
    wpclsQueryDefaultView: override;
    wpclsQueryDetails: override;
    wpclsQueryDetailsInfo: override;
    wpclsQueryFolder: override;
    wpclsQueryIcon: override;
    wpclsQueryIconData: override;
    wpclsQueryInstanceFilter: override;
    wpclsQueryInstanceType: override;
    wpclsQueryObject: override;
    wpclsQuerySettingsPageSize: override;
    wpclsQueryStyle: override;
    wpclsQueryTitle: override;
    wpclsUnInitData: override;

  };
#endif /* __SOMIDL__ */
};

#endif  /* wpstutor_idl */
