home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / graphtal / x11_wndw.h < prev    next >
C/C++ Source or Header  |  1992-10-19  |  1KB  |  55 lines

  1. /*
  2.  * X11_Window.h - class definition x11 window support.
  3.  *
  4.  * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  */
  17.  
  18. #ifndef X11_Window_H
  19. # define X11_Window_H
  20.  
  21. #include <X11/Xlib.h>
  22. #include <X11/Xutil.h>
  23. #include <X11/Xatom.h>
  24.  
  25. #include "BaseWindow.h"
  26.  
  27. //___________________________________________________________ X11_Window
  28.  
  29. class X11_Window : public BaseWindow
  30. {
  31. public:
  32.   X11_Window();
  33.  
  34.   void open(int resX, int resY, const rcString& windowName);
  35.   void close();
  36.   void clear();
  37.   char waitForKey();
  38.   void writeText(const rcString&, int, int);
  39.  
  40. protected:
  41.   void drawLine(int, int, int, int);
  42.   void flush();
  43.  
  44. private:
  45.   Display* display;
  46.   Window win;
  47.   char* display_name;
  48.   GC gc;
  49.   XSegment* segments;
  50.   long RequestSize;
  51.   int segmentsInBuffer;
  52. };
  53.  
  54. #endif // X11_Window_H
  55.