home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_01
/
1001129a
< prev
next >
Wrap
Text File
|
1991-11-19
|
1KB
|
59 lines
#ifndef _WINCLASSDEF
#define _WINCLASSDEF
#include <stddef.h>
#include <conio.h>
#include "region.h"
// The basic window class
extern class win : public region
{
protected:
static win *topwin; // Class variable holds top window
static win *lastwin; // Last window
// Cursor location when window isn't on top
int oldx;
int oldy;
// Default screen color
unsigned int color;
// Pointer to next window on stack
win *next; // Pointer to next window
win *prev; // Previous window
int margin; // Margins support borders on the windows
// Private method to register top window
void settop(void);
public:
// Methods:
// Constructor:
win(int x0=1,int y0=1,int x1=80,int y1=25,
unsigned int clr=7,int mar=0);
// Destructor. This is virtual to support boxwindows, etc.
virtual ~win();
// Force window to top of stack
void maketop();
};
// Windows with borders
extern class boxwin : public win
{
public:
boxwin(int x0=2,int y0=2,int x1=79,int y1=24,
unsigned int clr=7,int boxt=0);
};
// General purpose box drawing routine
void draw_box(int type,int x0,int y0,int x1,int y1);
#endif