Up
Authors
- Ovidiu Predescu (
ovidiu@net-community.com
)
-
Copyright: (C) 1996,1999 Free Software Foundation, Inc.
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.
An NSSliderCell can be customized through its
set...
methods. If these do not provide
enough customization, a subclass can be created, which
overrides any of the follwing methods:
knobRectFlipped:
,
drawBarInside:flipped:
,
drawKnob:
, or
prefersTrackingUntilMouseUp
.
- Declared in:
- AppKit/NSSliderCell.h
- Conforms to:
- NSCoding
Availability: OpenStep
Description forthcoming.
Instance Variables
Method summary
+ (BOOL)
prefersTrackingUntilMouseUp;
Availability: OpenStep
The default implementation returns YES
,
so that the slider continues to track the user's
movement even if the cursor leaves the slider's
track.
Do not call this method directly. Override it in
subclasses where the tracking behaviour needs
to be different.
- (BOOL)
allowsTickMarkValuesOnly;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (double)
altIncrementValue;
Availability: OpenStep
Returns the value by which the slider is
incremented when the user holds down the ALT
key.
See Also:
-setAltIncrementValue:
- (double)
closestTickMarkValueToValue: (double)aValue;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
drawBarInside: (
NSRect)rect
flipped: (BOOL)flipped;
Availability: OpenStep
Draws the slider's track, not including the bezel,
in aRect flipped indicates
whether the control view has a flipped
coordinate system.
Do not call this method directly, it is provided for
subclassing only.
- (void)
drawKnob;
Availability: OpenStep
Calculates the rect in which to draw the knob,
then calls drawKnob:
Before calling
this method, a lockFocus
message must
be sent to the cell's control view.
When subclassing NSSliderCell, do not override this
method. Override drawKnob:
instead.
See Also:
-drawKnob:
- (void)
drawKnob: (
NSRect)knobRect;
Availability: OpenStep
Draws the knob in knobRect. Before
calling this method, a lockFocus
message must be sent to the cell's control view.
Do not call this method directly. It is included for
subclassing only.
See Also:
-drawKnob
- (
NSInteger)
indexOfTickMarkAtPoint: (
NSPoint)point;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSInteger)
isVertical;
Availability: OpenStep
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.
- (
NSRect)
knobRectFlipped: (BOOL)flipped;
Availability: OpenStep
Returns the rect in which to draw the knob, based
on the coordinate system of the NSSlider or NSMatrix
this NSSliderCell is associated with.
flipped indicates whether or not that
coordinate system is flipped, which
can be determined by sending the
isFlipped
message to the associated
NSSlider or NSMatrix.
Do not call this method directly. It is included for
subclassing only.
- (
CGFloat)
knobThickness;
Availability: OpenStep
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.
See Also:
-setKnobThickness:
- (double)
maxValue;
Availability: OpenStep
Returns the maximum value that the slider
represents.
See Also:
-setMaxValue:
- (double)
minValue;
Availability: OpenStep
Returns the minimum value that the slider
represents.
See Also:
-setMinValue:
- (
NSInteger)
numberOfTickMarks;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSRect)
rectOfTickMarkAtIndex: (
NSInteger)index;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setAllowsTickMarkValuesOnly: (BOOL)flag;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setAltIncrementValue: (double)increment;
Availability: OpenStep
Sets the value by which the slider will be be
incremented when with the ALT key down to
increment.
See Also:
-altIncrementValue
- (void)
setKnobThickness: (
CGFloat)thickness;
Availability: OpenStep
Sets the thickness of the knob to
thickness, in pixels. This value sets
the amount of space which the knob takes up in the
slider's track.
See Also:
-knobThickness
- (void)
setMaxValue: (double)aDouble;
Availability: OpenStep
Sets the maximum value that the sliders represents
to maxValue.
See Also:
-maxValue
- (void)
setMinValue: (double)aDouble;
Availability: OpenStep
Sets the minimum value that the sliders represents
to maxValue.
See Also:
-minValue
- (void)
setNumberOfTickMarks: (
NSInteger)numberOfTickMarks;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setSliderType: (
NSSliderType)type;
Availability: OpenStep
Sets the type of the slider: linear or
circular.
See Also:
-sliderType
- (void)
setTickMarkPosition: (
NSTickMarkPosition)position;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (void)
setTitle: (
NSString*)title;
Availability: OpenStep
Sets the title of the slider to
barTitle. This title is
displayed on the slider's track, behind the
knob.
See Also: -title
- (void)
setTitleCell: (
NSCell*)aCell;
Availability: OpenStep
Sets the cell used to draw the title to
titleCell.
See Also:
-titleCell
- (void)
setTitleColor: (
NSColor*)color;
Availability: OpenStep
Sets the colour with which the title will be drawn
to color.
See Also:
-titleColor
- (void)
setTitleFont: (
NSFont*)font;
Availability: OpenStep
Sets the font with which the title will
be drawm to font.
See Also:
-titleFont
- (
NSTickMarkPosition)
tickMarkPosition;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (double)
tickMarkValueAtIndex: (
NSInteger)index;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (
NSString*)
title;
Availability: OpenStep
Returns the title of the slider. This title is
displayed on the slider's track, behind the
knob.
See Also:
-setTitle:
- (id)
titleCell;
Availability: OpenStep
- (
NSColor*)
titleColor;
Availability: OpenStep
- (
NSFont*)
titleFont;
Availability: OpenStep
- (
NSRect)
trackRect;
Availability: OpenStep
Returns the rect of the track, minus the bezel.
Instance Variables for NSSliderCell Class
@protected BOOL _allowsTickMarkValuesOnly;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected float _altIncrementValue;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _isVertical;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _knobCell;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected float _maxValue;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected float _minValue;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSInteger _numberOfTickMarks;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSTickMarkPosition _tickMarkPosition;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _titleCell;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSRect _trackRect;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSliderType _type;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Up