home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Zone
/
VRZONE.ISO
/
mac
/
PC
/
PCGLOVE
/
GLOVE
/
OBJGLV.ZIP
/
INCLUDE
/
GLOVMOUS.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-08
|
2KB
|
88 lines
//
// GlovMous.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 __GLOVMOUS_HPP
#define __GLOVMOUS_HPP
#include <owl.h>
#include <static.h>
#include "smooth.hpp"
#include "mousgest.hpp"
_CLASSDEF(TGloveApp)
class TGloveApp : public TApplication
{
InitFile * gloveIni;
rawGlove * GLOVE1;
GloveMouseGestures *gloveGesture1;
GestureSystem *gestSys;
HCURSOR HGloveCursor, OldCursor;
int width, height;
float xsensitivity, ysensitivity;
public:
TGloveApp(LPSTR AName, HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
: TApplication(AName, hInstance, hPrevInstance, lpCmdLine, nCmdShow),
GLOVE1(NULL), gloveGesture1(NULL),
gestSys(NULL), HGloveCursor(NULL) {
width = GetSystemMetrics(SM_CXSCREEN);
height = GetSystemMetrics(SM_CYSCREEN);
}
~TGloveApp();
void Setup();
virtual void InitMainWindow();
virtual void InitApplication();
virtual void InitInstance();
virtual void IdleAction();
static void graphicsOutput(gloveDriver & gd, void * app);
void InitGlove();
};
_CLASSDEF(TMyWindow)
class TScreenWindow : 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);
}
protected:
virtual void SetupWindow();
public:
TScreenWindow(PTWindowsObject AParent, LPSTR ATitle, PTModule AModule);
~TScreenWindow();
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