#ifndef __graph_x11_h #define __graph_x11_h extern "C" { #include #include } #include "graph.h" class X11Window : public GWindow { protected: typedef GC ggc; Display *display; Window window; int screen_num; int ncolors; unsigned long *color; ggc default_context; ggc current_context; ggc *context; int ncontexts; int dash_list_length[4]; unsigned char dash[2], dot[2], dash_dot[4], dash_dot_dot[6]; unsigned char *dash_list[4]; public: X11Window (Display *display, Window window, int screen_num); /* Constructor */ virtual ~X11Window (void); /* Destructor */ virtual GGC GCreateGC (void); virtual void GClearWindow (void); virtual void GDrawImageString (GGC gc, int x, int y, char *string); virtual void GDrawString (GGC gc, int x, int y, char *string); virtual void GDrawLines (GGC gc, GPoint *a, int len); virtual void GFillPolygon (GGC gc, GPoint *a, int len = 0); virtual void GFillArc (GGC gc, int x, int y, int w, int h, int start, int end, int close); virtual void GDrawArc (GGC gc, int x, int y, int w, int h, int start, int end); virtual void GSetForeground (GGC gc, int color); virtual void GSetColorTable (GColor *colors_in, int ncolors, int background); virtual void GSetLineType (GGC gc, int type); virtual void GSetLineWidth (GGC gc, int width); }; #endif