2 // "$Id: Fl_Counter.H,v 1.2 2002/12/01 15:38:37 neurosurg Exp $"
4 // Counter header file for the Fast Light Tool Kit (FLTK).
6 // Copyright 1998-2002 by Bill Spitzak and others.
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Library General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Library General Public License for more details.
18 // You should have received a copy of the GNU Library General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 // Please report all bugs and problems to "fltk-bugs@fltk.org".
26 // A numerical value with up/down step buttons. From Forms.
32 #include "Fl_Valuator.H"
36 #define FL_NORMAL_COUNTER 0
37 #define FL_SIMPLE_COUNTER 1
39 class FL_EXPORT Fl_Counter : public Fl_Valuator {
41 uchar textfont_, textsize_;
45 static void repeat_callback(void *);
56 Fl_Counter(int,int,int,int,const char * = 0);
58 void lstep(double a) {lstep_ = a;}
59 void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;}
60 void step(double a) {Fl_Valuator::step(a);}
61 Fl_Font textfont() const {return (Fl_Font)textfont_;}
62 void textfont(uchar s) {textfont_ = s;}
63 uchar textsize() const {return textsize_;}
64 void textsize(uchar s) {textsize_ = s;}
65 Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
66 void textcolor(unsigned s) {textcolor_ = s;}
73 // End of "$Id: Fl_Counter.H,v 1.2 2002/12/01 15:38:37 neurosurg Exp $".