FLTK 1.3.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

Fl_Counter.H

    00001 //
    00002 // "$Id: Fl_Counter.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
    00003 //
    00004 // Counter header file for the Fast Light Tool Kit (FLTK).
    00005 //
    00006 // Copyright 1998-2010 by Bill Spitzak and others.
    00007 //
    00008 // This library is free software. Distribution and use rights are outlined in
    00009 // the file "COPYING" which should have been included with this file.  If this
    00010 // file is missing or damaged, see the license at:
    00011 //
    00012 //     http://www.fltk.org/COPYING.php
    00013 //
    00014 // Please report all bugs and problems on the following page:
    00015 //
    00016 //     http://www.fltk.org/str.php
    00017 //
    00018
    00019 /* \file
    00020    Fl_Counter widget . */
    00021
    00022 // A numerical value with up/down step buttons.  From Forms.
    00023
    00024 #ifndef Fl_Counter_H
    00025 #define Fl_Counter_H
    00026
    00027 #ifndef Fl_Valuator_H
    00028 #include "Fl_Valuator.H"
    00029 #endif
    00030
    00031 // values for type():
    00032 #define FL_NORMAL_COUNTER       0
    00033 #define FL_SIMPLE_COUNTER       1
    00048 class FL_EXPORT Fl_Counter : public Fl_Valuator {
    00049
    00050   Fl_Font textfont_;
    00051   Fl_Fontsize textsize_;
    00052   Fl_Color textcolor_;
    00053   double lstep_;
    00054   uchar mouseobj;
    00055   static void repeat_callback(void *);
    00056   int calc_mouseobj();
    00057   void increment_cb();
    00058
    00059 protected:
    00060
    00061   void draw();
    00062
    00063 public:
    00064
    00065   int handle(int);
    00066
    00067   Fl_Counter(int X, int Y, int W, int H, const char* L = 0);
    00068   ~Fl_Counter();
    00069
    00075   void lstep(double a) {lstep_ = a;}
    00076
    00081   void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;}
    00082
    00087   void step(double a) {Fl_Valuator::step(a);}
    00088
    00092   double step() const {return Fl_Valuator::step();}
    00093
    00095   Fl_Font textfont() const {return textfont_;}
    00097   void textfont(Fl_Font s) {textfont_ = s;}
    00098
    00100   Fl_Fontsize textsize() const {return textsize_;}
    00102   void textsize(Fl_Fontsize s) {textsize_ = s;}
    00103
    00105   Fl_Color textcolor() const {return textcolor_;}
    00107   void textcolor(Fl_Color s) {textcolor_ = s;}
    00108
    00109 };
    00110
    00111 #endif
    00112
    00113 //
    00114 // End of "$Id: Fl_Counter.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
    00115 //