File: graphele.h

package info (click to toggle)
pacman 10-13
  • links: PTS
  • area: main
  • in suites: woody
  • size: 664 kB
  • ctags: 1,108
  • sloc: cpp: 3,333; makefile: 502; sh: 96
file content (47 lines) | stat: -rw-r--r-- 1,055 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef __graphele_h_
#define __graphele_h_

#include"systspec.h"
#include"object.h"
#include"usrinter.h"
#include"shapes.h"
#include"colour.h"
#include"types.h"

//decide the pixmap type
#ifdef XWIN
#define PIXMAPTYPE Pixmap
#elif defined MSWIN
#define PIXMAPTYPE HBITMAP
#elif defined VTX
#define PIXMAPTYPE char
#endif 
 
class GraphElement : public Object {
 protected:

#ifdef XWIN				//for X-Win only
Display *display;			//pointer to display connection
Window window;				//the window itself
int screen;				//the screen
GC gc;					//the graphic context
unsigned int depth;			//the screen depth 

#elif defined MSWIN			//for MS-Win only
HWND hwnd;				//handle to the window itself
HDC hdcMemory;				//handle to the device context memory
#endif
 
PIXMAPTYPE pixmap; 			//this is the pixmap
 
void consfn(); 				//function to help with constructing
void pix(PIXMAPTYPE *,SHAPETYPE [],COLOURTYPE,COLOURTYPE);	//create pixmap

public:

virtual void draw(int,int);		//draw graphical element
virtual ~GraphElement(void)=0;        	//destructor
};

#endif