From 09daf20b81cdae78772f07c0af22a571d7cc73eb Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 29 Nov 2001 19:24:00 +0000 Subject: Documentation updates galore (up to chapter 7, still need to do chapter 8 and 9, tweek the appendices, and recapture the screenshots...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl_Window.html | 190 +++++++++++++++++++++---------------------- 1 file changed, 95 insertions(+), 95 deletions(-) (limited to 'documentation/Fl_Window.html') diff --git a/documentation/Fl_Window.html b/documentation/Fl_Window.html index 2323a38e3..a245e2d52 100644 --- a/documentation/Fl_Window.html +++ b/documentation/Fl_Window.html @@ -20,17 +20,17 @@

Description

- This widget produces an actual window. This can either be a main -window, with a border and title and all the window management controls, -or a "subwindow" inside a window. This is controlled by whether or not -the window has a parent(). + This widget produces an actual window. This can either be a main +window, with a border and title and all the window management controls, +or a "subwindow" inside a window. This is controlled by whether or not +the window has a parent().

Once you create a window, you usually add children Fl_Widget 's to it by using window->add(child) for each new widget. See Fl_Group for more information +href=Fl_Group.html#Fl_Group>Fl_Group for more information on how to add and remove children.

-

There are several subclasses of Fl_Window that provide +

There are several subclasses of Fl_Window that provide double-buffering, overlay, menu, and OpenGL support.

-

The window's callback is done if the user tries to close a window +

The window's callback is done if the user tries to close a window using the window manager and Fl::modal() is zero or equal to the window. Fl_Window has a default callback that calls Fl_Window::hide().

@@ -89,9 +89,9 @@ place to show the window or allow the user to pick a location. If you want to force a position you should call position(x,y) or hotspot() before calling show(). -

Fl_Widget::box() is set to FL_FLAT_BOX. If you -plan to completely fill the window with children widgets you should -change this to FL_NO_BOX. If you turn the window border off +

Fl_Widget::box() is set to FL_FLAT_BOX. If you +plan to completely fill the window with children widgets you should +change this to FL_NO_BOX. If you turn the window border off you may want to change this to FL_UP_BOX.

Fl_Window::Fl_Window(int x, int y, int w, int h, const char *title = 0)

@@ -100,157 +100,157 @@ you may want to change this to FL_UP_BOX.

leaves visible() set to true.

virtual Fl_Window::~Fl_Window()

- The destructor also deletes all the children. This allows a -whole tree to be deleted at once, without having to keep a pointer to + The destructor also deletes all the children. This allows a +whole tree to be deleted at once, without having to keep a pointer to all the children in the user code. A kludge has been done so the -Fl_Window and all of it's children can be automatic (local) -variables, but you must declare the Fl_Window first so -that it is destroyed last. -

void Fl_Window::size_range(int minw, +Fl_Window and all of it's children can be automatic (local) +variables, but you must declare the Fl_Window first so +that it is destroyed last. +

void Fl_Window::size_range(int minw, int minh, int maxw=0, int maxh=0, int dw=0, int dh=0, int aspect=0)

- Set the allowable range the user can resize this window to. This only -works for top-level windows. + Set the allowable range the user can resize this window to. This only +works for top-level windows. - If this function is not called, FLTK tries to figure out the range + If this function is not called, FLTK tries to figure out the range from the setting of resizable(): - It is undefined what happens if the current size does not fit in the -constraints passed to size_range(). + It is undefined what happens if the current size does not fit in the +constraints passed to size_range().

virtual void Fl_Window::show()
void Fl_Window::show(int argc, char **argv)

-Put the window on the screen. Usually this has the side effect of -opening the display. The second form is used for top-level -windows and allow standard arguments to be parsed from the +Put the window on the screen. Usually this has the side effect of +opening the display. The second form is used for top-level +windows and allow standard arguments to be parsed from the command-line. -

If the window is already shown then it is restored and raised to the +

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.

virtual void Fl_Window::hide()

- Remove the window from the screen. If the window is already hidden or + Remove the window from the screen. If the window is already hidden or has not been shown then this does nothing and is harmless.

int Fl_Window::shown() const

Returns non-zero if show() has been called (but not hide() -). You can tell if a window is iconified with (w->shown() -&!w->visible()). +). You can tell if a window is iconified with (w->shown() +&!w->visible()).

void Fl_Window::iconize()

- Iconifies the window. If you call this when shown() is false -it will show() it as an icon. If the window is already -iconified this does nothing. + Iconifies the window. If you call this when shown() is false +it will show() it as an icon. If the window is already +iconified this does nothing.

Call show() to restore the window.

-

When a window is iconified/restored (either by these calls or by the +

When a window is iconified/restored (either by these calls or by the user) the handle() method is called with FL_HIDE and FL_SHOW events and visible() is turned on and off.

-

There is no way to control what is drawn in the icon except with the -string passed to Fl_Window::xclass(). You should not rely on +

There is no way to control what is drawn in the icon except with the +string passed to Fl_Window::xclass(). You should not rely on window managers displaying the icons.

void Fl_Window::resize(int,int,int,int)

- Change 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. + Change 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 + and position(w,h), which are inline wrappers for this virtual function.

void Fl_Window::free_position()

Undoes the effect of a previous resize() or show() - so that the next time show() is called the window manager is -free to position the window. -

void Fl_Window::hotspot(int x, int y, int + so that the next time show() is called the window manager is +free to position the window. +

void Fl_Window::hotspot(int x, int y, int offscreen = 0)
void Fl_Window::hotspot(const Fl_Widget*, int offscreen = 0)
void Fl_Window::hotspot(const Fl_Widgetp, int offscreen = 0)

-position() the window so that the mouse is pointing at the -given position, or at the center of the given widget, which may be the -window itself. If the optional offscreen parameter is -non-zero, then the window is allowed to extend off the screen (this -does not work with some X window managers). +position() the window so that the mouse is pointing at the +given position, or at the center of the given widget, which may be the +window itself. If the optional offscreen parameter is +non-zero, then the window is allowed to extend off the screen (this +does not work with some X window managers).

void Fl_Window::fullscreen()

- Makes the window completely fill the screen, without any window -manager border visible. You must use fullscreen_off() to undo -this. This may not work with all window managers. -

int Fl_Window::fullscreen_off(int + Makes the window completely fill the screen, without any window +manager border visible. You must use fullscreen_off() to undo +this. This may not work with all window managers. +

int Fl_Window::fullscreen_off(int x, int y, int w, int h)

Turns off any side effects of fullscreen() and does -resize(x,y,w,h). +resize(x,y,w,h).

int Fl_Window::border(int)
uchar Fl_Window::border() const

- Gets or sets whether or not the window manager border is around the -window. The default value is true. border(n) can be used to -turn the border on and off, and returns non-zero if the value has been + Gets or sets whether or not the window manager border is around the +window. The default value is true. border(n) can be used to +turn the border on and off, and returns non-zero if the value has been changed. Under most X window managers this does not work after show() has been called, although SGI's 4DWM does work.

void Fl_Window::clear_border()

-clear_border() is a fast inline function to turn the border -off. It only works before show() is called. +clear_border() is a fast inline function to turn the border +off. It only works before show() is called.

void Fl_Window::set_modal()

- A "modal" window, when shown(), will prevent any events from -being delivered to other windows in the same program, and will also -remain on top of the other windows (if the X window manager supports -the "transient for" property). Several modal windows may be shown at -once, in which case only the last one shown gets events. You can see + A "modal" window, when shown(), will prevent any events from +being delivered to other windows in the same program, and will also +remain on top of the other windows (if the X window manager supports +the "transient for" property). Several modal windows may be shown at +once, in which case only the last one shown gets events. You can see which window (if any) is modal by calling -Fl::modal(). +Fl::modal().

uchar Fl_Window::modal() const

- Returns true if this window is modal. + Returns true if this window is modal.

void Fl_Window::set_non_modal()

- A "non-modal" window (terminology borrowed from Microsoft Windows) -acts like a modal() one in that it remains on top, but it has -no effect on event delivery. There are three states for a -window: modal, non-modal, and normal. + A "non-modal" window (terminology borrowed from Microsoft Windows) +acts like a modal() one in that it remains on top, but it has +no effect on event delivery. There are three states for a +window: modal, non-modal, and normal.

uchar Fl_Window::non_modal() const

- Returns true if this window is modal or non-modal. + Returns true if this window is modal or non-modal.

void Fl_Window::label(const char*)
const char* Fl_Window::label() const

- Gets or sets the window title bar label. + Gets or sets the window title bar label.

void Fl_Window::iconlabel(const char*)
const char* Fl_Window::iconlabel() const

- Gets or sets the icon label. + Gets or sets the icon label.

void Fl_Window::xclass(const char*)
const char* Fl_Window::xclass() const

- A string used to tell the system what type of window this is. Mostly -this identifies the picture to draw in the icon. Under X, this is -turned into a XA_WM_CLASS pair by truncating at the first -non-alphanumeric character and capitalizing the first character, and -the second one if the first is 'x'. Thus "foo" turns into "foo, Foo", + A string used to tell the system what type of window this is. Mostly +this identifies the picture to draw in the icon. Under X, this is +turned into a XA_WM_CLASS pair by truncating at the first +non-alphanumeric character and capitalizing the first character, and +the second one if the first is 'x'. Thus "foo" turns into "foo, Foo", and "xprog.1" turns into "xprog, XProg". This only works if called -before calling show(). +before calling show().

Under Microsoft Windows this string is used as the name of the WNDCLASS structure, though it is not clear if this can have any visible effect.

void Fl_Window::make_current()

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 +href=drawing.html#Drawing><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 classes.

-- cgit v1.2.3