FLTK 1.3.2

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

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

Public Member Functions
Fl_Single_Window Class Reference

This is the same as Fl_Window. More...

`#include <Fl_Single_Window.H>`

Inheritance diagram for Fl_Single_Window:

List of all members.

## Public Member Functions
| Fl_Single_Window (int W, int H, const char *l=0)
| Creates a new Fl_Single_Window widget using the given size, and label (title) string.
| Fl_Single_Window (int X, int Y, int W, int H, const char *l=0)
| Creates a new Fl_Single_Window widget using the given position, size, and label (title) string.
void | flush ()
| Forces the window to be drawn, this window is also made current and calls draw().
int | make_current ()
| Sets things up so that the drawing functions in <FL/fl_draw.H> will go into this 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.

## Detailed Description

This is the same as Fl_Window.

However, it is possible that some implementations will provide double-buffered windows by default. This subcan be used to force single-buffering. This may be useful for modifying existing programs that use incremental update, or for some types of image data, such as a movie flipbook.

## Member Function Documentation

void Fl_Single_Window::flush | ( |  | ) | `[virtual]`

Forces the window to be drawn, this window is also made current and calls draw().

Reimplemented from Fl_Window.

Reimplemented in Fl_Menu_Window.

int Fl_Single_Window::make_current | ( |  | ) |

Sets things up so that the drawing functions in <FL/fl_draw.H> will go into this window.

This is useful for incremental update of windows, such as in an idle callback, which will make your program behave much better if it draws a slow graphic. Danger: incremental update is very hard to debug and maintain!

This method only works for the Fl_Window and Fl_Gl_Window derived classes.

Reimplemented from Fl_Window.

void Fl_Single_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_Window.

Reimplemented in Fl_Menu_Window.

void Fl_Single_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_Window.

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

- Fl_Single_Window.H
- Fl_Single_Window.cxx