libs-gui/Documentation/gsdoc/NSSliderCell.gsdoc
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

432 lines
14 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.7//EN" "http://www.gnustep.org/gsdoc-0_6_7.xml">
<gsdoc base="NSSliderCell" up="Gui">
<head>
<title>NSSliderCell</title>
<author name="Ovidiu Predescu">
<email address="ovidiu@net-community.com">
ovidiu@net-community.com
</email>
</author>
<copy>1996,1999 Free Software Foundation, Inc.</copy>
</head>
<body>
<front><contents /></front>
<chapter>
<heading>Class Description</heading>
<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>
<class name="NSSliderCell" super="NSActionCell">
<declared>AppKit/NSSliderCell.h</declared>
<conform>NSCoding</conform>
<desc>
</desc>
<method type="BOOL" factory="yes">
<sel>prefersTrackingUntilMouseUp</sel>
<desc>
<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>
Do not call this method directly. Override it in
subclasses where the tracking behaviour needs
to be different.
</p>
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="BOOL">
<sel>allowsTickMarkValuesOnly</sel>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="double">
<sel>altIncrementValue</sel>
<desc>
Returns the value by which the slider is
incremented when the user holds down the ALT
key.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="double">
<sel>closestTickMarkValueToValue:</sel>
<arg type="double">aValue</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="void">
<sel>drawBarInside:</sel>
<arg type="NSRect">rect</arg>
<sel>flipped:</sel>
<arg type="BOOL">flipped</arg>
<desc>
<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>
Do not call this method directly, it is provided for
subclassing only.
</p>
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>drawKnob</sel>
<desc>
<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>
When subclassing NSSliderCell, do not override this
method. Override <code>drawKnob:</code> instead.
</p>
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>drawKnob:</sel>
<arg type="NSRect">knobRect</arg>
<desc>
<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>
Do not call this method directly. It is included for
subclassing only.
</p>
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="int">
<sel>indexOfTickMarkAtPoint:</sel>
<arg type="NSPoint">point</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="int">
<sel>isVertical</sel>
<desc>
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.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="NSRect">
<sel>knobRectFlipped:</sel>
<arg type="BOOL">flipped</arg>
<desc>
<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>
Do not call this method directly. It is included for
subclassing only.
</p>
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="float">
<sel>knobThickness</sel>
<desc>
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.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="double">
<sel>maxValue</sel>
<desc>
Returns the maximum value that the slider
represents.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="double">
<sel>minValue</sel>
<desc>
Returns the minimum value that the slider
represents.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="int">
<sel>numberOfTickMarks</sel>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="NSRect">
<sel>rectOfTickMarkAtIndex:</sel>
<arg type="int">index</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="void">
<sel>setAllowsTickMarkValuesOnly:</sel>
<arg type="BOOL">flag</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="void">
<sel>setAltIncrementValue:</sel>
<arg type="double">increment</arg>
<desc>
Sets the value by which the slider will be be
incremented when with the ALT key down to
<var>increment</var>.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>setKnobThickness:</sel>
<arg type="float">thickness</arg>
<desc>
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.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>setMaxValue:</sel>
<arg type="double">aDouble</arg>
<desc>
Sets the maximum value that the sliders represents to
<var>maxValue</var>.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>setMinValue:</sel>
<arg type="double">aDouble</arg>
<desc>
Sets the minimum value that the sliders represents to
<var>maxValue</var>.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>setNumberOfTickMarks:</sel>
<arg type="int">numberOfTickMarks</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="void">
<sel>setTickMarkPosition:</sel>
<arg type="NSTickMarkPosition">position</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="void">
<sel>setTitle:</sel>
<arg type="NSString*">title</arg>
<desc>
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.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>setTitleCell:</sel>
<arg type="NSCell*">aCell</arg>
<desc>
Sets the cell used to draw the title to
<var>titleCell</var>.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>setTitleColor:</sel>
<arg type="NSColor*">color</arg>
<desc>
Sets the colour with which the title will be drawn to
<var>color</var>.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="void">
<sel>setTitleFont:</sel>
<arg type="NSFont*">font</arg>
<desc>
Sets the <var>font</var> with which the title will be
drawm to <var>font</var>.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="NSTickMarkPosition">
<sel>tickMarkPosition</sel>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="double">
<sel>tickMarkValueAtIndex:</sel>
<arg type="int">index</arg>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<NotOpenStep /> <GNUstep /> <MacOS-X />
</standards>
</method>
<method type="NSString*">
<sel>title</sel>
<desc>
<em>Description forthcoming.</em>
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="id">
<sel>titleCell</sel>
<desc>
Returns the cell used to draw the title.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="NSColor*">
<sel>titleColor</sel>
<desc>
Returns the colour used to draw the title.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="NSFont*">
<sel>titleFont</sel>
<desc>
Returns the font used to draw the title.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<method type="NSRect">
<sel>trackRect</sel>
<desc>
Returns the rect of the track, minus the bezel.
</desc>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</method>
<standards>
<GNUstep /> <MacOS-X /> <OpenStep />
</standards>
</class>
</chapter>
</body>
</gsdoc>