FLTK 1.3.0
|
This is the same as Fl_Window. More...
#include <Fl_Single_Window.H>
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 (int a, char **b) |
Puts the window on the screen and parses command-line arguments. | |
void | show () |
Puts the window on the screen. |
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.
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.
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.
argc | command-line argument count, usually from main() |
argv | command-line argument vector, usually from main() |
Reimplemented from Fl_Window.