1 // 2 // "$Id$" 3 // 4 // Double-buffered window header file for the Fast Light Tool Kit (FLTK). 5 // 6 // Copyright 1998-2010 by Bill Spitzak and others. 7 // 8 // This library is free software. Distribution and use rights are outlined in 9 // the file "COPYING" which should have been included with this file. If this 10 // file is missing or damaged, see the license at: 11 // 12 // http://www.fltk.org/COPYING.php 13 // 14 // Please report all bugs and problems on the following page: 15 // 16 // http://www.fltk.org/str.php 17 // 18 19 /* \file 20 Fl_Double_Window widget . */ 21 22 #ifndef Fl_Double_Window_H 23 #define Fl_Double_Window_H 24 25 #include "Fl_Window.H" 26 27 /** 28 The Fl_Double_Window provides a double-buffered window. 29 If possible this will use the X double buffering extension (Xdbe). If 30 not, it will draw the window data into an off-screen pixmap, and then 31 copy it to the on-screen window. 32 <P>It is highly recommended that you put the following code before the 33 first show() of <I>any</I> window in your program: </P> 34 \code 35 Fl::visual(FL_DOUBLE|FL_INDEX) 36 \endcode 37 This makes sure you can use Xdbe on servers where double buffering 38 does not exist for every visual. 39 */ 40 class FL_EXPORT Fl_Double_Window : public Fl_Window { 41 protected: 42 void flush(int eraseoverlay); 43 /** 44 Force double buffering, even if the OS already buffers windows 45 (overlays need that on MacOS and Windows2000) 46 */ 47 char force_doublebuffering_; 48 public: 49 void show(); show(int a,char ** b)50 void show(int a, char **b) {Fl_Window::show(a,b);} 51 void flush(); 52 void resize(int,int,int,int); 53 void hide(); 54 ~Fl_Double_Window(); 55 56 /** 57 Creates a new Fl_Double_Window widget using the given 58 position, size, and label (title) string. 59 */ 60 Fl_Double_Window(int W, int H, const char *l = 0); 61 62 /** 63 See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0) 64 */ 65 Fl_Double_Window(int X, int Y, int W, int H, const char *l = 0); 66 67 }; 68 69 #endif 70 71 // 72 // End of "$Id$". 73 // 74