home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
pc
/
0400
/
CCE_0423.ZIP
/
CCE_0423.PD
/
GEM.ZOO
/
slider.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-26
|
1KB
|
64 lines
/////////////////////////////////////////////////////////////////////////////
//
// Slider - an example of how to extend GEMobject
//
// This file is public domain.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef Slider_h
#define Slider_h
#include "gemo.h"
// A Knob passes touches to the given object (which must really be it's
// parent for that object to understand the location of the click).
class Knob : public GEMobject
{
public:
Knob(int RSCindex, GEMform& f, GEMobject *tell);
// A touch is translated to a touch on the "tell" object,
// located at the middle of this object.
void touch(int x, int y);
private:
GEMobject *Tell;
};
class Slider : public GEMobject
{
public:
Slider(int knob, int rack, GEMform& f);
operator int () const;
operator double () const;
void operator() (int);
void operator() (double);
void Range(int min, int max);
void touch(int x, int y);
private:
Knob K;
int Min,Max;
};
/* Left as an exercise for the reader :-)...
class ArrowedSlider : public Slider
{
public:
ArrowedSlider(int Slider, int Rack, int Knob, int More, int Less, GEMform& f);
void Speed(int);
private:
int speed=256;
};
*/
#endif