FLTK 1.4.0
Windows handling functions

Windows and standard dialogs handling declared in <FL/Fl.H> More...

Functions

static void Fl::default_atclose (Fl_Window *, void *)
 Default callback for window widgets. More...
 
static Fl_WindowFl::first_window ()
 Returns the first top-level window in the list of shown() windows. More...
 
static void Fl::first_window (Fl_Window *)
 Sets the window that is returned by first_window(). More...
 
static Fl_WindowFl::grab ()
 Returns the window that currently receives all events. More...
 
static void Fl::grab (Fl_Window *)
 Selects the window to grab. More...
 
static Fl_WindowFl::modal ()
 Returns the top-most modal() window currently shown. More...
 
static Fl_WindowFl::next_window (const Fl_Window *)
 Returns the next top-level window in the list of shown() windows. More...
 
static void Fl::set_abort (Fl_Abort_Handler f)
 For back compatibility, sets the void Fl::fatal handler callback.
 
static void Fl::set_atclose (Fl_Atclose_Handler f)
 For back compatibility, sets the Fl::atclose handler callback. More...
 

Variables

static void(* Fl::atclose )(Fl_Window *, void *)
 Back compatibility: default window callback handler. More...
 

Detailed Description

Windows and standard dialogs handling declared in <FL/Fl.H>

Function Documentation

◆ default_atclose()

void Fl::default_atclose ( Fl_Window window,
void *  v 
)
static

Default callback for window widgets.

It hides the window and then calls the default widget callback.

◆ first_window() [1/2]

Fl_Window * Fl::first_window ( )
static

Returns the first top-level window in the list of shown() windows.

If a modal() window is shown this is the top-most modal window, otherwise it is the most recent window to get an event.

◆ first_window() [2/2]

void Fl::first_window ( Fl_Window window)
static

Sets the window that is returned by first_window().

The window is removed from wherever it is in the list and inserted at the top. This is not done if Fl::modal() is on or if the window is not shown(). Because the first window is used to set the "parent" of modal windows, this is often useful.

◆ grab() [1/2]

static Fl_Window * Fl::grab ( )
inlinestatic

Returns the window that currently receives all events.

Returns
The window that currently receives all events, or NULL if event grabbing is currently OFF.

◆ grab() [2/2]

void Fl::grab ( Fl_Window win)
static

Selects the window to grab.

This is used when pop-up menu systems are active.

Send all events to the passed window no matter where the pointer or focus is (including in other programs). The window does not have to be shown() , this lets the handle() method of a "dummy" window override all event handling and allows you to map and unmap a complex set of windows (under both X and Windows some window must be mapped because the system interface needs a window id).

If grab() is on it will also affect show() of windows by doing system-specific operations (on X it turns on override-redirect). These are designed to make menus popup reliably and faster on the system.

To turn off grabbing do Fl::grab(0).

Be careful that your program does not enter an infinite loop while grab() is on. On X this will lock up your screen! To avoid this potential lockup, all newer operating systems seem to limit mouse pointer grabbing to the time during which a mouse button is held down. Some OS's may not support grabbing at all.

◆ modal()

static Fl_Window * Fl::modal ( )
inlinestatic

Returns the top-most modal() window currently shown.

This is the most recently shown() window with modal() true, or NULL if there are no modal() windows shown(). The modal() window has its handle() method called for all events, and no other windows will have handle() called (grab() overrides this).

◆ next_window()

Fl_Window * Fl::next_window ( const Fl_Window window)
static

Returns the next top-level window in the list of shown() windows.

You can use this call to iterate through all the windows that are shown().

Parameters
[in]windowmust be shown and not NULL

◆ set_atclose()

static void Fl::set_atclose ( Fl_Atclose_Handler  f)
inlinestatic

For back compatibility, sets the Fl::atclose handler callback.

You can now simply change the callback for the window instead.

See also
Fl_Window::callback(Fl_Callback*)

Variable Documentation

◆ atclose

void(* Fl::atclose)(Fl_Window *, void *)=default_atclose
staticdefault

Back compatibility: default window callback handler.

See also
Fl::set_atclose()