2006-10-29 17:16:03 +03:00
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<TITLE>Fl_Scrollbar</TITLE>
|
|
|
|
</HEAD>
|
|
|
|
<BODY>
|
2001-11-28 21:00:17 +03:00
|
|
|
<!-- NEW PAGE -->
|
1999-01-13 22:28:54 +03:00
|
|
|
<H2><A name=Fl_Scrollbar>class Fl_Scrollbar</A></H2>
|
|
|
|
<HR>
|
|
|
|
<H3>Class Hierarchy</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
<A href=Fl_Slider.html#Fl_Slider>Fl_Slider</A>
|
1998-12-29 17:21:17 +03:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
+----<B>Fl_Scrollbar</B>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Include Files</H3>
|
|
|
|
<UL>
|
|
|
|
<PRE>
|
|
|
|
#include <FL/Fl_Scrollbar.H>
|
|
|
|
</PRE>
|
|
|
|
</UL>
|
|
|
|
<H3>Description</H3>
|
2001-11-29 22:24:00 +03:00
|
|
|
The <TT>Fl_Scrollbar</TT> widget displays a slider with arrow buttons
|
|
|
|
at the ends of the scrollbar. Clicking on the arrows move up/left and
|
1999-01-13 22:28:54 +03:00
|
|
|
down/right by <TT>linesize()</TT>. Scrollbars also accept <TT>
|
2001-11-29 22:24:00 +03:00
|
|
|
FL_SHORTCUT</TT> events: the arrows move by <TT>linesize()</TT>, and
|
1999-01-13 22:28:54 +03:00
|
|
|
vertical scrollbars take Page Up/Down (they move by the page size minus <TT>
|
2001-11-29 22:24:00 +03:00
|
|
|
linesize()</TT>) and Home/End (they jump to the top or bottom).
|
|
|
|
<P>Scrollbars have <TT>step(1)</TT> preset (they always return
|
|
|
|
integers). If desired you can set the <TT>step()</TT> to non-integer
|
|
|
|
values. You will then have to use casts to get at the floating-point
|
1999-01-13 22:28:54 +03:00
|
|
|
versions of <TT>value()</TT> from <TT>Fl_Slider</TT>. </P>
|
2001-10-01 00:25:36 +04:00
|
|
|
<P ALIGN=CENTER><IMG src="scrollbar.gif" ALT="Fl_Scrollbar widget."></P>
|
1999-01-13 22:28:54 +03:00
|
|
|
<H3>Methods</H3>
|
|
|
|
<UL>
|
|
|
|
<LI><A href=#Fl_Scrollbar.Fl_Scrollbar>Fl_Scrollbar</A></LI>
|
|
|
|
<LI><A href=#Fl_Scrollbar.~Fl_Scrollbar>~Fl_Scrollbar</A></LI>
|
|
|
|
<LI><A href=#Fl_Scrollbar.linesize>linesize</A></LI>
|
|
|
|
<LI><A href=#Fl_Scrollbar.value>value</A></LI>
|
|
|
|
</UL>
|
2001-11-29 22:24:00 +03:00
|
|
|
<H4><A name=Fl_Scrollbar.Fl_Scrollbar>Fl_Scrollbar::Fl_Scrollbar(int x,
|
1999-01-13 22:28:54 +03:00
|
|
|
int y, int w, int h, const char *label = 0)</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
Creates a new <TT>Fl_Scrollbar</TT> widget using the given position,
|
|
|
|
size, and label string. You need to do <TT>type(FL_HORIZONTAL)</TT> if
|
|
|
|
you want a horizontal scrollbar.
|
|
|
|
<H4><A name=Fl_Scrollbar.~Fl_Scrollbar>virtual
|
1999-01-13 22:28:54 +03:00
|
|
|
Fl_Scrollbar::~Fl_Scrollbar()</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
Destroys the valuator.
|
1999-01-13 22:28:54 +03:00
|
|
|
<H4><A name=Fl_Scrollbar.linesize>int Fl_Scrollbar::linesize() const
|
|
|
|
<BR> void Fl_Scrollbar::linesize(int i)</A></H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
This number controls how big the steps are that the arrow keys do. In
|
1999-01-13 22:28:54 +03:00
|
|
|
addition page up/down move by the size last sent to <TT>value()</TT>
|
2001-11-29 22:24:00 +03:00
|
|
|
minus one <TT>linesize()</TT>. The default is 16.
|
1999-01-13 22:28:54 +03:00
|
|
|
<H4><A name=Fl_Scrollbar.value>int Fl_Scrollbar::value()
|
|
|
|
<BR> int Fl_Scrollbar::value(int position, int size, int top, int total)</A>
|
|
|
|
</H4>
|
2001-11-29 22:24:00 +03:00
|
|
|
The first form returns the integer value of the scrollbar. You can get
|
|
|
|
the floating point value with <TT>Fl_Slider::value()</TT>. The second
|
1999-01-13 22:28:54 +03:00
|
|
|
form sets <TT>value()</TT>, <TT>range()</TT>, and <TT>slider_size()</TT>
|
2001-11-29 22:24:00 +03:00
|
|
|
to make a variable-sized scrollbar. You should call this every time
|
|
|
|
your window changes size, your data changes size, or your scroll
|
|
|
|
position changes (even if in response to a callback from this
|
2001-10-01 00:25:36 +04:00
|
|
|
scrollbar). All necessary calls to <TT>redraw()</TT> are done. </BODY></HTML>
|