mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 16:46:52 +08:00
Revised documentation files.
git-svn-id: file:///fltk/svn/fltk/trunk@177 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<hr break>
|
||||
|
||||
<h2><a name="Fl_Slider">class Fl_Slider</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Class Hierarchy</h3>
|
||||
|
||||
<ul><pre>
|
||||
<a href="#Fl_Valuator">Fl_Valuator</a>
|
||||
|
|
||||
+----<b>Fl_Slider</b>
|
||||
|
|
||||
+----<a href="#Fl_Scrollbar">Fl_Scrollbar</a>, <a href="#Fl_Value_Slider">Fl_Value_Slider</a>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Include Files</h3>
|
||||
|
||||
<ul><pre>
|
||||
#include <FL/Fl_Slider.H>
|
||||
</pre></ul>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
The <tt>Fl_Slider</tt> widget contains a sliding knob inside a box. It
|
||||
if often used as a scrollbar. Moving the box all the way to the
|
||||
top/left sets it to the <tt>minimum()</tt>, and to the bottom/right to
|
||||
the <tt>maximum()</tt>. The <tt>minimum()</tt> may be greater than the
|
||||
<tt>maximum()</tt> to reverse the slider direction.
|
||||
|
||||
<h3>Methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="#Fl_Slider.Fl_Slider">Fl_Slider</a>
|
||||
<li><a href="#Fl_Slider.~Fl_Slider">~Fl_Slider</a>
|
||||
<li><a href="#Fl_Slider.scrollvalue">scrollvalue</a>
|
||||
<li><a href="#Fl_Slider.slider">slider</a>
|
||||
<li><a href="#Fl_Slider.slider_size">slider_size</a>
|
||||
<li><a href="#Fl_Slider.type">type</a>
|
||||
</ul>
|
||||
|
||||
<h4><a name="Fl_Slider.Fl_Slider">Fl_Slider::Fl_Slider(int x, int y, int w, int h, const char *label = 0)</a></h4>
|
||||
|
||||
Creates a new <tt>Fl_Slider</tt> widget using the given position, size, and
|
||||
label string. The default boxtype is <tt>FL_NO_BOX</tt>.
|
||||
|
||||
<h4><a name="Fl_Slider.~Fl_Slider">virtual Fl_Slider::~Fl_Slider()</a></h4>
|
||||
|
||||
Destroys the valuator.
|
||||
|
||||
<h4><a name="Fl_Slider.scrollvalue">int Fl_Slider::scrollvalue(int windowtop, int windowsize, int first, int totalsize)</a></h4>
|
||||
|
||||
Returns <a href="#Fl_Scrollbar.value"><tt>Fl_Scrollbar::value()</tt></a>.
|
||||
|
||||
<h4><a name="Fl_Slider.">Fl_Boxtype Fl_Slider::slider() const<br>
|
||||
void Fl_Slider::slider(Fl_Boxtype)</a></h4>
|
||||
|
||||
Set the type of box to draw for the moving part of the slider. The
|
||||
color of the moving part (or of the notch in it for the nice sliders)
|
||||
is controlled by <tt>selection_color()</tt>. The default value of zero
|
||||
causes the slider to figure out what to draw from <tt>box()</tt>.
|
||||
|
||||
<h4><a name="Fl_Slider.slider_size">float Fl_Slider::slider_size() const<br>
|
||||
void Fl_Slider::slider_size(float)</a></h4>
|
||||
|
||||
Get or set the dimensions of the moving piece of slider. This is the
|
||||
fraction of the size of the entire widget. If you set this to 1 then
|
||||
the slider cannot move. The default value is .08.
|
||||
|
||||
<p>For the "fill" sliders this is the size of the area around the end
|
||||
that causes a drag effect rather than causing the slider to jump to
|
||||
the mouse.
|
||||
|
||||
<h4><a name="Fl_Slider.type">uchar Fl_Widget::type() const<br>
|
||||
void Fl_Widget::type(uchar t)</a></h4>
|
||||
|
||||
Setting this changes how the slider is drawn, which can be one of the following:
|
||||
|
||||
<ul>
|
||||
<li><tt>FL_VERTICAL</tt> - Draws a vertical slider (this is the default).
|
||||
|
||||
<li><tt>FL_HORIZONTAL</tt> - Draws a horizontal slider.
|
||||
|
||||
<li><tt>FL_VERT_FILL_SLIDER</tt> - Draws a filled vertical
|
||||
slider, useful as a progress or value meter.
|
||||
|
||||
<li><tt>FL_HOR_FILL_SLIDER</tt> - Draws a filled horizontal
|
||||
slider, useful as a progress or value meter.
|
||||
|
||||
<li><tt>FL_VERT_NICE_SLIDER</tt> - Draws a vertical slider with
|
||||
a nice looking control knob.
|
||||
|
||||
<li><tt>FL_HOR_NICE_SLIDER</tt> - Draws a horizontal slider with
|
||||
a nice looking control knob.
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user