"Fossies" - the Fresh Open Source Software Archive

Member "fltk-1.3.3/documentation/html/Fl__Slider_8H_source.html" (3 Nov 2014, 18904 Bytes) of package /linux/misc/fltk-1.3.3-docs-html.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

FLTK 1.3.3
Fl_Slider.H
1 //
2 // "$Id: Fl_Slider.H 9553 2012-05-28 15:39:12Z greg.ercolano $"
3 //
4 // Slider header file for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2010 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18 
19 /* \file
20  Fl_Slider widget . */
21 
22 #ifndef Fl_Slider_H
23 #define Fl_Slider_H
24 
25 #ifndef Fl_Valuator_H
26 #include "Fl_Valuator.H"
27 #endif
28 
29 // values for type(), lowest bit indicate horizontal:
30 #define FL_VERT_SLIDER 0
31 #define FL_HOR_SLIDER 1
32 #define FL_VERT_FILL_SLIDER 2
33 #define FL_HOR_FILL_SLIDER 3
34 #define FL_VERT_NICE_SLIDER 4
35 #define FL_HOR_NICE_SLIDER 5
36 
61 class FL_EXPORT Fl_Slider : public Fl_Valuator {
62 
63  float slider_size_;
64  uchar slider_;
65  void _Fl_Slider();
66  void draw_bg(int, int, int, int);
67 
68 protected:
69 
70  // these allow subclasses to put the slider in a smaller area:
71  void draw(int, int, int, int);
72  int handle(int, int, int, int, int);
73  void draw();
74 
75 public:
76 
77  int handle(int);
78  Fl_Slider(int X,int Y,int W,int H, const char *L = 0);
79  Fl_Slider(uchar t,int X,int Y,int W,int H, const char *L);
80 
81  int scrollvalue(int pos,int size,int first,int total);
82  void bounds(double a, double b);
83 
87  float slider_size() const {return slider_size_;}
88 
98  void slider_size(double v);
99 
101  Fl_Boxtype slider() const {return (Fl_Boxtype)slider_;}
102 
104  void slider(Fl_Boxtype c) {slider_ = c;}
105 };
106 
107 #endif
108 
109 //
110 // End of "$Id: Fl_Slider.H 9553 2012-05-28 15:39:12Z greg.ercolano $".
111 //
The Fl_Valuator class controls a single floating-point value and provides a consistent interface to s...
Definition: Fl_Valuator.H:46
Fl_Boxtype slider() const
Gets the slider box type.
Definition: Fl_Slider.H:101
virtual int handle(int event)
Handles the specified event.
Definition: Fl_Widget.cxx:97
virtual void draw()=0
Draws the widget.
float slider_size() const
Get the dimensions of the moving piece of slider.
Definition: Fl_Slider.H:87
Fl_Boxtype
Definition: Enumerations.H:473
void slider(Fl_Boxtype c)
Sets the slider box type.
Definition: Fl_Slider.H:104
The Fl_Slider widget contains a sliding knob inside a box.
Definition: Fl_Slider.H:61
void bounds(double a, double b)
Sets the minimum (a) and maximum (b) values for the valuator widget.
Definition: Fl_Valuator.H:72
unsigned char uchar
unsigned char
Definition: fl_types.h:30