From 1a86a0ede02de76c617165fb3555c192f0b74347 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 19 Oct 1998 20:46:58 +0000 Subject: The great heading change - now use standard LGPL header with CVS tags. git-svn-id: file:///fltk/svn/fltk/trunk@19 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Adjuster.cxx | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'src/Fl_Adjuster.cxx') diff --git a/src/Fl_Adjuster.cxx b/src/Fl_Adjuster.cxx index a9b39d7bf..db5d66f87 100644 --- a/src/Fl_Adjuster.cxx +++ b/src/Fl_Adjuster.cxx @@ -1,6 +1,28 @@ -// Fl_Adjuster.C +// +// "$Id" +// +// Adjuster widget for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems to "fltk-bugs@easysw.com". +// -// Fltk widget for drag-adjusting a floating point value. #include #include @@ -57,14 +79,14 @@ int Fl_Adjuster::handle(int event) { delta = x()+(drag-1)*w()/3; // left edge of button if (mx < delta) delta = mx-delta; - else if (mx > delta+w()/3) // right edge of button + else if (mx > (delta+w()/3)) // right edge of button delta = mx-delta-w()/3; else delta = 0; } else { if (mx < x()) delta = mx-x(); - else if (mx > x()+w()) + else if (mx > (x()+w())) delta = mx-x()-w(); else delta = 0; @@ -103,3 +125,7 @@ Fl_Adjuster::Fl_Adjuster(int x, int y, int w, int h, const char* l) drag = 0; soft_ = 1; } + +// +// End of "$Id: Fl_Adjuster.cxx,v 1.2 1998/10/19 20:45:35 mike Exp $". +// -- cgit v1.2.3