FLTK 1.3.2

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

- File List
- File Members

Fl_Slider.H

    00001 //
    00002 // "$Id: Fl_Slider.H 9553 2012-05-28 15:39:12Z greg.ercolano $"
    00003 //
    00004 // Slider 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_Slider widget . */
    00021
    00022 #ifndef Fl_Slider_H
    00023 #define Fl_Slider_H
    00024
    00025 #ifndef Fl_Valuator_H
    00026 #include "Fl_Valuator.H"
    00027 #endif
    00028
    00029 // values for type(), lowest bit indicate horizontal:
    00030 #define FL_VERT_SLIDER          0
    00031 #define FL_HOR_SLIDER           1
    00032 #define FL_VERT_FILL_SLIDER     2
    00033 #define FL_HOR_FILL_SLIDER      3
    00034 #define FL_VERT_NICE_SLIDER     4
    00035 #define FL_HOR_NICE_SLIDER      5
    00036
    00061 class FL_EXPORT Fl_Slider : public Fl_Valuator {
    00062
    00063   float slider_size_;
    00064   uchar slider_;
    00065   void _Fl_Slider();
    00066   void draw_bg(int, int, int, int);
    00067
    00068 protected:
    00069
    00070   // these allow subclasses to put the slider in a smaller area:
    00071   void draw(int, int, int, int);
    00072   int handle(int, int, int, int, int);
    00073   void draw();
    00074
    00075 public:
    00076
    00077   int handle(int);
    00078   Fl_Slider(int X,int Y,int W,int H, const char *L = 0);
    00079   Fl_Slider(uchar t,int X,int Y,int W,int H, const char *L);
    00080
    00081   int scrollvalue(int pos,int size,int first,int total);
    00082   void bounds(double a, double b);
    00083
    00087   float slider_size() const {return slider_size_;}
    00088
    00098   void slider_size(double v);
    00099
    00101   Fl_Boxtype slider() const {return (Fl_Boxtype)slider_;}
    00102
    00104   void slider(Fl_Boxtype c) {slider_ = c;}
    00105 };
    00106
    00107 #endif
    00108
    00109 //
    00110 // End of "$Id: Fl_Slider.H 9553 2012-05-28 15:39:12Z greg.ercolano $".
    00111 //