1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <TITLE>Fl_Slider</TITLE> |
---|
4 | </HEAD> |
---|
5 | <BODY> |
---|
6 | <!-- NEW PAGE --> |
---|
7 | <H2><A name=Fl_Slider>class Fl_Slider</A></H2> |
---|
8 | <HR> |
---|
9 | <H3>Class Hierarchy</H3> |
---|
10 | <UL> |
---|
11 | <PRE> |
---|
12 | <A href=Fl_Valuator.html#Fl_Valuator>Fl_Valuator</A> |
---|
13 | | |
---|
14 | +----<B>Fl_Slider</B> |
---|
15 | | |
---|
16 | +----<A href=Fl_Scrollbar.html#Fl_Scrollbar>Fl_Scrollbar</A>, <A href=Fl_Value_Slider.html#Fl_Value_Slider>Fl_Value_Slider</A> |
---|
17 | </PRE> |
---|
18 | </UL> |
---|
19 | <H3>Include Files</H3> |
---|
20 | <UL> |
---|
21 | <PRE> |
---|
22 | #include <FL/Fl_Slider.H> |
---|
23 | </PRE> |
---|
24 | </UL> |
---|
25 | <H3>Description</H3> |
---|
26 | The <TT>Fl_Slider</TT> widget contains a sliding knob inside a box. It |
---|
27 | if often used as a scrollbar. Moving the box all the way to the |
---|
28 | top/left sets it to the <TT>minimum()</TT>, and to the bottom/right to |
---|
29 | the <TT>maximum()</TT>. The <TT>minimum()</TT> may be greater than the <TT> |
---|
30 | maximum()</TT> to reverse the slider direction. |
---|
31 | <P ALIGN=CENTER><IMG src="slider.gif" ALT="Fl_Slider widget."></P> |
---|
32 | <H3>Methods</H3> |
---|
33 | <UL> |
---|
34 | <LI><A href=#Fl_Slider.Fl_Slider>Fl_Slider</A></LI> |
---|
35 | <LI><A href=#Fl_Slider.~Fl_Slider>~Fl_Slider</A></LI> |
---|
36 | <LI><A href=#Fl_Slider.scrollvalue>scrollvalue</A></LI> |
---|
37 | <LI><A href=#Fl_Slider.slider>slider</A></LI> |
---|
38 | <LI><A href=#Fl_Slider.slider_size>slider_size</A></LI> |
---|
39 | <LI><A href=#Fl_Slider.type>type</A></LI> |
---|
40 | </UL> |
---|
41 | <H4><A name=Fl_Slider.Fl_Slider>Fl_Slider::Fl_Slider(int x, int y, int |
---|
42 | w, int h, const char *label = 0)</A></H4> |
---|
43 | Creates a new <TT>Fl_Slider</TT> widget using the given position, |
---|
44 | size, and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>. |
---|
45 | <H4><A name=Fl_Slider.~Fl_Slider>virtual Fl_Slider::~Fl_Slider()</A></H4> |
---|
46 | Destroys the valuator. |
---|
47 | <H4><A name=Fl_Slider.scrollvalue>int Fl_Slider::scrollvalue(int |
---|
48 | windowtop, int windowsize, int first, int totalsize)</A></H4> |
---|
49 | Returns <A href=Fl_Scrollbar.html#Fl_Scrollbar.value><TT> |
---|
50 | Fl_Scrollbar::value()</TT></A>. |
---|
51 | <H4><A name=Fl_Slider.slider>Fl_Boxtype Fl_Slider::slider() const |
---|
52 | <BR> void Fl_Slider::slider(Fl_Boxtype)</A></H4> |
---|
53 | Set the type of box to draw for the moving part of the slider. The |
---|
54 | color of the moving part (or of the notch in it for the nice sliders) |
---|
55 | is controlled by <TT>selection_color()</TT>. The default value of zero |
---|
56 | causes the slider to figure out what to draw from <TT>box()</TT>. |
---|
57 | <H4><A name=Fl_Slider.slider_size>float Fl_Slider::slider_size() const |
---|
58 | <BR> void Fl_Slider::slider_size(float)</A></H4> |
---|
59 | Get or set the dimensions of the moving piece of slider. This is the |
---|
60 | fraction of the size of the entire widget. If you set this to 1 then |
---|
61 | the slider cannot move. The default value is .08. |
---|
62 | <P>For the "fill" sliders this is the size of the area around the end |
---|
63 | that causes a drag effect rather than causing the slider to jump to the |
---|
64 | mouse. </P> |
---|
65 | <H4><A name=Fl_Slider.type>uchar Fl_Widget::type() const |
---|
66 | <BR> void Fl_Widget::type(uchar t)</A></H4> |
---|
67 | Setting this changes how the slider is drawn, which can be one of the |
---|
68 | following: |
---|
69 | <UL> |
---|
70 | <LI><TT>FL_VERTICAL</TT> - Draws a vertical slider (this is the |
---|
71 | default). </LI> |
---|
72 | <LI><TT>FL_HORIZONTAL</TT> - Draws a horizontal slider. </LI> |
---|
73 | <LI><TT>FL_VERT_FILL_SLIDER</TT> - Draws a filled vertical slider, |
---|
74 | useful as a progress or value meter. </LI> |
---|
75 | <LI><TT>FL_HOR_FILL_SLIDER</TT> - Draws a filled horizontal slider, |
---|
76 | useful as a progress or value meter. </LI> |
---|
77 | <LI><TT>FL_VERT_NICE_SLIDER</TT> - Draws a vertical slider with a nice |
---|
78 | looking control knob. </LI> |
---|
79 | <LI><TT>FL_HOR_NICE_SLIDER</TT> - Draws a horizontal slider with a |
---|
80 | nice looking control knob. </LI> |
---|
81 | </UL> |
---|
82 | </BODY></HTML> |
---|