From f09e17c3c564e8310125a10c03397cbf473ff643 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 1 Jul 2020 18:03:10 +0200 Subject: Remove $Id$ tags, update URL's, and more - remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers. --- src/Fl_Window.cxx | 60 +++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 33 deletions(-) (limited to 'src/Fl_Window.cxx') diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index db44d0450..dee4b32df 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -1,6 +1,4 @@ // -// "$Id$" -// // Window widget class for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2018 by Bill Spitzak and others. @@ -9,15 +7,15 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // // The Fl_Window is a window in the fltk library. -// This is the system-independent portions. The huge amount of +// This is the system-independent portions. The huge amount of // crap you need to do to communicate with X is in Fl_x.cxx, the // equivalent (but totally different) crap for Windows is in Fl_win32.cxx @@ -101,7 +99,7 @@ Fl_Window::~Fl_Window() { This will return sub-windows if there are any, or the parent window if there's no sub-windows. If this widget IS the top-level window, NULL is returned. \retval NULL if no window is associated with this widget. - \note for an Fl_Window widget, this returns its parent window + \note for an Fl_Window widget, this returns its parent window (if any), not this window. \see top_window() */ @@ -119,8 +117,8 @@ Fl_Window *Fl_Widget::window() const { */ Fl_Window *Fl_Widget::top_window() const { const Fl_Widget *w = this; - while (w->parent()) { w = w->parent(); } // walk up the widget hierarchy to top-level item - return const_cast(w)->as_window(); // return if window, or NULL if not + while (w->parent()) { w = w->parent(); } // walk up the widget hierarchy to top-level item + return const_cast(w)->as_window(); // return if window, or NULL if not } /** @@ -132,9 +130,9 @@ Fl_Window* Fl_Widget::top_window_offset(int& xoff, int& yoff) const { xoff = yoff = 0; const Fl_Widget *w = this; while (w && w->window()) { - xoff += w->x(); // accumulate offsets + xoff += w->x(); // accumulate offsets yoff += w->y(); - w = w->window(); // walk up window hierarchy + w = w->window(); // walk up window hierarchy } return const_cast(w)->as_window(); } @@ -153,17 +151,17 @@ int Fl_Window::y_root() const { } void Fl_Window::label(const char *name) { - label(name, iconlabel()); // platform dependent + label(name, iconlabel()); // platform dependent } /** Sets the window titlebar label to a copy of a character string */ void Fl_Window::copy_label(const char *a) { Fl_Widget::copy_label(a); - label(label(), iconlabel()); // platform dependent + label(label(), iconlabel()); // platform dependent } void Fl_Window::iconlabel(const char *iname) { - label(label(), iname); // platform dependent + label(label(), iname); // platform dependent } // the Fl::atclose pointer is provided for back compatibility. You @@ -255,7 +253,7 @@ void Fl_Window::default_xclass(const char *xc) \see Fl_Window::default_xclass(const char *) */ -void Fl_Window::xclass(const char *xc) +void Fl_Window::xclass(const char *xc) { if (xclass_) { free(xclass_); @@ -497,7 +495,7 @@ void Fl_Window::draw() // Other windows do not draw their labels at all, unless drawn by their // parent widgets or by special draw() methods (derived classes). - if (damage() & ~FL_DAMAGE_CHILD) { // draw the entire thing + if (damage() & ~FL_DAMAGE_CHILD) { // draw the entire thing draw_box(box(),0,0,w(),h(),color()); // draw box with x/y = 0 if (image() && (align() & FL_ALIGN_INSIDE)) { // draw the image only @@ -587,7 +585,7 @@ int Fl_Window::handle(int ev) break; } } - + return Fl_Group::handle(ev); } @@ -599,15 +597,15 @@ int Fl_Window::handle(int ev) from the setting of resizable():
  • If resizable() is NULL (this is the default) then the window cannot - be resized and the resize border and max-size control will not be - displayed for the window.
  • + be resized and the resize border and max-size control will not be + displayed for the window.
  • If either dimension of resizable() is less than 100, then that is - considered the minimum size. Otherwise the resizable() has a minimum - size of 100.
  • + considered the minimum size. Otherwise the resizable() has a minimum + size of 100.
  • If either dimension of resizable() is zero, then that is also the - maximum size (so the window cannot resize in that direction).
  • + maximum size (so the window cannot resize in that direction).
- + It is undefined what happens if the current size does not fit in the constraints passed to size_range(). @@ -646,11 +644,11 @@ int Fl_Window::screen_num() { /** Assigns a non-rectangular shape to the window. This function gives an arbitrary shape (not just a rectangular region) to an Fl_Window. An Fl_Image of any dimension can be used as mask; it is rescaled to the window's dimension as needed. - + The layout and widgets inside are unaware of the mask shape, and most will act as though the window's rectangular bounding box is available to them. It is up to you to make sure they adhere to the bounds of their masking shape. - + The \p img argument can be an Fl_Bitmap, Fl_Pixmap, Fl_RGB_Image or Fl_Shared_Image: \li With Fl_Bitmap or Fl_Pixmap, the shaped window covers the image part where bitmap bits equal one, or where the pixmap is not fully transparent. @@ -659,7 +657,7 @@ int Fl_Window::screen_num() { \li With an Fl_RGB_Image of depth 1 (gray-scale) or 3 (RGB), the shaped window covers the non-black image part. \li With an Fl_Shared_Image, the shape is determined by rules above applied to the underlying image. The shared image should not have been scaled through Fl_Image::scale(). - + Platform details: \li On the unix/linux platform, the SHAPE extension of the X server is required. This function does control the shape of Fl_Gl_Window instances. @@ -671,12 +669,12 @@ int Fl_Window::screen_num() { with depths 1 or 3, white and black are in and out of the shaped window, respectively, and other colors give intermediate masking scores. This function does nothing with class Fl_Gl_Window. - + The window borders and caption created by the window system are turned off by default. They can be re-enabled by calling Fl_Window::border(1). - + A usage example is found at example/shapedwindow.cxx. - + \version 1.3.3 */ void Fl_Window::shape(const Fl_Image* img) {pWindowDriver->shape(img);} @@ -691,7 +689,3 @@ const Fl_Image* Fl_Window::shape() {return pWindowDriver->shape();} /** Returns true when a window is being rescaled */ bool Fl_Window::is_a_rescale() {return Fl_Window_Driver::is_a_rescale_;} - -// -// End of "$Id$". -// -- cgit v1.2.3