From d5b47034a7575151963f1fc85a4630f68208e73a Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Sat, 13 May 2000 20:03:20 +0000 Subject: Added Fl::first_window(window) to change which window is at the top of the window list. This window is used as the "parent" of any modal windows you create so it is a good idea to be able to change it. Normally it is whatever window got the last event. Fixed Fl_Menu::global handler to use first_window so if a modal window pops up in response it is parented to the window containing the menubar rather than the current top window. This was an annoying bug! Copied fl_line_style() and the line_style demo over from fltk 2.0 because I am tired of mailing this code to people. Better to advertise this as "added fl_line_style() function to set line thickness, dash patterns, and end caps". Fixed the documentation for these changes. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/functions.html | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'documentation/functions.html') diff --git a/documentation/functions.html b/documentation/functions.html index c875420e8..638a3853b 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -478,8 +478,23 @@ only valid until the next event is processed. absolute position of an Fl_Window on the screen, use the difference between event_x_root(),event_y_root() and event_x(),event_y(). +

static Fl_Window *Fl::first_window()

- Returns the first top-level window in the widget hierarchy. +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. + +

static Fl_Window *Fl::next_window(Fl_Window *)

+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(). + +

static void Fl::first_window(Fl_Window*)

+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. +

static void Fl::flush()

Causes all the windows that need it to be redrawn and graphics forced out through the pipes. This is what wait() does before @@ -591,9 +606,6 @@ windows shown(). The modal() window has its handle() method called for all events, and no other windows will have handle() called (grab() overrides this). -

static Fl_Window *Fl::next_window(Fl_Window *) -

- Returns the next top-level window in the widget hierarchy.

static void Fl::own_colormap()

Makes FLTK use its own colormap. This may make FLTK display better and will reduce conflicts with other programs that want lots of colors. -- cgit v1.2.3