Fl_Double_Window.H 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // "$Id: Fl_Double_Window.H 11359 2016-03-13 22:16:37Z matt $"
  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. /* \file
  19. Fl_Double_Window widget . */
  20. #ifndef Fl_Double_Window_H
  21. #define Fl_Double_Window_H
  22. #include "Fl_Window.H"
  23. /**
  24. The Fl_Double_Window provides a double-buffered window.
  25. If possible this will use the X double buffering extension (Xdbe). If
  26. not, it will draw the window data into an off-screen pixmap, and then
  27. copy it to the on-screen window.
  28. <P>It is highly recommended that you put the following code before the
  29. first show() of <I>any</I> window in your program: </P>
  30. \code
  31. Fl::visual(FL_DOUBLE|FL_INDEX)
  32. \endcode
  33. This makes sure you can use Xdbe on servers where double buffering
  34. does not exist for every visual.
  35. */
  36. class FL_EXPORT Fl_Double_Window : public Fl_Window
  37. {
  38. public:
  39. /**
  40. Return non-null if this is an Fl_Overlay_Window object.
  41. */
  42. virtual Fl_Double_Window *as_double_window() {return this; }
  43. void show();
  44. void show(int a, char **b) {Fl_Window::show(a,b);}
  45. void resize(int,int,int,int);
  46. void hide();
  47. void flush();
  48. ~Fl_Double_Window();
  49. /**
  50. Creates a new Fl_Double_Window widget using the given
  51. position, size, and label (title) string.
  52. */
  53. Fl_Double_Window(int W, int H, const char *l = 0);
  54. /**
  55. See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0)
  56. */
  57. Fl_Double_Window(int X, int Y, int W, int H, const char *l = 0);
  58. DECLARE_CLASS_CHEAP_RTTI_2(Fl_Double_Window, Fl_Window)
  59. };
  60. #endif
  61. //
  62. // End of "$Id: Fl_Double_Window.H 11359 2016-03-13 22:16:37Z matt $".
  63. //