libs-gui/Documentation/gsdoc/NSSlider.html
Richard Frith-MacDonald f086b4e60a Fixed linking
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6444 72102866-910b-0410-8b05-ffd578937521
2000-04-10 05:29:53 +00:00

342 lines
10 KiB
HTML

<html><head>
<title>NSSlider</title>
</head>
<body>
<a href="NSSecureTextFieldCell.html">[Previous]</a>
<a href="Gui.html">[Up]</a>
<a href="NSSliderCell.html">[Next]</a>
<h1>NSSlider</h1>
<h3>Authors</h3>
<dl>
<dt><a href="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a>
<dd>
<dt>James Dessart
<dd>
</dl>
<p>Version: 0.2.1</p>
<p>Date: 8 April, 2000</p>
<h2><a name="cont-0">NSSlider</a></h2>
<h2><a name="NSSlider">NSSlider</a></h2>
<p><b>Declared in:</b> Gui/NSSlider.h</p>
<p><b>Inherits from:</b> NSControl</p>
<p><b>Conforms to:</b> NSCoding
</p>
<hr>
<p>
An NSSlider displays, and allows control of, some value in the application.
It represents a continuous stream of values of type <code>float</code>, which
can be retrieved by the method <code>floatValue</code> and set by the method
<code>setFloatValue:</code>.</p>
<p>
This control is a continuous control. It sends its action message as long
as the user is manipulating it. This can be changed by passing <code>NO</code>
to the <code>setContinuous:</code> message of a given NSSlider.</p>
<p>
Although methods for adding and managing a title are provided, the slider's
knob can cover this title, so it is recommended that a label be added near the
slider, for identification.</p>
<p>
As with many controls, NSSlider relies on its cell counterpart, NSSliderCell.
For more information, please see the specification for NSSliderCell.</p>
<p>
Use of an NSSlider to do the role of an NSScroller is not recommended. A
scroller is intended to represent the visible portion of a view, whereas a slider
is intended to represent some value.</p>
<ul>
<li><a href="NSSlider.html#method-0">-acceptsFirstMouse:</a>
<li><a href="NSSlider.html#method-1">-allowsTickMarkValuesOnly</a>
<li><a href="NSSlider.html#method-2">-altIncrementValue</a>
<li><a href="NSSlider.html#method-3">-closestTickMarkValueToValue:</a>
<li><a href="NSSlider.html#method-4">-image</a>
<li><a href="NSSlider.html#method-5">-indexOfTickMarkAtPoint:</a>
<li><a href="NSSlider.html#method-6">-isVertical</a>
<li><a href="NSSlider.html#method-7">-knobThickness</a>
<li><a href="NSSlider.html#method-8">-maxValue</a>
<li><a href="NSSlider.html#method-9">-minValue</a>
<li><a href="NSSlider.html#method-10">-numberOfTickMarks</a>
<li><a href="NSSlider.html#method-11">-rectOfTickMarkAtIndex:</a>
<li><a href="NSSlider.html#method-12">-setAllowsTickMarkValuesOnly:</a>
<li><a href="NSSlider.html#method-13">-setAltIncrementValue:</a>
<li><a href="NSSlider.html#method-14">-setImage:</a>
<li><a href="NSSlider.html#method-15">-setKnobThickness:</a>
<li><a href="NSSlider.html#method-16">-setMaxValue:</a>
<li><a href="NSSlider.html#method-17">-setMinValue:</a>
<li><a href="NSSlider.html#method-18">-setNumberOfTickMarks:</a>
<li><a href="NSSlider.html#method-19">-setTickMarkPosition:</a>
<li><a href="NSSlider.html#method-20">-setTitle:</a>
<li><a href="NSSlider.html#method-21">-setTitleCell:</a>
<li><a href="NSSlider.html#method-22">-setTitleColor:</a>
<li><a href="NSSlider.html#method-23">-setTitleFont:</a>
<li><a href="NSSlider.html#method-24">-tickMarkPosition</a>
<li><a href="NSSlider.html#method-25">-tickMarkValueAtIndex:</a>
<li><a href="NSSlider.html#method-26">-title</a>
<li><a href="NSSlider.html#method-27">-titleCell</a>
<li><a href="NSSlider.html#method-28">-titleColor</a>
<li><a href="NSSlider.html#method-29">-titleFont</a>
</ul>
<hr>
<h2><a name="method-0">acceptsFirstMouse:</a></h2>
- (BOOL) <b>acceptsFirstMouse:</b> (NSEvent*)mouseDownEvent<br>
<p>
Returns <code>YES</code> by default. This will allow the first click sent to
the slider, when in an inactive window, to both bring the window into focus and
manipulate the slider.</p>
<hr>
<h2><a name="method-1">allowsTickMarkValuesOnly</a></h2>
- (BOOL) <b>allowsTickMarkValuesOnly</b><br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-2">altIncrementValue</a></h2>
- (double) <b>altIncrementValue</b><br>
<p>
Returns the value by which the slider will be incremented if the user holds down
the ALT key.</p>
<hr>
<h2><a name="method-3">closestTickMarkValueToValue:</a></h2>
- (double) <b>closestTickMarkValueToValue:</b> (double)aValue<br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-4">image</a></h2>
- (NSImage*) <b>image</b><br>
<p>
Returns the image drawn in the slider's track. Returns <code>nil</code> if
this has not been set.</p>
<hr>
<h2><a name="method-5">indexOfTickMarkAtPoint:</a></h2>
- (int) <b>indexOfTickMarkAtPoint:</b> (NSPoint)point<br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-6">isVertical</a></h2>
- (int) <b>isVertical</b><br>
<p>
Returns whether or not the slider is vertical. If, for some reason, this cannot
be determined, for such reasons as the slider is not yet displayed, this method
returns -1. Generally, a slider is considered vertical if its height is greater
than its width.</p>
<hr>
<h2><a name="method-7">knobThickness</a></h2>
- (float) <b>knobThickness</b><br>
<p>
Returns the thickness of the slider's knob. This value is in pixels, and is the
size of the knob along the slider's track.</p>
<hr>
<h2><a name="method-8">maxValue</a></h2>
- (double) <b>maxValue</b><br>
<p>
Returns the maximum value that the slider represents.</p>
<hr>
<h2><a name="method-9">minValue</a></h2>
- (double) <b>minValue</b><br>
<p>
Returns the minimum value that the slider represents.</p>
<hr>
<h2><a name="method-10">numberOfTickMarks</a></h2>
- (int) <b>numberOfTickMarks</b><br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-11">rectOfTickMarkAtIndex:</a></h2>
- (NSRect) <b>rectOfTickMarkAtIndex:</b> (int)index<br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-12">setAllowsTickMarkValuesOnly:</a></h2>
- (void) <b>setAllowsTickMarkValuesOnly:</b> (BOOL)flag<br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-13">setAltIncrementValue:</a></h2>
- (void) <b>setAltIncrementValue:</b> (double)increment<br>
<p>
Sets the value by which the slider will be incremented, when the
ALT key is held down, to <var>increment</var>.</p>
<hr>
<h2><a name="method-14">setImage:</a></h2>
- (void) <b>setImage:</b> (NSImage*)barImage<br>
<p>
Sets the image to be displayed in the slider's track to <var>barImage</var>.</p>
<hr>
<h2><a name="method-15">setKnobThickness:</a></h2>
- (void) <b>setKnobThickness:</b> (float)thickness<br>
<p>
Sets the thickness of the knob to <var>thickness</var>, in pixels. This value
sets the amount of space which the knob takes up in the slider's track.</p>
<hr>
<h2><a name="method-16">setMaxValue:</a></h2>
- (void) <b>setMaxValue:</b> (double)maxValue<br>
<p>
Sets the maximum value that the sliders represents to <var>maxValue</var>.</p>
<hr>
<h2><a name="method-17">setMinValue:</a></h2>
- (void) <b>setMinValue:</b> (double)minValue<br>
<p>
Sets the minimum value that the slider represents to <var>minValue</var>.</p>
<hr>
<h2><a name="method-18">setNumberOfTickMarks:</a></h2>
- (void) <b>setNumberOfTickMarks:</b> (int)numberOfTickMarks<br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-19">setTickMarkPosition:</a></h2>
- (void) <b>setTickMarkPosition:</b> (NSTickMarkPosition)position<br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-20">setTitle:</a></h2>
- (void) <b>setTitle:</b> (NSString*)barTitle<br>
<p>
Sets the title of the slider to <var>barTitle</var>. This title is displayed
on the slider's track, behind the knob.</p>
<hr>
<h2><a name="method-21">setTitleCell:</a></h2>
- (void) <b>setTitleCell:</b> (NSCell*)titleCell<br>
<p>
Sets the cell used to draw the title to <var>titleCell</var>.</p>
<hr>
<h2><a name="method-22">setTitleColor:</a></h2>
- (void) <b>setTitleColor:</b> (NSColor*)color<br>
<p>
Sets the colour with which the title will be drawn to <var>color</var>.</p>
<hr>
<h2><a name="method-23">setTitleFont:</a></h2>
- (void) <b>setTitleFont:</b> (NSFont*)font<br>
<p>
Sets the font with which the title will be drawm to <var>font</var>.</p>
<hr>
<h2><a name="method-24">tickMarkPosition</a></h2>
- (NSTickMarkPosition) <b>tickMarkPosition</b><br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-25">tickMarkValueAtIndex:</a></h2>
- (double) <b>tickMarkValueAtIndex:</b> (int)index<br>
<p>
As of yet, unimplemented.</p>
<hr>
<h2><a name="method-26">title</a></h2>
- (NSString*) <b>title</b><br>
<p>
Returns the title of the slider as an <code>NSString</code>.</p>
<hr>
<h2><a name="method-27">titleCell</a></h2>
- (id) <b>titleCell</b><br>
<p>
Returns the cell used to draw the title.</p>
<hr>
<h2><a name="method-28">titleColor</a></h2>
- (NSColor*) <b>titleColor</b><br>
<p>
Returns the colour used to draw the title.</p>
<hr>
<h2><a name="method-29">titleFont</a></h2>
- (NSFont*) <b>titleFont</b><br>
<p>
Returns the font used to draw the title.</p>
<hr>
</body>
</html>