Updates to NSSlider docs, and beginnings of basic documentation for NSView.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6437 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
jdess 2000-04-08 22:32:36 +00:00
parent 8344d89c2a
commit e346177587
4 changed files with 183 additions and 126 deletions

View file

@ -10,8 +10,8 @@
<author name="James Dessart"> <author name="James Dessart">
<email address="skwirl@cam.org"/> <email address="skwirl@cam.org"/>
</author> </author>
<version>0.2</version> <version>0.2.1</version>
<date>11 March, 2000</date> <date>8 April, 2000</date>
</head> </head>
<body> <body>
<chapter> <chapter>
@ -25,9 +25,9 @@
can be retrieved by the method <code>floatValue</code> and set by the method can be retrieved by the method <code>floatValue</code> and set by the method
<code>setFloatValue:</code>.</p> <code>setFloatValue:</code>.</p>
<p>The OPENSTEP API describes this control as being continuous, but the current <p>This control is a continuous control. It sends its action message as long
GNUstep implementation defaults to non-continuous. This can be set by the as the user is manipulating it. This can be changed by passing <code>NO</code>
inherited method <code>setContinuous:</code>, by passing <code>YES</code>.</p> to the <code>setContinuous:</code> message of a given NSSlider.</p>
<p>Although methods for adding and managing a title are provided, the slider's <p>Although methods for adding and managing a title are provided, the slider's
knob can cover this title, so it is recommended that a label be added near the knob can cover this title, so it is recommended that a label be added near the
@ -135,8 +135,8 @@
<sel>setAltIncrementValue:</sel> <sel>setAltIncrementValue:</sel>
<arg type="double">increment</arg> <arg type="double">increment</arg>
<desc> <desc>
<p>Sets the value by which the slider will be be incremented when with the <p>Sets the value by which the slider will be incremented, when the
ALT key down to <var>increment</var>.</p> ALT key is held down, to <var>increment</var>.</p>
</desc> </desc>
</method> </method>
<method type="void"> <method type="void">

View file

@ -13,8 +13,8 @@
<dt>James Dessart <dt>James Dessart
<dd> <dd>
</dl> </dl>
<p>Version: 0.2</p> <p>Version: 0.2.1</p>
<p>Date: 11 March, 2000</p> <p>Date: 8 April, 2000</p>
<h2><a name="cont-0">NSSlider</a></h2> <h2><a name="cont-0">NSSlider</a></h2>
<h2><a name="NSSlider">NSSlider</a></h2> <h2><a name="NSSlider">NSSlider</a></h2>
<p><b>Declared in:</b> AppKit/NSSlider.h</p> <p><b>Declared in:</b> AppKit/NSSlider.h</p>
@ -23,56 +23,31 @@
</p> </p>
<hr> <hr>
<p>
<p>
An NSSlider displays, and allows control of, some value in the application. An NSSlider displays, and allows control of, some value in the application.
It represents a continuous stream of values of type <code>float</code>, which It represents a continuous stream of values of type <code>float</code>, which
can be retrieved by the method <code>floatValue</code> and set by the method can be retrieved by the method <code>floatValue</code> and set by the method
<code>setFloatValue:</code>.</p> <code>setFloatValue:</code>.</p>
<p>
This control is a continuous control. It sends its action message as long
as the user is manipulating it. This can be changed by passing <code>NO</code>
to the <code>setContinuous:</code> message of a given NSSlider.</p>
<p>
The OPENSTEP API describes this control as being continuous, but the current
GNUstep implementation defaults to non-continuous. This can be set by the
inherited method <code>setContinuous:</code>, by passing <code>YES</code>.</p>
<p>
<p>
Although methods for adding and managing a title are provided, the slider's Although methods for adding and managing a title are provided, the slider's
knob can cover this title, so it is recommended that a label be added near the knob can cover this title, so it is recommended that a label be added near the
slider, for identification.</p> slider, for identification.</p>
<p>
<p>
As with many controls, NSSlider relies on its cell counterpart, NSSliderCell. As with many controls, NSSlider relies on its cell counterpart, NSSliderCell.
For more information, please see the specification for NSSliderCell.</p> For more information, please see the specification for NSSliderCell.</p>
<p>
<p>
Use of an NSSlider to do the role of an NSScroller is not recommended. A Use of an NSSlider to do the role of an NSScroller is not recommended. A
scroller is intended to represent the visible portion of a view, whereas a slider scroller is intended to represent the visible portion of a view, whereas a slider
is intended to represent some value.</p> is intended to represent some value.</p>
@ -114,8 +89,7 @@ Use of an NSSlider to do the role of an NSScroller is not recommended. A
<h2><a name="method-0">acceptsFirstMouse:</a></h2> <h2><a name="method-0">acceptsFirstMouse:</a></h2>
- (BOOL) <b>acceptsFirstMouse:</b> (NSEvent*)mouseDownEvent<br> - (BOOL) <b>acceptsFirstMouse:</b> (NSEvent*)mouseDownEvent<br>
<p>
<p>
Returns <code>YES</code> by default. This will allow the first click sent to Returns <code>YES</code> by default. This will allow the first click sent to
the slider, when in an inactive window, to both bring the window into focus and the slider, when in an inactive window, to both bring the window into focus and
manipulate the slider.</p> manipulate the slider.</p>
@ -125,8 +99,7 @@ Returns <code>YES</code> by default. This will allow the first click sent to
<h2><a name="method-1">allowsTickMarkValuesOnly</a></h2> <h2><a name="method-1">allowsTickMarkValuesOnly</a></h2>
- (BOOL) <b>allowsTickMarkValuesOnly</b><br> - (BOOL) <b>allowsTickMarkValuesOnly</b><br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -134,8 +107,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-2">altIncrementValue</a></h2> <h2><a name="method-2">altIncrementValue</a></h2>
- (double) <b>altIncrementValue</b><br> - (double) <b>altIncrementValue</b><br>
<p>
<p>
Returns the value by which the slider will be incremented if the user holds down Returns the value by which the slider will be incremented if the user holds down
the ALT key.</p> the ALT key.</p>
@ -144,8 +116,7 @@ Returns the value by which the slider will be incremented if the user holds down
<h2><a name="method-3">closestTickMarkValueToValue:</a></h2> <h2><a name="method-3">closestTickMarkValueToValue:</a></h2>
- (double) <b>closestTickMarkValueToValue:</b> (double)aValue<br> - (double) <b>closestTickMarkValueToValue:</b> (double)aValue<br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -153,8 +124,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-4">image</a></h2> <h2><a name="method-4">image</a></h2>
- (NSImage*) <b>image</b><br> - (NSImage*) <b>image</b><br>
<p>
<p>
Returns the image drawn in the slider's track. Returns <code>nil</code> if Returns the image drawn in the slider's track. Returns <code>nil</code> if
this has not been set.</p> this has not been set.</p>
@ -163,8 +133,7 @@ Returns the image drawn in the slider's track. Returns <code>nil</code> if
<h2><a name="method-5">indexOfTickMarkAtPoint:</a></h2> <h2><a name="method-5">indexOfTickMarkAtPoint:</a></h2>
- (int) <b>indexOfTickMarkAtPoint:</b> (NSPoint)point<br> - (int) <b>indexOfTickMarkAtPoint:</b> (NSPoint)point<br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -172,8 +141,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-6">isVertical</a></h2> <h2><a name="method-6">isVertical</a></h2>
- (int) <b>isVertical</b><br> - (int) <b>isVertical</b><br>
<p>
<p>
Returns whether or not the slider is vertical. If, for some reason, this cannot 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 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 returns -1. Generally, a slider is considered vertical if its height is greater
@ -184,8 +152,7 @@ Returns whether or not the slider is vertical. If, for some reason, this cannot
<h2><a name="method-7">knobThickness</a></h2> <h2><a name="method-7">knobThickness</a></h2>
- (float) <b>knobThickness</b><br> - (float) <b>knobThickness</b><br>
<p>
<p>
Returns the thickness of the slider's knob. This value is in pixels, and is the 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> size of the knob along the slider's track.</p>
@ -194,8 +161,7 @@ Returns the thickness of the slider's knob. This value is in pixels, and is the
<h2><a name="method-8">maxValue</a></h2> <h2><a name="method-8">maxValue</a></h2>
- (double) <b>maxValue</b><br> - (double) <b>maxValue</b><br>
<p>
<p>
Returns the maximum value that the slider represents.</p> Returns the maximum value that the slider represents.</p>
@ -203,8 +169,7 @@ Returns the maximum value that the slider represents.</p>
<h2><a name="method-9">minValue</a></h2> <h2><a name="method-9">minValue</a></h2>
- (double) <b>minValue</b><br> - (double) <b>minValue</b><br>
<p>
<p>
Returns the minimum value that the slider represents.</p> Returns the minimum value that the slider represents.</p>
@ -212,8 +177,7 @@ Returns the minimum value that the slider represents.</p>
<h2><a name="method-10">numberOfTickMarks</a></h2> <h2><a name="method-10">numberOfTickMarks</a></h2>
- (int) <b>numberOfTickMarks</b><br> - (int) <b>numberOfTickMarks</b><br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -221,8 +185,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-11">rectOfTickMarkAtIndex:</a></h2> <h2><a name="method-11">rectOfTickMarkAtIndex:</a></h2>
- (NSRect) <b>rectOfTickMarkAtIndex:</b> (int)index<br> - (NSRect) <b>rectOfTickMarkAtIndex:</b> (int)index<br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -230,8 +193,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-12">setAllowsTickMarkValuesOnly:</a></h2> <h2><a name="method-12">setAllowsTickMarkValuesOnly:</a></h2>
- (void) <b>setAllowsTickMarkValuesOnly:</b> (BOOL)flag<br> - (void) <b>setAllowsTickMarkValuesOnly:</b> (BOOL)flag<br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -239,18 +201,16 @@ As of yet, unimplemented.</p>
<h2><a name="method-13">setAltIncrementValue:</a></h2> <h2><a name="method-13">setAltIncrementValue:</a></h2>
- (void) <b>setAltIncrementValue:</b> (double)increment<br> - (void) <b>setAltIncrementValue:</b> (double)increment<br>
<p>
<p> Sets the value by which the slider will be incremented, when the
Sets the value by which the slider will be be incremented when with the ALT key is held down, to <var>increment</var>.</p>
ALT key down to <var>increment</var>.</p>
<hr> <hr>
<h2><a name="method-14">setImage:</a></h2> <h2><a name="method-14">setImage:</a></h2>
- (void) <b>setImage:</b> (NSImage*)barImage<br> - (void) <b>setImage:</b> (NSImage*)barImage<br>
<p>
<p>
Sets the image to be displayed in the slider's track to <var>barImage</var>.</p> Sets the image to be displayed in the slider's track to <var>barImage</var>.</p>
@ -258,8 +218,7 @@ Sets the image to be displayed in the slider's track to <var>barImage</var>.</p>
<h2><a name="method-15">setKnobThickness:</a></h2> <h2><a name="method-15">setKnobThickness:</a></h2>
- (void) <b>setKnobThickness:</b> (float)thickness<br> - (void) <b>setKnobThickness:</b> (float)thickness<br>
<p>
<p>
Sets the thickness of the knob to <var>thickness</var>, in pixels. This value 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 slider's track.</p> sets the amount of space which the knob takes up in the slider's track.</p>
@ -268,8 +227,7 @@ Sets the thickness of the knob to <var>thickness</var>, in pixels. This value
<h2><a name="method-16">setMaxValue:</a></h2> <h2><a name="method-16">setMaxValue:</a></h2>
- (void) <b>setMaxValue:</b> (double)maxValue<br> - (void) <b>setMaxValue:</b> (double)maxValue<br>
<p>
<p>
Sets the maximum value that the sliders represents to <var>maxValue</var>.</p> Sets the maximum value that the sliders represents to <var>maxValue</var>.</p>
@ -277,8 +235,7 @@ Sets the maximum value that the sliders represents to <var>maxValue</var>.</p>
<h2><a name="method-17">setMinValue:</a></h2> <h2><a name="method-17">setMinValue:</a></h2>
- (void) <b>setMinValue:</b> (double)minValue<br> - (void) <b>setMinValue:</b> (double)minValue<br>
<p>
<p>
Sets the minimum value that the slider represents to <var>minValue</var>.</p> Sets the minimum value that the slider represents to <var>minValue</var>.</p>
@ -286,8 +243,7 @@ Sets the minimum value that the slider represents to <var>minValue</var>.</p>
<h2><a name="method-18">setNumberOfTickMarks:</a></h2> <h2><a name="method-18">setNumberOfTickMarks:</a></h2>
- (void) <b>setNumberOfTickMarks:</b> (int)numberOfTickMarks<br> - (void) <b>setNumberOfTickMarks:</b> (int)numberOfTickMarks<br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -295,8 +251,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-19">setTickMarkPosition:</a></h2> <h2><a name="method-19">setTickMarkPosition:</a></h2>
- (void) <b>setTickMarkPosition:</b> (NSTickMarkPosition)position<br> - (void) <b>setTickMarkPosition:</b> (NSTickMarkPosition)position<br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -304,8 +259,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-20">setTitle:</a></h2> <h2><a name="method-20">setTitle:</a></h2>
- (void) <b>setTitle:</b> (NSString*)barTitle<br> - (void) <b>setTitle:</b> (NSString*)barTitle<br>
<p>
<p>
Sets the title of the slider to <var>barTitle</var>. This title is displayed Sets the title of the slider to <var>barTitle</var>. This title is displayed
on the slider's track, behind the knob.</p> on the slider's track, behind the knob.</p>
@ -314,8 +268,7 @@ Sets the title of the slider to <var>barTitle</var>. This title is displayed
<h2><a name="method-21">setTitleCell:</a></h2> <h2><a name="method-21">setTitleCell:</a></h2>
- (void) <b>setTitleCell:</b> (NSCell*)titleCell<br> - (void) <b>setTitleCell:</b> (NSCell*)titleCell<br>
<p>
<p>
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>
@ -323,8 +276,7 @@ Sets the cell used to draw the title to <var>titleCell</var>.</p>
<h2><a name="method-22">setTitleColor:</a></h2> <h2><a name="method-22">setTitleColor:</a></h2>
- (void) <b>setTitleColor:</b> (NSColor*)color<br> - (void) <b>setTitleColor:</b> (NSColor*)color<br>
<p>
<p>
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>
@ -332,8 +284,7 @@ Sets the colour with which the title will be drawn to <var>color</var>.</p>
<h2><a name="method-23">setTitleFont:</a></h2> <h2><a name="method-23">setTitleFont:</a></h2>
- (void) <b>setTitleFont:</b> (NSFont*)font<br> - (void) <b>setTitleFont:</b> (NSFont*)font<br>
<p>
<p>
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>
@ -341,8 +292,7 @@ Sets the font with which the title will be drawm to <var>font</var>.</p>
<h2><a name="method-24">tickMarkPosition</a></h2> <h2><a name="method-24">tickMarkPosition</a></h2>
- (NSTickMarkPosition) <b>tickMarkPosition</b><br> - (NSTickMarkPosition) <b>tickMarkPosition</b><br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -350,8 +300,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-25">tickMarkValueAtIndex:</a></h2> <h2><a name="method-25">tickMarkValueAtIndex:</a></h2>
- (double) <b>tickMarkValueAtIndex:</b> (int)index<br> - (double) <b>tickMarkValueAtIndex:</b> (int)index<br>
<p>
<p>
As of yet, unimplemented.</p> As of yet, unimplemented.</p>
@ -359,8 +308,7 @@ As of yet, unimplemented.</p>
<h2><a name="method-26">title</a></h2> <h2><a name="method-26">title</a></h2>
- (NSString*) <b>title</b><br> - (NSString*) <b>title</b><br>
<p>
<p>
Returns the title of the slider as an <code>NSString</code>.</p> Returns the title of the slider as an <code>NSString</code>.</p>
@ -368,8 +316,7 @@ Returns the title of the slider as an <code>NSString</code>.</p>
<h2><a name="method-27">titleCell</a></h2> <h2><a name="method-27">titleCell</a></h2>
- (id) <b>titleCell</b><br> - (id) <b>titleCell</b><br>
<p>
<p>
Returns the cell used to draw the title.</p> Returns the cell used to draw the title.</p>
@ -377,8 +324,7 @@ Returns the cell used to draw the title.</p>
<h2><a name="method-28">titleColor</a></h2> <h2><a name="method-28">titleColor</a></h2>
- (NSColor*) <b>titleColor</b><br> - (NSColor*) <b>titleColor</b><br>
<p>
<p>
Returns the colour used to draw the title.</p> Returns the colour used to draw the title.</p>
@ -386,8 +332,7 @@ Returns the colour used to draw the title.</p>
<h2><a name="method-29">titleFont</a></h2> <h2><a name="method-29">titleFont</a></h2>
- (NSFont*) <b>titleFont</b><br> - (NSFont*) <b>titleFont</b><br>
<p>
<p>
Returns the font used to draw the title.</p> Returns the font used to draw the title.</p>

View file

@ -7,8 +7,11 @@
<email address="rfm@gnu.org"/> <email address="rfm@gnu.org"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/> <url url="http://www.gnustep.org/developers/whoiswho.html"/>
</author> </author>
<version>0.1</version> <author name="James Dessart">
<date>28 February, 2000</date> <email address="skwirl@cam.org"/>
</author>
<version>0.2</version>
<date>8 April, 2000</date>
</head> </head>
<body> <body>
<chapter> <chapter>
@ -17,21 +20,35 @@
<declared>AppKit/NSView.h</declared> <declared>AppKit/NSView.h</declared>
<conform>NSCoding</conform> <conform>NSCoding</conform>
<desc> <desc>
<p>NSView is an abstract class which provides facilities for drawing in a window and
receiving events. It is the superclass of many of the visual elements of the GUI.</p>
<p>In order to display itself, a view must be placed in a window (represented by an
NSWindow object). Within the window is a hierarchy of NSViews, headed by the window's
content view. Every other view in a window is a descendant of this view.</p>
<p>Subclasses can override <code>drawRect:</code> in order to implement their
appearance. Other methods of NSView and NSResponder can also be overridden to handle
user generated events.</p>
</desc> </desc>
<method type="NSMenu*" factory="yes"> <method type="NSMenu*" factory="yes">
<sel>defaultMenu</sel> <sel>defaultMenu</sel>
<desc> <desc>
<p>As of yet, unimplemented.</p>
</desc> </desc>
</method> </method>
<method type="NSView*" factory="yes"> <method type="NSView*" factory="yes">
<sel>focusView</sel> <sel>focusView</sel>
<desc> <desc>
<p>Returns the view which currently has the focus.</p>
</desc> </desc>
</method> </method>
<method type="BOOL"> <method type="BOOL">
<sel>acceptsFirstMouse:</sel> <sel>acceptsFirstMouse:</sel>
<arg type="NSEvent*">theEvent</arg> <arg type="NSEvent*">theEvent</arg>
<desc> <desc>
<p>Returns <code>YES</code> if the view object will accept the first click
received when in an inactive window, and <code>NO</code> otherwise.</p>
</desc> </desc>
</method> </method>
<method type="void"> <method type="void">
@ -46,6 +63,9 @@
<sel>addSubview:</sel> <sel>addSubview:</sel>
<arg type="NSView*">aView</arg> <arg type="NSView*">aView</arg>
<desc> <desc>
<p>
Adds <var>aView</var> as a subview of the receiver.
</p>
</desc> </desc>
</method> </method>
<method type="void"> <method type="void">
@ -110,6 +130,12 @@
<sel>ancestorSharedWithView:</sel> <sel>ancestorSharedWithView:</sel>
<arg type="NSView*">aView</arg> <arg type="NSView*">aView</arg>
<desc> <desc>
<p>
Returns <code>self</code> if <var>aView</var> is the receiver or <var>aView</var> is a
subview of the receiver, the ancestor view shared by <var>aView</var> and the receiver,
if any, <var>aView</var> if it is an ancestor of the receiver, otherwise returns
<code>nil</code>.
</p>
</desc> </desc>
</method> </method>
<method type="BOOL"> <method type="BOOL">
@ -400,6 +426,8 @@
<sel>hitTest:</sel> <sel>hitTest:</sel>
<arg type="NSPoint">aPoint</arg> <arg type="NSPoint">aPoint</arg>
<desc> <desc>
<p>Returns the subview, lowest in the receiver's hierarchy, which contains
<var>aPoint</var></p>
</desc> </desc>
</method> </method>
<method type="id"> <method type="id">
@ -417,6 +445,9 @@
<sel>isDescendantOf:</sel> <sel>isDescendantOf:</sel>
<arg type="NSView*">aView</arg> <arg type="NSView*">aView</arg>
<desc> <desc>
<p>
Returns <code>YES</code> if <var>aView</var> is an ancestor of the receiver.
</p>
</desc> </desc>
</method> </method>
<method type="BOOL"> <method type="BOOL">
@ -466,12 +497,16 @@
<sel>menuForEvent:</sel> <sel>menuForEvent:</sel>
<arg type="NSEvent*">theEvent</arg> <arg type="NSEvent*">theEvent</arg>
<desc> <desc>
<p>As of yet, unimplemented.</p>
</desc> </desc>
</method> </method>
<method type="BOOL"> <method type="BOOL">
<sel>mouse:</sel> <sel>mouse:</sel>
<arg type="NSPoint">aPoint</arg> <arg type="NSPoint">aPoint</arg>
<sel>inRect:</sel>
<arg type="NSRect">aRect</arg>
<desc> <desc>
<p>Returns whether or not <var>aPoint</var> lies within <var>aRect</var>.</p>
</desc> </desc>
</method> </method>
<method type="BOOL"> <method type="BOOL">
@ -622,7 +657,12 @@
<method type="void"> <method type="void">
<sel>replaceSubview:</sel> <sel>replaceSubview:</sel>
<arg type="NSView*">oldView</arg> <arg type="NSView*">oldView</arg>
<sel>with:</sel>
<arg type="NSView*">newView</arg>
<desc> <desc>
<p>
Removes <var>oldView</var> from the receiver and places <var>newView</var> in its place.
</p>
</desc> </desc>
</method> </method>
<method type="void"> <method type="void">
@ -848,12 +888,15 @@
<sel>viewWillMoveToSuperview:</sel> <sel>viewWillMoveToSuperview:</sel>
<arg type="NSView*">newSuperview</arg> <arg type="NSView*">newSuperview</arg>
<desc> <desc>
<p>Notifies the receiver that its superview is being changed to
<var>newSuperview</var>.</p>
</desc> </desc>
</method> </method>
<method type="void"> <method type="void">
<sel>viewWillMoveToWindow:</sel> <sel>viewWillMoveToWindow:</sel>
<arg type="NSWindow*">newWindow</arg> <arg type="NSWindow*">newWindow</arg>
<desc> <desc>
<p>Notifies the receiver that it will now be a view of <var>newWindow</var>.</p>
</desc> </desc>
</method> </method>
<method type="id"> <method type="id">
@ -875,6 +918,9 @@
<method type="NSWindow*"> <method type="NSWindow*">
<sel>window</sel> <sel>window</sel>
<desc> <desc>
<p>
Returns the window in which the receiver resides.
</p>
</desc> </desc>
</method> </method>
<method type="void"> <method type="void">

View file

@ -10,9 +10,11 @@
<dl> <dl>
<dt><a href="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a> <dt><a href="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a>
<dd> <dd>
<dt>James Dessart
<dd>
</dl> </dl>
<p>Version: 0.1</p> <p>Version: 0.2</p>
<p>Date: 28 February, 2000</p> <p>Date: 8 April, 2000</p>
<h2><a name="cont-0">NSView</a></h2> <h2><a name="cont-0">NSView</a></h2>
<h2><a name="NSView">NSView</a></h2> <h2><a name="NSView">NSView</a></h2>
<p><b>Declared in:</b> AppKit/NSView.h</p> <p><b>Declared in:</b> AppKit/NSView.h</p>
@ -21,6 +23,22 @@
</p> </p>
<hr> <hr>
<p>
NSView is an abstract class which provides facilities for drawing in a window and
receiving events. It is the superclass of many of the visual elements of the GUI.</p>
<p>
In order to display itself, a view must be placed in a window (represented by an
NSWindow object). Within the window is a hierarchy of NSViews, headed by the window's
content view. Every other view in a window is a descendant of this view.</p>
<p>
Subclasses can override <code>drawRect:</code> in order to implement their
appearance. Other methods of NSView and NSResponder can also be overridden to handle
user generated events.</p>
<ul> <ul>
<li><a href="NSView.html#method-0">+defaultMenu</a> <li><a href="NSView.html#method-0">+defaultMenu</a>
@ -93,7 +111,7 @@
<li><a href="NSView.html#method-67">-locationOfPrintRect:</a> <li><a href="NSView.html#method-67">-locationOfPrintRect:</a>
<li><a href="NSView.html#method-68">-lockFocus</a> <li><a href="NSView.html#method-68">-lockFocus</a>
<li><a href="NSView.html#method-69">-menuForEvent:</a> <li><a href="NSView.html#method-69">-menuForEvent:</a>
<li><a href="NSView.html#method-70">-mouse:</a> <li><a href="NSView.html#method-70">-mouse:inRect:</a>
<li><a href="NSView.html#method-71">-needsDisplay</a> <li><a href="NSView.html#method-71">-needsDisplay</a>
<li><a href="NSView.html#method-72">-needsPanelToBecomeKey</a> <li><a href="NSView.html#method-72">-needsPanelToBecomeKey</a>
<li><a href="NSView.html#method-73">-nextKeyView</a> <li><a href="NSView.html#method-73">-nextKeyView</a>
@ -116,7 +134,7 @@
<li><a href="NSView.html#method-90">-removeSubview:</a> <li><a href="NSView.html#method-90">-removeSubview:</a>
<li><a href="NSView.html#method-91">-removeTrackingRect:</a> <li><a href="NSView.html#method-91">-removeTrackingRect:</a>
<li><a href="NSView.html#method-92">-renewGState</a> <li><a href="NSView.html#method-92">-renewGState</a>
<li><a href="NSView.html#method-93">-replaceSubview:</a> <li><a href="NSView.html#method-93">-replaceSubview:with:</a>
<li><a href="NSView.html#method-94">-resetCursorRects</a> <li><a href="NSView.html#method-94">-resetCursorRects</a>
<li><a href="NSView.html#method-95">-resizeSubviewsWithOldSize:</a> <li><a href="NSView.html#method-95">-resizeSubviewsWithOldSize:</a>
<li><a href="NSView.html#method-96">-resizeWithOldSuperviewSize:</a> <li><a href="NSView.html#method-96">-resizeWithOldSuperviewSize:</a>
@ -166,16 +184,26 @@
<h2><a name="method-0">defaultMenu</a></h2> <h2><a name="method-0">defaultMenu</a></h2>
+ (NSMenu*) <b>defaultMenu</b><br> + (NSMenu*) <b>defaultMenu</b><br>
<p>
As of yet, unimplemented.</p>
<hr> <hr>
<h2><a name="method-1">focusView</a></h2> <h2><a name="method-1">focusView</a></h2>
+ (NSView*) <b>focusView</b><br> + (NSView*) <b>focusView</b><br>
<p>
Returns the view which currently has the focus.</p>
<hr> <hr>
<h2><a name="method-2">acceptsFirstMouse:</a></h2> <h2><a name="method-2">acceptsFirstMouse:</a></h2>
- (BOOL) <b>acceptsFirstMouse:</b> (NSEvent*)theEvent<br> - (BOOL) <b>acceptsFirstMouse:</b> (NSEvent*)theEvent<br>
<p>
Returns <code>YES</code> if the view object will accept the first click
received when in an inactive window, and <code>NO</code> otherwise.</p>
<hr> <hr>
<h2><a name="method-3">addCursorRect:cursor:</a></h2> <h2><a name="method-3">addCursorRect:cursor:</a></h2>
@ -186,6 +214,11 @@
<h2><a name="method-4">addSubview:</a></h2> <h2><a name="method-4">addSubview:</a></h2>
- (void) <b>addSubview:</b> (NSView*)aView<br> - (void) <b>addSubview:</b> (NSView*)aView<br>
<p>
Adds <var>aView</var> as a subview of the receiver.
</p>
<hr> <hr>
<h2><a name="method-5">addSubview:positioned:relativeTo:</a></h2> <h2><a name="method-5">addSubview:positioned:relativeTo:</a></h2>
@ -226,6 +259,14 @@
<h2><a name="method-12">ancestorSharedWithView:</a></h2> <h2><a name="method-12">ancestorSharedWithView:</a></h2>
- (NSView*) <b>ancestorSharedWithView:</b> (NSView*)aView<br> - (NSView*) <b>ancestorSharedWithView:</b> (NSView*)aView<br>
<p>
Returns <code>self</code> if <var>aView</var> is the receiver or <var>aView</var> is a
subview of the receiver, the ancestor view shared by <var>aView</var> and the receiver,
if any, <var>aView</var> if it is an ancestor of the receiver, otherwise returns
<code>nil</code>.
</p>
<hr> <hr>
<h2><a name="method-13">autoresizesSubviews</a></h2> <h2><a name="method-13">autoresizesSubviews</a></h2>
@ -451,6 +492,10 @@
<h2><a name="method-57">hitTest:</a></h2> <h2><a name="method-57">hitTest:</a></h2>
- (NSView*) <b>hitTest:</b> (NSPoint)aPoint<br> - (NSView*) <b>hitTest:</b> (NSPoint)aPoint<br>
<p>
Returns the subview, lowest in the receiver's hierarchy, which contains
<var>aPoint</var></p>
<hr> <hr>
<h2><a name="method-58">initWithFrame:</a></h2> <h2><a name="method-58">initWithFrame:</a></h2>
@ -466,6 +511,11 @@
<h2><a name="method-60">isDescendantOf:</a></h2> <h2><a name="method-60">isDescendantOf:</a></h2>
- (BOOL) <b>isDescendantOf:</b> (NSView*)aView<br> - (BOOL) <b>isDescendantOf:</b> (NSView*)aView<br>
<p>
Returns <code>YES</code> if <var>aView</var> is an ancestor of the receiver.
</p>
<hr> <hr>
<h2><a name="method-61">isFlipped</a></h2> <h2><a name="method-61">isFlipped</a></h2>
@ -511,10 +561,16 @@
<h2><a name="method-69">menuForEvent:</a></h2> <h2><a name="method-69">menuForEvent:</a></h2>
- (NSMenu*) <b>menuForEvent:</b> (NSEvent*)theEvent<br> - (NSMenu*) <b>menuForEvent:</b> (NSEvent*)theEvent<br>
<p>
As of yet, unimplemented.</p>
<hr> <hr>
<h2><a name="method-70">mouse:</a></h2> <h2><a name="method-70">mouse:inRect:</a></h2>
- (BOOL) <b>mouse:</b> (NSPoint)aPoint<br> - (BOOL) <b>mouse:</b> (NSPoint)aPoint <b>inRect:</b> (NSRect)aRect<br>
<p>
Returns whether or not <var>aPoint</var> lies within <var>aRect</var>.</p>
<hr> <hr>
@ -606,9 +662,7 @@
<h2><a name="method-88">removeFromSuperview</a></h2> <h2><a name="method-88">removeFromSuperview</a></h2>
- (void) <b>removeFromSuperview</b><br> - (void) <b>removeFromSuperview</b><br>
<p>
<p>
Removes the receiver from its superviews list of subviews, Removes the receiver from its superviews list of subviews,
by invoking the superviews [-removeSubview:] method, and by invoking the superviews [-removeSubview:] method, and
@ -616,8 +670,7 @@
superview as needing redisplay. superview as needing redisplay.
</p> </p>
<p>
<p>
This is dangerous to use during display, since it alters the This is dangerous to use during display, since it alters the
rectangles needing display. rectangles needing display.
@ -628,8 +681,7 @@
<h2><a name="method-89">removeFromSuperviewWithoutNeedingDisplay</a></h2> <h2><a name="method-89">removeFromSuperviewWithoutNeedingDisplay</a></h2>
- (void) <b>removeFromSuperviewWithoutNeedingDisplay</b><br> - (void) <b>removeFromSuperviewWithoutNeedingDisplay</b><br>
<p>
<p>
Removes the receiver from its superviews list of subviews, Removes the receiver from its superviews list of subviews,
by invoking the superviews [-removeSubview:] method. by invoking the superviews [-removeSubview:] method.
@ -641,16 +693,13 @@
- (void) <b>removeSubview:</b> (NSView*)aView<br> - (void) <b>removeSubview:</b> (NSView*)aView<br>
Standards: NotMacOS-X NotOpenStep<br> Standards: NotMacOS-X NotOpenStep<br>
<p>
<p>
Removes the view from the receivers list of subviews Removes the view from the receivers list of subviews
and from the responder chain. and from the responder chain.
</p> </p>
<p>
<p>
Also invokes [aView -viewWillMoveToWindow: nil] to handle Also invokes [aView -viewWillMoveToWindow: nil] to handle
removal of aView (and recursively, its children) from its removal of aView (and recursively, its children) from its
@ -669,8 +718,13 @@ Standards: NotMacOS-X NotOpenStep<br>
<hr> <hr>
<h2><a name="method-93">replaceSubview:</a></h2> <h2><a name="method-93">replaceSubview:with:</a></h2>
- (void) <b>replaceSubview:</b> (NSView*)oldView<br> - (void) <b>replaceSubview:</b> (NSView*)oldView <b>with:</b> (NSView*)newView<br>
<p>
Removes <var>oldView</var> from the receiver and places <var>newView</var> in its place.
</p>
<hr> <hr>
@ -862,11 +916,18 @@ Standards: NotMacOS-X NotOpenStep<br>
<h2><a name="method-131">viewWillMoveToSuperview:</a></h2> <h2><a name="method-131">viewWillMoveToSuperview:</a></h2>
- (void) <b>viewWillMoveToSuperview:</b> (NSView*)newSuperview<br> - (void) <b>viewWillMoveToSuperview:</b> (NSView*)newSuperview<br>
<p>
Notifies the receiver that its superview is being changed to
<var>newSuperview</var>.</p>
<hr> <hr>
<h2><a name="method-132">viewWillMoveToWindow:</a></h2> <h2><a name="method-132">viewWillMoveToWindow:</a></h2>
- (void) <b>viewWillMoveToWindow:</b> (NSWindow*)newWindow<br> - (void) <b>viewWillMoveToWindow:</b> (NSWindow*)newWindow<br>
<p>
Notifies the receiver that it will now be a view of <var>newWindow</var>.</p>
<hr> <hr>
<h2><a name="method-133">viewWithTag:</a></h2> <h2><a name="method-133">viewWithTag:</a></h2>
@ -887,6 +948,11 @@ Standards: NotMacOS-X NotOpenStep<br>
<h2><a name="method-136">window</a></h2> <h2><a name="method-136">window</a></h2>
- (NSWindow*) <b>window</b><br> - (NSWindow*) <b>window</b><br>
<p>
Returns the window in which the receiver resides.
</p>
<hr> <hr>
<h2><a name="method-137">writeEPSInsideRect:toPasteboard:</a></h2> <h2><a name="method-137">writeEPSInsideRect:toPasteboard:</a></h2>