mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-04 11:50:42 +00:00
Improved documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22032 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e70968c5f0
commit
854198ba81
2 changed files with 61 additions and 38 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2005-11-18 fabien <fabien@sonappart.net>
|
||||||
|
|
||||||
|
* Source/NSSliderCell.m: Improved documentation
|
||||||
|
|
||||||
2005-11-17 fabien <fabien@sonappart.net>
|
2005-11-17 fabien <fabien@sonappart.net>
|
||||||
|
|
||||||
* Source/NSControl.m : Improved documentation
|
* Source/NSControl.m : Improved documentation
|
||||||
|
|
|
@ -101,8 +101,7 @@ DEFINE_RINT_IF_MISSING
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** <p>Draws the slider's track, not including the bezel, in <var>aRect</var>
|
||||||
<p>Draws the slider's track, not including the bezel, in <var>aRect</var>
|
|
||||||
<var>flipped</var> indicates whether the control view has a flipped
|
<var>flipped</var> indicates whether the control view has a flipped
|
||||||
coordinate system.</p>
|
coordinate system.</p>
|
||||||
|
|
||||||
|
@ -114,8 +113,7 @@ DEFINE_RINT_IF_MISSING
|
||||||
NSRectFill(rect);
|
NSRectFill(rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**<p>Returns the rect in which to draw the knob, based on the
|
||||||
<p>Returns the rect in which to draw the knob, based on the
|
|
||||||
coordinate system of the NSSlider or NSMatrix this NSSliderCell is
|
coordinate system of the NSSlider or NSMatrix this NSSliderCell is
|
||||||
associated with. <var>flipped</var> indicates whether or not that
|
associated with. <var>flipped</var> indicates whether or not that
|
||||||
coordinate system is flipped, which can be determined by sending the
|
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);
|
return NSMakeRect (origin.x, origin.y, size.width, size.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** <p>Calculates the rect in which to draw the knob, then calls
|
||||||
<p>Calculates the rect in which to draw the knob, then calls
|
|
||||||
<code>drawKnob:</code> Before calling this method, a
|
<code>drawKnob:</code> Before calling this method, a
|
||||||
<code>lockFocus</code> message must be sent to the cell's control
|
<code>lockFocus</code> message must be sent to the cell's control
|
||||||
view.</p>
|
view.</p>
|
||||||
|
|
||||||
<p>When subclassing NSSliderCell, do not override this method.
|
<p>When subclassing NSSliderCell, do not override this method.
|
||||||
Override <code>drawKnob:</code> instead.</p> */
|
Override <code>drawKnob:</code> instead.</p> <p>See Also: -drawKnob:</p>
|
||||||
|
*/
|
||||||
- (void) drawKnob
|
- (void) drawKnob
|
||||||
{
|
{
|
||||||
[self drawKnob: [self knobRectFlipped: [_control_view isFlipped]]];
|
[self drawKnob: [self knobRectFlipped: [_control_view isFlipped]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**<p>Draws the knob in <var>knobRect</var>. Before calling this
|
||||||
<p>Draws the knob in <var>knobRect</var>. Before calling this
|
|
||||||
method, a <code>lockFocus</code> message must be sent to the cell's
|
method, a <code>lockFocus</code> message must be sent to the cell's
|
||||||
control view.</p>
|
control view.</p>
|
||||||
|
|
||||||
<p>Do not call this method directly. It is included for subclassing
|
<p>Do not call this method directly. It is included for subclassing
|
||||||
only.</p> */
|
only.</p> <p>See Also: -drawKnob</p>
|
||||||
|
*/
|
||||||
- (void) drawKnob: (NSRect)knobRect
|
- (void) drawKnob: (NSRect)knobRect
|
||||||
{
|
{
|
||||||
[_knobCell drawInteriorWithFrame: knobRect inView: _control_view];
|
[_knobCell drawInteriorWithFrame: knobRect inView: _control_view];
|
||||||
|
@ -225,9 +223,10 @@ DEFINE_RINT_IF_MISSING
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**<p> Returns the thickness of the slider's knob. This value is in
|
||||||
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>
|
||||||
pixels, and is the size of the knob along the slider's track. */
|
<p>See Also: -setKnobThickness:</p>
|
||||||
|
*/
|
||||||
- (float) knobThickness
|
- (float) knobThickness
|
||||||
{
|
{
|
||||||
NSImage *image = [_knobCell image];
|
NSImage *image = [_knobCell image];
|
||||||
|
@ -236,10 +235,10 @@ DEFINE_RINT_IF_MISSING
|
||||||
return _isVertical ? size.height : size.width;
|
return _isVertical ? size.height : size.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**<p>Sets the thickness of the knob to <var>thickness</var>, in pixels.
|
||||||
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
|
This value sets the amount of space which the knob takes up in the
|
||||||
slider's track. */
|
slider's track.</p><p>See Also: -knobThickness</p>
|
||||||
|
*/
|
||||||
- (void) setKnobThickness: (float)thickness
|
- (void) setKnobThickness: (float)thickness
|
||||||
{
|
{
|
||||||
NSImage *image = [_knobCell image];
|
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
|
/**<p> Sets the value by which the slider will be be incremented when with the
|
||||||
ALT key down to <var>increment</var>. */
|
ALT key down to <var>increment</var>.</p>
|
||||||
|
<p>See Also: -altIncrementValue</p>
|
||||||
|
*/
|
||||||
- (void) setAltIncrementValue: (double)increment
|
- (void) setAltIncrementValue: (double)increment
|
||||||
{
|
{
|
||||||
_altIncrementValue = increment;
|
_altIncrementValue = increment;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**<p> Sets the minimum value that the sliders represents to
|
||||||
Sets the minimum value that the sliders represents to <var>maxValue</var>.
|
<var>maxValue</var>.</p><p>See Also: -minValue</p>
|
||||||
*/
|
*/
|
||||||
- (void) setMinValue: (double)aDouble
|
- (void) setMinValue: (double)aDouble
|
||||||
{
|
{
|
||||||
_minValue = aDouble;
|
_minValue = aDouble;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** <p>Sets the maximum value that the sliders represents to
|
||||||
Sets the maximum value that the sliders represents to <var>maxValue</var>.
|
<var>maxValue</var>.</p><p>See Also: -maxValue</p>
|
||||||
*/
|
*/
|
||||||
- (void) setMaxValue: (double)aDouble
|
- (void) setMaxValue: (double)aDouble
|
||||||
{
|
{
|
||||||
_maxValue = aDouble;
|
_maxValue = aDouble;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the cell used to draw the title. */
|
/**<p>Returns the cell used to draw the title.</p>
|
||||||
|
<p>See Also: -setTitleCell:</p> */
|
||||||
- (id) titleCell
|
- (id) titleCell
|
||||||
{
|
{
|
||||||
return _titleCell;
|
return _titleCell;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the colour used to draw the title. */
|
/**<p>Returns the colour used to draw the title.</p>
|
||||||
|
<p>See Also: -setTitleColor:</p>
|
||||||
|
*/
|
||||||
- (NSColor*) titleColor
|
- (NSColor*) titleColor
|
||||||
{
|
{
|
||||||
return [_titleCell textColor];
|
return [_titleCell textColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the font used to draw the title. */
|
/**<p>Returns the font used to draw the title.</p>
|
||||||
|
<p>See Also: -setTitleFont:</p>
|
||||||
|
*/
|
||||||
- (NSFont*) titleFont
|
- (NSFont*) titleFont
|
||||||
{
|
{
|
||||||
return [_titleCell font];
|
return [_titleCell font];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**<p>Sets the title of the slider to <var>barTitle</var>. This title is
|
||||||
Sets the title of the slider to <var>barTitle</var>. This title is
|
displayed on the slider's track, behind the knob.</p>
|
||||||
displayed on the slider's track, behind the knob. */
|
<p>See Also: -title</p>*/
|
||||||
- (void) setTitle: (NSString*)title
|
- (void) setTitle: (NSString*)title
|
||||||
{
|
{
|
||||||
[_titleCell setStringValue: title];
|
[_titleCell setStringValue: title];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**<p>Returns the title of the slider. This title is
|
||||||
|
displayed on the slider's track, behind the knob.</p>
|
||||||
|
<p>See Also: -setTitle:</p>
|
||||||
|
*/
|
||||||
- (NSString*) title
|
- (NSString*) title
|
||||||
{
|
{
|
||||||
return [_titleCell stringValue];
|
return [_titleCell stringValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the cell used to draw the title to <var>titleCell</var>. */
|
/**<p>Sets the cell used to draw the title to <var>titleCell</var>.</p>
|
||||||
|
<p>See Also: -titleCell</p>*/
|
||||||
- (void) setTitleCell: (NSCell*)aCell
|
- (void) setTitleCell: (NSCell*)aCell
|
||||||
{
|
{
|
||||||
ASSIGN(_titleCell, aCell);
|
ASSIGN(_titleCell, aCell);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the colour with which the title will be drawn to <var>color</var>. */
|
/**<p>Sets the colour with which the title will be drawn to <var>color</var>.
|
||||||
|
</p><p>See Also: -titleColor</p>
|
||||||
|
*/
|
||||||
- (void) setTitleColor: (NSColor*)color
|
- (void) setTitleColor: (NSColor*)color
|
||||||
{
|
{
|
||||||
[_titleCell setTextColor: color];
|
[_titleCell setTextColor: color];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the font with which the title will be drawm to <var>font</var>. */
|
/**<p> Sets the font with which the title will be drawm to <var>font</var>.
|
||||||
|
</p><p>See Also: -titleFont</p>
|
||||||
|
*/
|
||||||
- (void) setTitleFont: (NSFont*)font
|
- (void) setTitleFont: (NSFont*)font
|
||||||
{
|
{
|
||||||
[_titleCell setFont: 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
|
reason, this cannot be determined, for such reasons as the slider is
|
||||||
not yet displayed, this method returns -1. Generally, a 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
|
- (int) isVertical
|
||||||
{
|
{
|
||||||
return _isVertical;
|
return _isVertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the value by which the slider is incremented when the user
|
/**<p>Returns the value by which the slider is incremented when the user
|
||||||
holds down the ALT key.
|
holds down the ALT key.</p><p>See Also: -setAltIncrementValue:</p>
|
||||||
*/
|
*/
|
||||||
- (double) altIncrementValue
|
- (double) altIncrementValue
|
||||||
{
|
{
|
||||||
|
@ -368,13 +383,17 @@ DEFINE_RINT_IF_MISSING
|
||||||
return _trackRect;
|
return _trackRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the minimum value that the slider represents. */
|
/** <p>Returns the minimum value that the slider represents.</p>
|
||||||
|
<p>See Also: -setMinValue:</p>
|
||||||
|
*/
|
||||||
- (double) minValue
|
- (double) minValue
|
||||||
{
|
{
|
||||||
return _minValue;
|
return _minValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the maximum value that the slider represents. */
|
/**<p>Returns the maximum value that the slider represents.</p>
|
||||||
|
<p>See Also: -setMaxValue:</p>
|
||||||
|
*/
|
||||||
- (double) maxValue
|
- (double) maxValue
|
||||||
{
|
{
|
||||||
return _maxValue;
|
return _maxValue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue