home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Zone
/
VRZONE.ISO
/
mac
/
PC
/
PCGLOVE
/
GLOVE
/
OBJGLV.ZIP
/
INCLUDE
/
WINGLOVE.HPP
< prev
Wrap
C/C++ Source or Header
|
1993-05-12
|
3KB
|
99 lines
//
// WinGlove.hpp:
// Interface Definition of classes TDemoWindow and TGloveApp.
// Example use of Object Glove.
//
// Purpose:
// Sets up the Windows glove application.
//
// Compatibility:
// Windows only!
//
// Copyright 1993 Mark Thomas Pflaging
//
// Date: 3/22/93 (Release 3.0)
//
#ifndef __WINGLOVE_HPP
#define __WINGLOVE_HPP
#include <owl.h>
#include <static.h>
#include "smooth.hpp"
#include "glsnd.hpp"
#include "wingest.hpp"
class winGraphicsActor;
_CLASSDEF(TGloveApp)
class TGloveApp : public TApplication
{
InitFile * gloveIni;
rawGlove * GLOVE1, *GLOVE2;
winGraphicsActor *gloveGraph1, *gloveGraph2;
// soundActor *gloveSound1;
winGestureActor *gloveGesture1;
winGestureActor *gloveGesture2;
GestureSystem *gestSys, *gestSys2;
int howMany;
public:
TGloveApp(LPSTR AName, HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
: TApplication(AName, hInstance, hPrevInstance, lpCmdLine, nCmdShow),
GLOVE1(NULL), GLOVE2(NULL),
gloveGraph1(NULL), gloveGraph2(NULL),
/* gloveSound1(NULL), */ gloveGesture1(NULL), gloveGesture2(NULL),
gestSys(NULL), gestSys2(NULL) {
if (strlen(lpCmdLine) > 0) howMany = atoi(lpCmdLine);
else howMany = 1;
}
~TGloveApp();
winGraphicsActor * getGlvGrph() { return gloveGraph1; }
winGraphicsActor * getGlvGrph2() { return gloveGraph2; }
void Setup();
virtual void InitMainWindow();
virtual void InitApplication();
virtual void InitInstance();
virtual void IdleAction();
static void graphicsOutput(gloveDriver & gd, void * app);
static void graphicsOutput2(gloveDriver & gd, void * app);
virtual BOOL CanClose();
};
_CLASSDEF(TMyWindow)
class TDemoWindow : public TWindow
{
COLORREF PenColor;
HDC DragDC;
HPEN ThePen;
LOGBRUSH BrushData;
HBRUSH TheBrush;
static HGDIOBJ oldPen;
static HGDIOBJ oldBrush;
int PenSize;
HICON hGloveIcon;
void ActivateBrush() {
DeleteObject(TheBrush);
TheBrush = CreateBrushIndirect(& BrushData);
// SelectObject(TheBrush);
}
protected:
virtual void SetupWindow();
public:
TDemoWindow(PTWindowsObject AParent, LPSTR ATitle);
~TDemoWindow();
virtual BOOL CanClose();
void SetPenSize(int NewSize);
void SetPenColor(COLORREF NewColor);
void setupHDC(HDC DC, int currentColor);
void releaseHDC(HDC DC);
void infoDisplay(gloveDriver & gd);
virtual void Paint(HDC DC, PAINTSTRUCT& PS);
virtual void GetWindowClass(WNDCLASS & AWndClass);
};
#endif