diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-29 19:24:00 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-11-29 19:24:00 +0000 |
| commit | 09daf20b81cdae78772f07c0af22a571d7cc73eb (patch) | |
| tree | 1641f788cafe20b505355b0479ba0d528297eb30 /documentation/Fl_Valuator.html | |
| parent | b105ab8b7fb6281635076559aae96f2b3b12fc51 (diff) | |
Documentation updates galore (up to chapter 7, still need to do chapter
8 and 9, tweek the appendices, and recapture the screenshots...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation/Fl_Valuator.html')
| -rw-r--r-- | documentation/Fl_Valuator.html | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/documentation/Fl_Valuator.html b/documentation/Fl_Valuator.html index 2875e30fe..e72d7cce3 100644 --- a/documentation/Fl_Valuator.html +++ b/documentation/Fl_Valuator.html @@ -20,16 +20,16 @@ </PRE> </UL> <H3>Description</H3> - The <TT>Fl_Valuator</TT> class controls a single floating-point value -and provides a consistent interface to set the value, range, and step, -and insures that callbacks are done the same for every object. + The <TT>Fl_Valuator</TT> class controls a single floating-point value +and provides a consistent interface to set the value, range, and step, +and insures that callbacks are done the same for every object. <P>There are probably more of these classes in FLTK than any others: </P> <P ALIGN=CENTER><IMG src="valuators.gif" ALT="Fl_Valuator widgets."></P> -<P>In the above diagram each box surrounds an actual subclass. These +<P>In the above diagram each box surrounds an actual subclass. These are further differentiated by setting the <A href=Fl_Widget.html#Fl_Widget.type><TT> -type()</TT></A> of the widget to the symbolic value labeling the +type()</TT></A> of the widget to the symbolic value labeling the widget. The ones labelled "0" are the default versions with a <TT> -type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is +type(0)</TT>. For consistency the symbol <TT>FL_VERTICAL</TT> is defined as zero.</P> <H3>Methods</H3> <CENTER> @@ -66,69 +66,69 @@ defined as zero.</P> </TD></TR> </TABLE> </CENTER> -<H4><A name=Fl_Valuator.Fl_Valuator>Fl_Valuator::Fl_Valuator(int x, int +<H4><A name=Fl_Valuator.Fl_Valuator>Fl_Valuator::Fl_Valuator(int x, int y, int w, int h, const char *label = 0)</A></H4> - Creates a new <TT>Fl_Valuator</TT> widget using the given position, -size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>. + Creates a new <TT>Fl_Valuator</TT> widget using the given position, +size, and label string. The default boxtype is <TT>FL_NO_BOX</TT>. <H4><A name=Fl_Valuator.~Fl_Valuator>virtual Fl_Valuator::~Fl_Valuator()</A> </H4> - Destroys the valuator. + Destroys the valuator. <H4><A name=Fl_Valuator.value>double Fl_Valuator::value() const <BR> int Fl_Valuator::value(double)</A></H4> - Get or set the current value. The new value is <I>not</I> clamped or + Get or set the current value. The new value is <I>not</I> clamped or otherwise changed before storing it. Use <TT>clamp()</TT> or <TT>round()</TT> - to modify the value before calling this if you want. If the new value -is different than the current one the object is redrawn. The initial -value is zero. + to modify the value before calling this if you want. If the new value +is different than the current one the object is redrawn. The initial +value is zero. <H4><A name=Fl_Valuator.minimum>double Fl_Valuator::minimum() const <BR> void Fl_Valuator::minimum(double)</A></H4> - Gets or sets the minimum value for the valuator. + Gets or sets the minimum value for the valuator. <H4><A name=Fl_Valuator.maximum>double Fl_Valuator::maximum() const <BR> void Fl_Valuator::maximum(double)</A></H4> - Gets or sets the maximum value for the valuator. -<H4><A name=Fl_Valuator.range>void Fl_Valuator::range(double min, + Gets or sets the maximum value for the valuator. +<H4><A name=Fl_Valuator.range>void Fl_Valuator::range(double min, double max);</A></H4> - Sets the minimum and maximum values for the valuator. When the user -manipulates the widget, the value is limited to this range. This -clamping is done <I>after</I> rounding to the step value (this makes a -difference if the range is not a multiple of the step). -<P>The minimum may be greater than the maximum. This has the effect of -"reversing" the object so the larger values are in the opposite -direction. This also switches which end of the filled sliders is + Sets the minimum and maximum values for the valuator. When the user +manipulates the widget, the value is limited to this range. This +clamping is done <I>after</I> rounding to the step value (this makes a +difference if the range is not a multiple of the step). +<P>The minimum may be greater than the maximum. This has the effect of +"reversing" the object so the larger values are in the opposite +direction. This also switches which end of the filled sliders is filled. </P> -<P>Some widgets consider this a "soft" range. This means they will -stop at the range, but if the user releases and grabs the control again +<P>Some widgets consider this a "soft" range. This means they will +stop at the range, but if the user releases and grabs the control again and tries to move it further, it is allowed. </P> -<P>The range may affect the display. You must <TT>redraw()</TT> the +<P>The range may affect the display. You must <TT>redraw()</TT> the widget after changing the range. </P> <H4><A name=Fl_Valuator.step>double Fl_Valuator::step() const <BR> void Fl_Valuator::step(double) <BR> void Fl_Valuator::step(int A, int B)</A></H4> - Get or set the step value. As the user moves the mouse the value is + Get or set the step value. As the user moves the mouse the value is rounded to the nearest multiple of the step value. This is done <I> -before</I> clamping it to the range. For most objects the default step -is zero. -<P>For precision the step is stored as the ratio of two integers, A/B. - You can set these integers directly. Currently setting a floating +before</I> clamping it to the range. For most objects the default step +is zero. +<P>For precision the step is stored as the ratio of two integers, A/B. + You can set these integers directly. Currently setting a floating point value sets the nearest A/1 or 1/B value possible. </P> <H4><A name=Fl_Valuator.format>int Fl_Valuator::format(char *)</A> </H4> -Format the passed value to show enough digits so that for the current +Format the passed value to show enough digits so that for the current step value. If the step has been set to zero then it does a <TT>%g</TT> -format. The characters are written into the passed buffer. +format. The characters are written into the passed buffer. <H4><A name=Fl_Valuator.round>double Fl_Valuator::round(double)</A></H4> -Round the passed value to the nearest step increment. Does nothing if -step is zero. +Round the passed value to the nearest step increment. Does nothing if +step is zero. <H4><A name=Fl_Valuator.clamp>double Fl_Valuator::clamp(double)</A></H4> -Clamp the passed value to the valuator range. -<H4><A name=Fl_Valuator.increment>double +Clamp the passed value to the valuator range. +<H4><A name=Fl_Valuator.increment>double Fl_Valuator::increment(double,int n)</A></H4> - Adds <TT>n</TT> times the step value to the passed value. If step was -set to zero it uses <TT>fabs(maximum() - minimum()) / 100</TT>. + Adds <TT>n</TT> times the step value to the passed value. If step was +set to zero it uses <TT>fabs(maximum() - minimum()) / 100</TT>. <H4><A name=Fl_Valuator.changed>int Fl_Widget::changed() const</A></H4> - This value is true if the user has moved the slider. It is turned off -by <TT>value(x)</TT> and just before doing a callback (the callback can -turn it back on if desired). + This value is true if the user has moved the slider. It is turned off +by <TT>value(x)</TT> and just before doing a callback (the callback can +turn it back on if desired). <H4><A name=Fl_Valuator.set_changed>void Fl_Widget::set_changed()</A></H4> Sets the <TT>changed()</TT> flag. <H4><A name=Fl_Valuator.clear_changed>void Fl_Widget::clear_changed()</A> |
