home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Zone
/
VRZONE.ISO
/
mac
/
PC
/
PCGLOVE
/
GLOVE
/
OBJGLV.ZIP
/
INCLUDE
/
WINGEST.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-11
|
3KB
|
94 lines
//
// WinGest.hpp:
// Interface Definition of classes TGestureDialog and winGestureActor.
// Example use of Object Glove and Court Jesture.
//
// Purpose:
// Outputs the names of Gestures into a Windows window (actually
// a dialog box).
//
// Compatibility:
// Windows only!
//
// Copyright 1993 Mark Thomas Pflaging
//
// Date: 3/22/93 (Release 3.0)
//
#ifndef __WINGEST_HPP
#define __WINGEST_HPP
#include <owl.h>
#include <static.h>
#include <hashtbl.h>
#include "gestset.hpp"
#include "namenumb.hpp"
#include "winres.h"
#include "instance.hpp"
#define NUM_GEST_SPOTS 4
class winGestureActor;
_CLASSDEF(TGestureDialog)
class TGestureDialog : public TDialog {
TStatic *Spots[NUM_GEST_SPOTS];
winGestureActor * where;
public:
TGestureDialog(PTWindowsObject AParent, int ResourceID, PTModule AModule, winGestureActor * where_arg);
~TGestureDialog();
void infoDisplay(char * name, Boolean onOrOff);
void draw(char ** strings);
};
_CLASSDEF(TDemoWindow)
class winNameGest : public NamedGesture
{
static HashTable * table;
public:
winNameGest(char * name = NULL) : NamedGesture(name) {}
virtual void Register(Boolean onOrOff);
static void setTable(HashTable * table_arg) { table = table_arg; }
};
class CntNamedGestAct : public InstanceCounter<NamedGestSet> {
public:
CntNamedGestAct(char * name = NULL) {
GestureSet::setName(name);
}
};
// MAX_NUM_SOUNDS must be a prime number!
#define MAX_NUM_SOUNDS 1103
class winGestureActor : public CntNamedGestAct, public HashTable {
TDemoWindow * where;
PTGestureDialog DataPlace1;
static Boolean addSound(Key & which, void * gset);
char * strings[NUM_GEST_SPOTS];
public:
winGestureActor(InitFile & ini, char * gest_section, char * sound_section, TDemoWindow & arg);
winGestureActor(InitFile & ini, char * gest_section, char * sound_section);
void InitTable(InitFile & ini, char * gest_section, char * sound_section);
void setWindow(TDemoWindow & arg) { where = &arg; }
void displayDataBox();
void closeDataBox();
void Setup() {
displayDataBox();
}
virtual void Register(Gesture & found, Boolean offOrOn) {
if (DataPlace1) DataPlace1->infoDisplay(((NamedGesture &)found).getName(), offOrOn);
else infoDisplay(((NamedGesture &)found).getName(), offOrOn);
winNameGest::setTable(this);
NamedGestSet::Register(found, offOrOn);
}
virtual Gesture & CreateElement(Key & which) {
return *(new winNameGest(which.getName()));
}
char ** infoDisplay(char * name, Boolean onOrOff);
};
#endif