FLTK 1.3.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions
Fl_Overlay_Window Class Reference

This window provides double buffering and also the ability to draw the "overlay" which is another picture placed on top of the main image. More...

`#include <Fl_Overlay_Window.H>`

Inheritance diagram for Fl_Overlay_Window:

List of all members.

## Public Member Functions
int | can_do_overlay ()
| Returns non-zero if there's hardware overlay support.
void | flush ()
| Forces the window to be redrawn.
void | hide ()
| Removes the window from the screen.
void | redraw_overlay ()
| Call this to indicate that the overlay data has changed and needs to be redrawn.
void | resize (int, int, int, int)
| Changes the size and position of the window.
void | show ()
| Puts the window on the screen.
void | show (int a, char **b)
| Puts the window on the screen and parses command-line arguments.
| ~Fl_Overlay_Window ()
| Destroys the window and all child widgets.
## Protected Member Functions
virtual void | draw_overlay ()=0
| You must subclass Fl_Overlay_Window and provide this method.
| Fl_Overlay_Window (int W, int H, const char *l=0)
| See Fl_Overlay_Window::Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0)
| Fl_Overlay_Window (int X, int Y, int W, int H, const char *l=0)
| Creates a new Fl_Overlay_Window widget using the given position, size, and label (title) string.

## Detailed Description

This window provides double buffering and also the ability to draw the "overlay" which is another picture placed on top of the main image.

The overlay is designed to be a rapidly-changing but simple graphic such as a mouse selection box. Fl_Overlay_Window uses the overlay planes provided by your graphics hardware if they are available.

If no hardware support is found the overlay is simulated by drawing directly into the on-screen copy of the double-buffered window, and "erased" by copying the backbuffer over it again. This means the overlay will blink if you change the image in the window.

## Constructor & Destructor Documentation

Fl_Overlay_Window::Fl_Overlay_Window | ( | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | const char * | l = `0`
| ) |  | `[protected]`

Creates a new Fl_Overlay_Window widget using the given position, size, and label (title) string.

If the positions (x,y) are not given, then the window manager will choose them.

## Member Function Documentation

virtual void Fl_Overlay_Window::draw_overlay | ( |  | ) | `[protected, pure virtual]`

You must subclass Fl_Overlay_Window and provide this method.

It is just like a draw() method, except it draws the overlay. The overlay will have already been "cleared" when this is called. You can use any of the routines described in <FL/fl_draw.H>.

void Fl_Overlay_Window::hide | ( |  | ) | `[virtual]`

Removes the window from the screen.

If the window is already hidden or has not been shown then this does nothing and is harmless.

Reimplemented from Fl_Double_Window.

void Fl_Overlay_Window::redraw_overlay | ( |  | ) |

Call this to indicate that the overlay data has changed and needs to be redrawn.

The overlay will be clear until the first time this is called, so if you want an initial display you must call this after calling show().

void Fl_Overlay_Window::resize | ( | int | X,
|  | int | Y,
|  | int | W,
|  | int | H
| ) |  | `[virtual]`

Changes the size and position of the window.

If shown() is true, these changes are communicated to the window server (which may refuse that size and cause a further resize). If shown() is false, the size and position are used when show() is called. See Fl_Group for the effect of resizing on the child widgets.

You can also call the Fl_Widget methods size(x,y) and position(w,h), which are inline wrappers for this virtual function.

A top-level window can not force, but merely suggest a position and size to the operating system. The window manager may not be willing or able to display a window at the desired position or with the given dimensions. It is up to the application developer to verify window parameters after the resize request.

Reimplemented from Fl_Double_Window.

void Fl_Overlay_Window::show | ( |  | ) | `[virtual]`

Puts the window on the screen.

Usually (on X) this has the side effect of opening the display.

If the window is already shown then it is restored and raised to the top. This is really convenient because your program can call show() at any time, even if the window is already up. It also means that show() serves the purpose of raise() in other toolkits.

Fl_Window::show(int argc, char **argv) is used for top-level windows and allows standard arguments to be parsed from the command-line.

See also:
  Fl_Window::show(int argc, char **argv)

Reimplemented from Fl_Double_Window.

void Fl_Overlay_Window::show | ( | int | argc,
|  | char ** | argv
| ) |  | `[inline]`

Puts the window on the screen and parses command-line arguments.

Usually (on X) this has the side effect of opening the display.

This form should be used for top-level windows, at least for the first (main) window. It allows standard arguments to be parsed from the command-line. You can use `argc` and `argv` from main(int argc, char **argv) for this call.

The first call also sets up some system-specific internal variables like the system colors.

Todo:
  explain which system parameters are set up.

Parameters:

  argc | command-line argument count, usually from main()
  argv | command-line argument vector, usually from main()

See also:
  virtual void Fl_Window::show()

Reimplemented from Fl_Double_Window.

The documentation for this class was generated from the following files:

- Fl_Overlay_Window.H
- Fl_Double_Window.cxx
- Fl_Overlay_Window.cxx