/****************************************************************************
**
**  Name:  present.cpp
**
**  Description:
**     Base class for presenter window.
**
**  $Log:   S:/tbird/arcppc/baselib/present.cpv  $
** 
**    Rev 1.0   17 Jan 1997 09:10:02   kevin
** Initial revision.
** 
**    Rev 1.0   03 Jun 1996 11:11:58   gene
** Initial revision.
** 
**    Rev 1.0   07 Sep 1995 10:01:48   gene
** Initial revision.
** 
**    Rev 1.0   14 Jul 1993 17:30:18   marilyn
** Initial revision.
**  
**  $Header:   S:/tbird/arcppc/baselib/present.cpv   1.0   17 Jan 1997 09:10:02   kevin  $
**
**  Copyright (C) 1991-93 Microtek International.  All rights reserved.
**
*****************************************************************************/

                       /****************************
                        *                          *
                        *       INCLUDE FILES      *
                        *                          *
			****************************/

#define WIN31
#include <owl.h>
//#include <oodewsc.h>

#ifndef _GENPRES_
#include "genpres.h"
#endif

//#ifndef _STATBAR_
//#include "statbar.h"
//#endif

//#ifndef _TOOLBAR_
//#include "toolbar.h"
//#endif
			/****************************
                        *                          *
                        *     LOCAL DEFINITIONS    *
                        *                          *
			****************************/

//#define TBIT0 401
//#define TBStyle (WS_CHILD+WS_VISIBLE+tbs_Ridged+tbs_TwoState+tbs_ButtonLike)

//tbbRec Tools101[2] = {
//   {TBIT0,0,0},
//   {TBIT0,0,0}};

char TPresenterWin::presenterWinClassName[] = "PresenterWin";

		       /****************************
                        *                          *
                        *    EXTERNAL VARIABLES    *
                        *                          *
                        ****************************/

extern PTModule BCModule;

                       /****************************
                        *                          *
                        *     LOCAL PROTOTYPES     *
                        *                          *
			****************************/


		       /****************************
			*                          *
                        *      EXECUTABLE CODE     *
                        *                          *
                        ****************************/




//------------------------------------------------------------------
TPresenterWin::TPresenterWin(PTWindowsObject AParent,LPSTR ATitle,
      PTModule AModule) : TWindow(AParent,ATitle, AModule) {

   hPresenterToolBar = 0;
   hPresenterStatus = 0;

}

//-------------------------------------------------------------------
void TPresenterWin::SetupWindow() {

   AssignMenu("BASIC_MENU");
//   FocusChildHandle = NULL;
//   SB = new TStatusWin(this,"StatusBar",NULL,
//         GetApplication()->hInstance);
//   CreateStatusWindow(HWindow,GetApplication()->hInstance,
//	 &hPresenterStatus);
//   CreateToolBarWindow(HWindow,GetApplication()->hInstance,
//         &hPresenterToolBar);
//   TB = new TToolBarWin(this,101,2,&Tools101);
//   TB = new TToolbar(this, 101,
//       0,0,                     // X, Y
//       TB_WIDTH,                // width
//       TB_HEIGHT,               // height
//       TB_BAR_STYLE,            // window style
//       TB_SEC_STYLE,            // secondary style
//       TBIT_WIDTH,              // bitmap unit width
//       TBIT_HEIGHT,             // bitmap unit height
//       TBIT_BORDER,TBIT_BORDER, // border width, height
//       2,                       // toolbit count
//       &Tools101);              // array of toolbit ID//   SetTransferBuffer(NULL);
//   EnableTransfer();
//   EnableAutoCreate();
   TWindow::SetupWindow();
//   hPresenterToolBar = TB->HWindow;
//   hPresenterStatus = SB->HWindow;
   
}

//-------------------------------------------------------------------
//void TPresenterWin::WMMenuSelect(RTMessage Msg) {
//   SendMessage(hPresenterStatus, Msg.Message, Msg.WParam,Msg.LParam);
//}

//-------------------------------------------------------------------
//void TPresenterWin::WMSize(RTMessage Msg) {

//   DefWndProc(Msg);
//   Msg.Message = PM_STATUS_RESIZE;
//   SendMessage(hPresenterStatus, Msg.Message, Msg.WParam,Msg.LParam);
//   Msg.Message = PM_TOOLBAR_RESIZE;
//   SendMessage(hPresenterToolBar, Msg.Message, Msg.WParam,Msg.LParam);
   
//}

//------------------------------------------------------------------
//void TPresenterWin::dwmToolReleased(RTMessage Msg) {

//   switch(Msg.LP.Lo) {
//      case TBIT0: break;
//   }  
//}

//--------------------------------------------------------------------
//void TPresenterWin::WMLButtonDown(RTMessage) {
//   MessageBox(HWindow, "You pressed left mouse button!",
//      "Message Dispatched", MB_OK);
//}

//--------------------------------------------------------------------
//void TPresenterWin::WMRButtonDown(RTMessage) {
//   MessageBox(HWindow, "You pressed right mouse button!",
//      "Message Dispatched", MB_OK);
//}

//--------------------------------------------------------
// EXPORTED C INTERFACE
//--------------------------------------------------------
#if defined (STRICT)
RETCODE EXPORT CreatePresenterWindow(HWND ParentWindow,LPSTR ATitle,
      PTWindowsObject *presenterWindow) {
#else
RETCODE EXPORT CreatePresenterWindow(HWND ParentWindow,LPSTR ATitle,
      PTWindowsObject *presenterWindow) {
#endif

   PTWindowsObject ParentAlias;

   if (ParentWindow == NULL)
      ParentAlias = NULL;
   else
      ParentAlias = BCModule->GetParentObject(ParentWindow);
   *presenterWindow = new TPresenterWin(ParentAlias,ATitle,BCModule);
   BCModule->MakeWindow(*presenterWindow);
   return GOOD;
}



//------------------------- E O F ---------------------------------//
