libs-gui/Documentation/gsdoc/NSSliderCell.html
Adam Fedor 05bdcda840 Updated docs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12233 72102866-910b-0410-8b05-ffd578937521
2002-01-28 04:50:14 +00:00

530 lines
20 KiB
HTML

<html>
<head>
<title>NSSliderCell</title>
</head>
<body>
<a href="Gui.html">Up</a>
<br />
<h1><a name="title$NSSliderCell">NSSliderCell</a></h1>
<h3>Authors</h3>
<dl>
<dt>Ovidiu Predescu(<a href="mailto:ovidiu@net-community.com"><code>
ovidiu@net-community.com
</code></a>)</dt>
<dd>
</dd>
</dl>
<p><b>Copyright:</b> (C) 1996,1999 Free Software Foundation, Inc.</p>
<div>
<hr width="50%" align="left" />
<h3>Contents -</h3>
<ol>
<li>
<a href="#001000000000">Class Description</a>
</li>
</ol>
<hr width="50%" align="left" />
</div>
<h1><a name="001000000000">Class Description</a></h1>
<p>
An NSSliderCell controls the behaviour and appearance of an
associated NSSlider, or a single slider in an
NSMatrix. Tick marks are defined in the official
standard, but are not implemented in GNUstep.
</p>
<p>
An NSSliderCell can be customized through its
<code>set...</code> methods. If these do not provide
enough customization, a subclass can be created, which
overrides any of the follwing methods:
<code>knobRectFlipped:</code>,
<code>drawBarInside:flipped:</code>,
<code>drawKnob:</code>, or
<code>prefersTrackingUntilMouseUp</code>.
</p>
<h2><a name="class$NSSliderCell">NSSliderCell</a> : <a rel="gsdoc" href="NSActionCell.html#class$NSActionCell">NSActionCell</a></h2>
<blockquote>
<dl>
<dt><b>Declared in:</b></dt>
<dd>AppKit/NSSliderCell.h</dd>
</dl>
</blockquote>
<blockquote>
<dl>
<dt><b>Conforms to:</b></dt>
<dd><a rel="gsdoc" href="/usr/GNUstep-devel/System/Documentation/Base/NSObject.html#protocol$(NSCoding)">NSCoding</a></dd>
</dl>
</blockquote>
<blockquote>
<b>Standards:</b>
<ul>
<li>GNUstep</li>
<li>MacOS-X</li>
<li>OpenStep</li>
</ul>
</blockquote>
<p>
</p>
<b>Method summary</b>
<ul>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell+prefersTrackingUntilMouseUp">+prefersTrackingUntilMouseUp</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-allowsTickMarkValuesOnly">-allowsTickMarkValuesOnly</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-altIncrementValue">-altIncrementValue</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-closestTickMarkValueToValue:">-closestTickMarkValueToValue:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-drawBarInside:flipped:">-drawBarInside:flipped:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-drawKnob">-drawKnob</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-drawKnob:">-drawKnob:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-indexOfTickMarkAtPoint:">-indexOfTickMarkAtPoint:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-isVertical">-isVertical</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-knobRectFlipped:">-knobRectFlipped:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-knobThickness">-knobThickness</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-maxValue">-maxValue</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-minValue">-minValue</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-numberOfTickMarks">-numberOfTickMarks</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-rectOfTickMarkAtIndex:">-rectOfTickMarkAtIndex:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setAllowsTickMarkValuesOnly:">-setAllowsTickMarkValuesOnly:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setAltIncrementValue:">-setAltIncrementValue:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setKnobThickness:">-setKnobThickness:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setMaxValue:">-setMaxValue:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setMinValue:">-setMinValue:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setNumberOfTickMarks:">-setNumberOfTickMarks:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setTickMarkPosition:">-setTickMarkPosition:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setTitle:">-setTitle:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setTitleCell:">-setTitleCell:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setTitleColor:">-setTitleColor:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-setTitleFont:">-setTitleFont:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-tickMarkPosition">-tickMarkPosition</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-tickMarkValueAtIndex:">-tickMarkValueAtIndex:</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-title">-title</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-titleCell">-titleCell</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-titleColor">-titleColor</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-titleFont">-titleFont</a></li>
<li><a rel="gsdoc" href="NSSliderCell.html#method$NSSliderCell-trackRect">-trackRect</a></li>
</ul>
<hr width="50%" align="left" />
<h3><a name="method$NSSliderCell+prefersTrackingUntilMouseUp">prefersTrackingUntilMouseUp</a></h3>
+ (BOOL) <b>prefersTrackingUntilMouseUp</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
</p>
<p>
The default implementation returns <code>YES</code>,
so that the slider continues to track the user's
movement even if the cursor leaves the slider's
track.
</p>
<p>
</p>
<p>
Do not call this method directly. Override it in
subclasses where the tracking behaviour needs
to be different.
</p>
<p>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-allowsTickMarkValuesOnly">allowsTickMarkValuesOnly</a></h3>
- (BOOL) <b>allowsTickMarkValuesOnly</b>;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-altIncrementValue">altIncrementValue</a></h3>
- (double) <b>altIncrementValue</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Returns the value by which the slider is
incremented when the user holds down the ALT
key.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-closestTickMarkValueToValue:">closestTickMarkValueToValue:</a></h3>
- (double) <b>closestTickMarkValueToValue:</b> (double)aValue;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-drawBarInside:flipped:">drawBarInside:flipped:</a></h3>
- (void) <b>drawBarInside:</b> (NSRect)rect<b> flipped:</b> (BOOL)flipped;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
</p>
<p>
Draws the slider's track, not including the bezel,
in <var>aRect</var> <var>flipped</var> indicates
whether the control view has a <var>flipped</var>
coordinate system.
</p>
<p>
</p>
<p>
Do not call this method directly, it is provided for
subclassing only.
</p>
<p>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-drawKnob">drawKnob</a></h3>
- (void) <b>drawKnob</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
</p>
<p>
Calculates the rect in which to draw the knob,
then calls <code>drawKnob:</code> Before calling
this method, a <code>lockFocus</code> message must
be sent to the cell's control view.
</p>
<p>
</p>
<p>
When subclassing NSSliderCell, do not override this
method. Override <code>drawKnob:</code> instead.
</p>
<p>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-drawKnob:">drawKnob:</a></h3>
- (void) <b>drawKnob:</b> (NSRect)knobRect;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
</p>
<p>
Draws the knob in <var>knobRect</var>. Before
calling this method, a <code>lockFocus</code>
message must be sent to the cell's control view.
</p>
<p>
</p>
<p>
Do not call this method directly. It is included for
subclassing only.
</p>
<p>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-indexOfTickMarkAtPoint:">indexOfTickMarkAtPoint:</a></h3>
- (int) <b>indexOfTickMarkAtPoint:</b> (NSPoint)point;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-isVertical">isVertical</a></h3>
- (int) <b>isVertical</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<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 width="25%" align="left" />
<h3><a name="method$NSSliderCell-knobRectFlipped:">knobRectFlipped:</a></h3>
- (NSRect) <b>knobRectFlipped:</b> (BOOL)flipped;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
</p>
<p>
Returns the rect in which to draw the knob, based
on the coordinate system of the NSSlider or NSMatrix
this NSSliderCell is associated with.
<var>flipped</var> indicates whether or not that
coordinate system is <var>flipped</var>, which
can be determined by sending the
<code>isFlipped</code> message to the associated
NSSlider or NSMatrix.
</p>
<p>
</p>
<p>
Do not call this method directly. It is included for
subclassing only.
</p>
<p>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-knobThickness">knobThickness</a></h3>
- (float) <b>knobThickness</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<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 width="25%" align="left" />
<h3><a name="method$NSSliderCell-maxValue">maxValue</a></h3>
- (double) <b>maxValue</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Returns the maximum value that the slider
represents.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-minValue">minValue</a></h3>
- (double) <b>minValue</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Returns the minimum value that the slider
represents.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-numberOfTickMarks">numberOfTickMarks</a></h3>
- (int) <b>numberOfTickMarks</b>;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-rectOfTickMarkAtIndex:">rectOfTickMarkAtIndex:</a></h3>
- (NSRect) <b>rectOfTickMarkAtIndex:</b> (int)index;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setAllowsTickMarkValuesOnly:">setAllowsTickMarkValuesOnly:</a></h3>
- (void) <b>setAllowsTickMarkValuesOnly:</b> (BOOL)flag;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setAltIncrementValue:">setAltIncrementValue:</a></h3>
- (void) <b>setAltIncrementValue:</b> (double)increment;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Sets the value by which the slider will be be
incremented when with the ALT key down to
<var>increment</var>.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setKnobThickness:">setKnobThickness:</a></h3>
- (void) <b>setKnobThickness:</b> (float)thickness;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Sets the <var>thickness</var> 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 width="25%" align="left" />
<h3><a name="method$NSSliderCell-setMaxValue:">setMaxValue:</a></h3>
- (void) <b>setMaxValue:</b> (double)aDouble;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Sets the maximum value that the sliders represents to
<var>maxValue</var>.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setMinValue:">setMinValue:</a></h3>
- (void) <b>setMinValue:</b> (double)aDouble;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Sets the minimum value that the sliders represents to
<var>maxValue</var>.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setNumberOfTickMarks:">setNumberOfTickMarks:</a></h3>
- (void) <b>setNumberOfTickMarks:</b> (int)numberOfTickMarks;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setTickMarkPosition:">setTickMarkPosition:</a></h3>
- (void) <b>setTickMarkPosition:</b> (NSTickMarkPosition)position;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setTitle:">setTitle:</a></h3>
- (void) <b>setTitle:</b> (<a rel="gsdoc" href="/usr/GNUstep-devel/System/Documentation/Base/NSString.html#class$NSString">NSString</a>*)title;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Sets the <var>title</var> of the slider to
<var>barTitle</var>. This <var>title</var> is
displayed on the slider's track, behind the knob.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setTitleCell:">setTitleCell:</a></h3>
- (void) <b>setTitleCell:</b> (<a rel="gsdoc" href="NSCell.html#class$NSCell">NSCell</a>*)aCell;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Sets the cell used to draw the title to
<var>titleCell</var>.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setTitleColor:">setTitleColor:</a></h3>
- (void) <b>setTitleColor:</b> (<a rel="gsdoc" href="NSColor.html#class$NSColor">NSColor</a>*)color;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Sets the colour with which the title will be drawn to
<var>color</var>.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-setTitleFont:">setTitleFont:</a></h3>
- (void) <b>setTitleFont:</b> (<a rel="gsdoc" href="NSFont.html#class$NSFont">NSFont</a>*)font;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Sets the <var>font</var> with which the title will be
drawm to <var>font</var>.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-tickMarkPosition">tickMarkPosition</a></h3>
- (NSTickMarkPosition) <b>tickMarkPosition</b>;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-tickMarkValueAtIndex:">tickMarkValueAtIndex:</a></h3>
- (double) <b>tickMarkValueAtIndex:</b> (int)index;<br />
<b>Standards:</b> NotOpenStep, GNUstep, MacOS-X<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-title">title</a></h3>
- (<a rel="gsdoc" href="/usr/GNUstep-devel/System/Documentation/Base/NSString.html#class$NSString">NSString</a>*) <b>title</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
<em>Description forthcoming.</em>
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-titleCell">titleCell</a></h3>
- (id) <b>titleCell</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Returns the cell used to draw the title.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-titleColor">titleColor</a></h3>
- (<a rel="gsdoc" href="NSColor.html#class$NSColor">NSColor</a>*) <b>titleColor</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Returns the colour used to draw the title.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-titleFont">titleFont</a></h3>
- (<a rel="gsdoc" href="NSFont.html#class$NSFont">NSFont</a>*) <b>titleFont</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Returns the font used to draw the title.
</p>
<hr width="25%" align="left" />
<h3><a name="method$NSSliderCell-trackRect">trackRect</a></h3>
- (NSRect) <b>trackRect</b>;<br />
<b>Standards:</b> GNUstep, MacOS-X, OpenStep<br />
<p>
Returns the rect of the track, minus the bezel.
</p>
<hr width="25%" align="left" />
<br />
<a href="Gui.html">Up</a>
</body>
</html>