/* @(#)Z 1.8.1.1 com/src/samples/t3part/iodt3.idl, odt3part, od96nt, odnt9712d 97/03/21 17:35:47 (96/10/08 15:55:57) */
//#====START_GENERATED_PROLOG======================================
//#
//#
//#   COMPONENT_NAME: odt3part
//#
//#   CLASSES: none
//#
//#   ORIGINS: 27
//#
//#
//#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
//#   All Rights Reserved
//#   Licensed Materials - Property of IBM
//#   US Government Users Restricted Rights - Use, duplication or
//#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//#
//#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
//#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
//#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
//#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
//#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
//#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
//#   OR PERFORMANCE OF THIS SOFTWARE.
//#
//#====END_GENERATED_PROLOG========================================
//#


// *********************************************************************
//   File:      iodt3.idl
//   Contains:  Class definition for an Embeddable TicTacToe Game Part
// *********************************************************************



#ifndef _T3GAMEPART_
#define _T3GAMEPART_

#ifndef _CONTAINER_
#include <iodbasec.idl>
#endif



//======================================================================
// Classes defined in this interface
//======================================================================

interface  T3GamePart;
interface  M_T3GamePart;

//======================================================================
// Classes used by this interface
//======================================================================

interface  BaseContainer;
interface  M_BaseContainer;
interface  ODFacet;
interface  ODMenuBar;
interface  ODSession;



//======================================================================
// Implementation Types
//======================================================================

#ifdef __PRIVATE__

typedef somToken        T3GameModel;

#endif          // end of __PRIVATE__



//======================================================================
// T3GamePart Implementation
//======================================================================

interface T3GamePart : BaseContainer
{
        short   WhoAmI();
        void    WonByX(                 in short        winningSquare );
        void    WonByO(                 in short        winningSquare );


#ifdef __SOMIDL__
  implementation
        {
        dllname = "iodt3.dll";
        functionprefix = T3GamePart;
        metaclass      = M_T3GamePart;

        override:
                somInit,
                somUninit,
                Draw,
                HasExtension,
                Initialize,
                ReadContents,
                WriteContents,
                HandleMouseUp,
                HandleMenuEvent;

        releaseorder:
                WhoAmI,
                WonByX,
                WonByO;


        majorversion = 0;
        minorversion = 0;



#ifdef __PRIVATE__

        T3GameModel*    fGameModel;
        short           fGameSquare;           // current selected square
                                               // used by WhoAmI to report
                                               // what square an embedded game
                                               // is in

        short           fMySquare;             // what square were we in the
                                               // containing TTT board

        char*           fStatusMsg;            // T3GameException msg

        char*           fWinner;               // NLS Who won the embedded game
        char*           fInvMoveMsg;           // NLS Invalid Move msg
        char*           fOWinsMsg;             // NLS O Wins the Game msg
        char*           fXWinsMsg;             // NLS X Wins the Game msg
        char*           fTieGameMsg;           // NLS Tie Game msg
        char*           fTicTacToeMsg;         // NLS TicTacToe Anyone msg

        char*           fXToken;               // NLS X Game Token
        char*           fOToken;               // NLS O Game Token

        ODPlatformMenu  fGameMenu;             // new / quit
        ODMenuBar       fMenuBar;              // Base Menubar
        ODSession       fSession;
        ODPart          fPartWrapper;


#endif //__PRIVATE__

  }; // end implementation section

#endif //__SOMIDL__

}; // end interface definition


// ******************************************************************

interface M_T3GamePart : M_BaseContainer
{

#ifdef __SOMIDL__
  implementation
  {
    functionprefix = M_T3GamePart;

    override:
        clsGetODPartHandlerName,
        clsGetODPartHandlerDisplayName,
        clsGetODPartKinds,
        clsGetOLE2ClassId,
        clsGetWindowsIconFileName;
  };

#endif  // _SOMIDL__
};

#endif //_T3GAMEPART_

