diff --git a/ChangeLog b/ChangeLog index 23c2f94fe..b31673f95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-11-18 fabien + + * Source/NSSliderCell.m: Improved documentation + 2005-11-17 fabien * Source/NSControl.m : Improved documentation diff --git a/Source/NSSliderCell.m b/Source/NSSliderCell.m index 48fe6b2c1..5bffc864f 100644 --- a/Source/NSSliderCell.m +++ b/Source/NSSliderCell.m @@ -101,8 +101,7 @@ DEFINE_RINT_IF_MISSING return YES; } -/** -

Draws the slider's track, not including the bezel, in aRect +/**

Draws the slider's track, not including the bezel, in aRect flipped indicates whether the control view has a flipped coordinate system.

@@ -114,8 +113,7 @@ DEFINE_RINT_IF_MISSING NSRectFill(rect); } -/** -

Returns the rect in which to draw the knob, based on the +/**

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 @@ -154,26 +152,26 @@ DEFINE_RINT_IF_MISSING return NSMakeRect (origin.x, origin.y, size.width, size.height); } -/** -

Calculates the rect in which to draw the knob, then calls +/**

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.

*/ + Override drawKnob: instead.

See Also: -drawKnob:

+*/ - (void) drawKnob { [self drawKnob: [self knobRectFlipped: [_control_view isFlipped]]]; } -/** -

Draws the knob in knobRect. Before calling this +/**

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.

*/ + only.

See Also: -drawKnob

+*/ - (void) drawKnob: (NSRect)knobRect { [_knobCell drawInteriorWithFrame: knobRect inView: _control_view]; @@ -225,9 +223,10 @@ DEFINE_RINT_IF_MISSING return YES; } -/** - 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. */ +/**

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:

+*/ - (float) knobThickness { NSImage *image = [_knobCell image]; @@ -236,10 +235,10 @@ DEFINE_RINT_IF_MISSING return _isVertical ? size.height : size.width; } -/** - Sets the thickness of the knob to thickness, in pixels. +/**

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. */ + slider's track.

See Also: -knobThickness

+ */ - (void) setKnobThickness: (float)thickness { NSImage *image = [_knobCell image]; @@ -259,90 +258,106 @@ DEFINE_RINT_IF_MISSING } } -/** Sets the value by which the slider will be be incremented when with the - ALT key down to increment. */ +/**

Sets the value by which the slider will be be incremented when with the + ALT key down to increment.

+

See Also: -altIncrementValue

+*/ - (void) setAltIncrementValue: (double)increment { _altIncrementValue = increment; } -/** - Sets the minimum value that the sliders represents to maxValue. +/**

Sets the minimum value that the sliders represents to + maxValue.

See Also: -minValue

*/ - (void) setMinValue: (double)aDouble { _minValue = aDouble; } -/** - Sets the maximum value that the sliders represents to maxValue. +/**

Sets the maximum value that the sliders represents to + maxValue.

See Also: -maxValue

*/ - (void) setMaxValue: (double)aDouble { _maxValue = aDouble; } -/** Returns the cell used to draw the title. */ +/**

Returns the cell used to draw the title.

+

See Also: -setTitleCell:

*/ - (id) titleCell { return _titleCell; } -/** Returns the colour used to draw the title. */ +/**

Returns the colour used to draw the title.

+

See Also: -setTitleColor:

+*/ - (NSColor*) titleColor { return [_titleCell textColor]; } -/** Returns the font used to draw the title. */ +/**

Returns the font used to draw the title.

+

See Also: -setTitleFont:

+*/ - (NSFont*) titleFont { return [_titleCell font]; } -/** - Sets the title of the slider to barTitle. This title is - displayed on the slider's track, behind the knob. */ +/**

Sets the title of the slider to barTitle. This title is + displayed on the slider's track, behind the knob.

+

See Also: -title

*/ - (void) setTitle: (NSString*)title { [_titleCell setStringValue: title]; } +/**

Returns the title of the slider. This title is + displayed on the slider's track, behind the knob.

+

See Also: -setTitle:

+*/ - (NSString*) title { return [_titleCell stringValue]; } -/** Sets the cell used to draw the title to titleCell. */ +/**

Sets the cell used to draw the title to titleCell.

+

See Also: -titleCell

*/ - (void) setTitleCell: (NSCell*)aCell { ASSIGN(_titleCell, aCell); } -/** Sets the colour with which the title will be drawn to color. */ +/**

Sets the colour with which the title will be drawn to color. +

See Also: -titleColor

+*/ - (void) setTitleColor: (NSColor*)color { [_titleCell setTextColor: color]; } -/** Sets the font with which the title will be drawm to font. */ +/**

Sets the font with which the title will be drawm to font. +

See Also: -titleFont

+*/ - (void) setTitleFont: (NSFont*)font { [_titleCell setFont: font]; } -/** - Returns whether or not the slider is vertical. If, for some +/**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. */ + considered vertical if its height is greater than its width. +*/ - (int) isVertical { return _isVertical; } -/** Returns the value by which the slider is incremented when the user - holds down the ALT key. +/**

Returns the value by which the slider is incremented when the user + holds down the ALT key.

See Also: -setAltIncrementValue:

*/ - (double) altIncrementValue { @@ -368,13 +383,17 @@ DEFINE_RINT_IF_MISSING return _trackRect; } -/** Returns the minimum value that the slider represents. */ +/**

Returns the minimum value that the slider represents.

+

See Also: -setMinValue:

+*/ - (double) minValue { return _minValue; } -/** Returns the maximum value that the slider represents. */ +/**

Returns the maximum value that the slider represents.

+

See Also: -setMaxValue:

+*/ - (double) maxValue { return _maxValue;