mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:11:18 +00:00
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:
parent
ed92f00777
commit
b690b049da
4 changed files with 183 additions and 126 deletions
|
@ -10,8 +10,8 @@
|
|||
<author name="James Dessart">
|
||||
<email address="skwirl@cam.org"/>
|
||||
</author>
|
||||
<version>0.2</version>
|
||||
<date>11 March, 2000</date>
|
||||
<version>0.2.1</version>
|
||||
<date>8 April, 2000</date>
|
||||
</head>
|
||||
<body>
|
||||
<chapter>
|
||||
|
@ -25,9 +25,9 @@
|
|||
can be retrieved by the method <code>floatValue</code> and set by the method
|
||||
<code>setFloatValue:</code>.</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>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>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
|
||||
|
@ -135,8 +135,8 @@
|
|||
<sel>setAltIncrementValue:</sel>
|
||||
<arg type="double">increment</arg>
|
||||
<desc>
|
||||
<p>Sets the value by which the slider will be be incremented when with the
|
||||
ALT key down to <var>increment</var>.</p>
|
||||
<p>Sets the value by which the slider will be incremented, when the
|
||||
ALT key is held down, to <var>increment</var>.</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="void">
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
<dt>James Dessart
|
||||
<dd>
|
||||
</dl>
|
||||
<p>Version: 0.2</p>
|
||||
<p>Date: 11 March, 2000</p>
|
||||
<p>Version: 0.2.1</p>
|
||||
<p>Date: 8 April, 2000</p>
|
||||
<h2><a name="cont-0">NSSlider</a></h2>
|
||||
<h2><a name="NSSlider">NSSlider</a></h2>
|
||||
<p><b>Declared in:</b> AppKit/NSSlider.h</p>
|
||||
|
@ -23,56 +23,31 @@
|
|||
</p>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
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
|
||||
can be retrieved by the method <code>floatValue</code> and set by the method
|
||||
<code>setFloatValue:</code>.</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>
|
||||
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>
|
||||
<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
|
||||
slider, for identification.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As with many controls, NSSlider relies on its cell counterpart, NSSliderCell.
|
||||
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
|
||||
scroller is intended to represent the visible portion of a view, whereas a slider
|
||||
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>
|
||||
- (BOOL) <b>acceptsFirstMouse:</b> (NSEvent*)mouseDownEvent<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
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
|
||||
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>
|
||||
- (BOOL) <b>allowsTickMarkValuesOnly</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -134,8 +107,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-2">altIncrementValue</a></h2>
|
||||
- (double) <b>altIncrementValue</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
Returns the value by which the slider will be incremented if the user holds down
|
||||
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>
|
||||
- (double) <b>closestTickMarkValueToValue:</b> (double)aValue<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -153,8 +124,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-4">image</a></h2>
|
||||
- (NSImage*) <b>image</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
Returns the image drawn in the slider's track. Returns <code>nil</code> if
|
||||
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>
|
||||
- (int) <b>indexOfTickMarkAtPoint:</b> (NSPoint)point<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -172,8 +141,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-6">isVertical</a></h2>
|
||||
- (int) <b>isVertical</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
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
|
||||
|
@ -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>
|
||||
- (float) <b>knobThickness</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
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>
|
||||
|
||||
|
@ -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>
|
||||
- (double) <b>maxValue</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (double) <b>minValue</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (int) <b>numberOfTickMarks</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -221,8 +185,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-11">rectOfTickMarkAtIndex:</a></h2>
|
||||
- (NSRect) <b>rectOfTickMarkAtIndex:</b> (int)index<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -230,8 +193,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-12">setAllowsTickMarkValuesOnly:</a></h2>
|
||||
- (void) <b>setAllowsTickMarkValuesOnly:</b> (BOOL)flag<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -239,18 +201,16 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-13">setAltIncrementValue:</a></h2>
|
||||
- (void) <b>setAltIncrementValue:</b> (double)increment<br>
|
||||
|
||||
|
||||
<p>
|
||||
Sets the value by which the slider will be be incremented when with the
|
||||
ALT key down to <var>increment</var>.</p>
|
||||
<p>
|
||||
Sets the value by which the slider will be incremented, when the
|
||||
ALT key is held down, to <var>increment</var>.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-14">setImage:</a></h2>
|
||||
- (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>
|
||||
|
||||
|
||||
|
@ -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>
|
||||
- (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 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>
|
||||
- (void) <b>setMaxValue:</b> (double)maxValue<br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (void) <b>setMinValue:</b> (double)minValue<br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (void) <b>setNumberOfTickMarks:</b> (int)numberOfTickMarks<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -295,8 +251,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-19">setTickMarkPosition:</a></h2>
|
||||
- (void) <b>setTickMarkPosition:</b> (NSTickMarkPosition)position<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -304,8 +259,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-20">setTitle:</a></h2>
|
||||
- (void) <b>setTitle:</b> (NSString*)barTitle<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
Sets the title of the slider to <var>barTitle</var>. This title is displayed
|
||||
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>
|
||||
- (void) <b>setTitleCell:</b> (NSCell*)titleCell<br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (void) <b>setTitleColor:</b> (NSColor*)color<br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (void) <b>setTitleFont:</b> (NSFont*)font<br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (NSTickMarkPosition) <b>tickMarkPosition</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -350,8 +300,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-25">tickMarkValueAtIndex:</a></h2>
|
||||
- (double) <b>tickMarkValueAtIndex:</b> (int)index<br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
|
@ -359,8 +308,7 @@ As of yet, unimplemented.</p>
|
|||
<h2><a name="method-26">title</a></h2>
|
||||
- (NSString*) <b>title</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (id) <b>titleCell</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (NSColor*) <b>titleColor</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<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>
|
||||
- (NSFont*) <b>titleFont</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
Returns the font used to draw the title.</p>
|
||||
|
||||
|
||||
|
|
|
@ -7,8 +7,11 @@
|
|||
<email address="rfm@gnu.org"/>
|
||||
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
|
||||
</author>
|
||||
<version>0.1</version>
|
||||
<date>28 February, 2000</date>
|
||||
<author name="James Dessart">
|
||||
<email address="skwirl@cam.org"/>
|
||||
</author>
|
||||
<version>0.2</version>
|
||||
<date>8 April, 2000</date>
|
||||
</head>
|
||||
<body>
|
||||
<chapter>
|
||||
|
@ -17,21 +20,35 @@
|
|||
<declared>AppKit/NSView.h</declared>
|
||||
<conform>NSCoding</conform>
|
||||
<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>
|
||||
<method type="NSMenu*" factory="yes">
|
||||
<sel>defaultMenu</sel>
|
||||
<desc>
|
||||
<p>As of yet, unimplemented.</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="NSView*" factory="yes">
|
||||
<sel>focusView</sel>
|
||||
<desc>
|
||||
<p>Returns the view which currently has the focus.</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="BOOL">
|
||||
<sel>acceptsFirstMouse:</sel>
|
||||
<arg type="NSEvent*">theEvent</arg>
|
||||
<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>
|
||||
</method>
|
||||
<method type="void">
|
||||
|
@ -46,6 +63,9 @@
|
|||
<sel>addSubview:</sel>
|
||||
<arg type="NSView*">aView</arg>
|
||||
<desc>
|
||||
<p>
|
||||
Adds <var>aView</var> as a subview of the receiver.
|
||||
</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="void">
|
||||
|
@ -110,6 +130,12 @@
|
|||
<sel>ancestorSharedWithView:</sel>
|
||||
<arg type="NSView*">aView</arg>
|
||||
<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>
|
||||
</method>
|
||||
<method type="BOOL">
|
||||
|
@ -400,6 +426,8 @@
|
|||
<sel>hitTest:</sel>
|
||||
<arg type="NSPoint">aPoint</arg>
|
||||
<desc>
|
||||
<p>Returns the subview, lowest in the receiver's hierarchy, which contains
|
||||
<var>aPoint</var></p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="id">
|
||||
|
@ -417,6 +445,9 @@
|
|||
<sel>isDescendantOf:</sel>
|
||||
<arg type="NSView*">aView</arg>
|
||||
<desc>
|
||||
<p>
|
||||
Returns <code>YES</code> if <var>aView</var> is an ancestor of the receiver.
|
||||
</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="BOOL">
|
||||
|
@ -466,12 +497,16 @@
|
|||
<sel>menuForEvent:</sel>
|
||||
<arg type="NSEvent*">theEvent</arg>
|
||||
<desc>
|
||||
<p>As of yet, unimplemented.</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="BOOL">
|
||||
<sel>mouse:</sel>
|
||||
<arg type="NSPoint">aPoint</arg>
|
||||
<sel>inRect:</sel>
|
||||
<arg type="NSRect">aRect</arg>
|
||||
<desc>
|
||||
<p>Returns whether or not <var>aPoint</var> lies within <var>aRect</var>.</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="BOOL">
|
||||
|
@ -622,7 +657,12 @@
|
|||
<method type="void">
|
||||
<sel>replaceSubview:</sel>
|
||||
<arg type="NSView*">oldView</arg>
|
||||
<sel>with:</sel>
|
||||
<arg type="NSView*">newView</arg>
|
||||
<desc>
|
||||
<p>
|
||||
Removes <var>oldView</var> from the receiver and places <var>newView</var> in its place.
|
||||
</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="void">
|
||||
|
@ -848,12 +888,15 @@
|
|||
<sel>viewWillMoveToSuperview:</sel>
|
||||
<arg type="NSView*">newSuperview</arg>
|
||||
<desc>
|
||||
<p>Notifies the receiver that its superview is being changed to
|
||||
<var>newSuperview</var>.</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="void">
|
||||
<sel>viewWillMoveToWindow:</sel>
|
||||
<arg type="NSWindow*">newWindow</arg>
|
||||
<desc>
|
||||
<p>Notifies the receiver that it will now be a view of <var>newWindow</var>.</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="id">
|
||||
|
@ -875,6 +918,9 @@
|
|||
<method type="NSWindow*">
|
||||
<sel>window</sel>
|
||||
<desc>
|
||||
<p>
|
||||
Returns the window in which the receiver resides.
|
||||
</p>
|
||||
</desc>
|
||||
</method>
|
||||
<method type="void">
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
<dl>
|
||||
<dt><a href="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a>
|
||||
<dd>
|
||||
<dt>James Dessart
|
||||
<dd>
|
||||
</dl>
|
||||
<p>Version: 0.1</p>
|
||||
<p>Date: 28 February, 2000</p>
|
||||
<p>Version: 0.2</p>
|
||||
<p>Date: 8 April, 2000</p>
|
||||
<h2><a name="cont-0">NSView</a></h2>
|
||||
<h2><a name="NSView">NSView</a></h2>
|
||||
<p><b>Declared in:</b> AppKit/NSView.h</p>
|
||||
|
@ -21,6 +23,22 @@
|
|||
</p>
|
||||
<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>
|
||||
<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-68">-lockFocus</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-72">-needsPanelToBecomeKey</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-91">-removeTrackingRect:</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-95">-resizeSubviewsWithOldSize:</a>
|
||||
<li><a href="NSView.html#method-96">-resizeWithOldSuperviewSize:</a>
|
||||
|
@ -166,16 +184,26 @@
|
|||
<h2><a name="method-0">defaultMenu</a></h2>
|
||||
+ (NSMenu*) <b>defaultMenu</b><br>
|
||||
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-1">focusView</a></h2>
|
||||
+ (NSView*) <b>focusView</b><br>
|
||||
|
||||
<p>
|
||||
Returns the view which currently has the focus.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-2">acceptsFirstMouse:</a></h2>
|
||||
- (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>
|
||||
<h2><a name="method-3">addCursorRect:cursor:</a></h2>
|
||||
|
@ -186,6 +214,11 @@
|
|||
<h2><a name="method-4">addSubview:</a></h2>
|
||||
- (void) <b>addSubview:</b> (NSView*)aView<br>
|
||||
|
||||
<p>
|
||||
|
||||
Adds <var>aView</var> as a subview of the receiver.
|
||||
</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-5">addSubview:positioned:relativeTo:</a></h2>
|
||||
|
@ -226,6 +259,14 @@
|
|||
<h2><a name="method-12">ancestorSharedWithView:</a></h2>
|
||||
- (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>
|
||||
<h2><a name="method-13">autoresizesSubviews</a></h2>
|
||||
|
@ -451,6 +492,10 @@
|
|||
<h2><a name="method-57">hitTest:</a></h2>
|
||||
- (NSView*) <b>hitTest:</b> (NSPoint)aPoint<br>
|
||||
|
||||
<p>
|
||||
Returns the subview, lowest in the receiver's hierarchy, which contains
|
||||
<var>aPoint</var></p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-58">initWithFrame:</a></h2>
|
||||
|
@ -466,6 +511,11 @@
|
|||
<h2><a name="method-60">isDescendantOf:</a></h2>
|
||||
- (BOOL) <b>isDescendantOf:</b> (NSView*)aView<br>
|
||||
|
||||
<p>
|
||||
|
||||
Returns <code>YES</code> if <var>aView</var> is an ancestor of the receiver.
|
||||
</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-61">isFlipped</a></h2>
|
||||
|
@ -511,10 +561,16 @@
|
|||
<h2><a name="method-69">menuForEvent:</a></h2>
|
||||
- (NSMenu*) <b>menuForEvent:</b> (NSEvent*)theEvent<br>
|
||||
|
||||
<p>
|
||||
As of yet, unimplemented.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-70">mouse:</a></h2>
|
||||
- (BOOL) <b>mouse:</b> (NSPoint)aPoint<br>
|
||||
<h2><a name="method-70">mouse:inRect:</a></h2>
|
||||
- (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>
|
||||
|
@ -606,9 +662,7 @@
|
|||
<h2><a name="method-88">removeFromSuperview</a></h2>
|
||||
- (void) <b>removeFromSuperview</b><br>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
|
||||
Removes the receiver from its superviews list of subviews,
|
||||
by invoking the superviews [-removeSubview:] method, and
|
||||
|
@ -616,8 +670,7 @@
|
|||
superview as needing redisplay.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
|
||||
This is dangerous to use during display, since it alters the
|
||||
rectangles needing display.
|
||||
|
@ -628,8 +681,7 @@
|
|||
<h2><a name="method-89">removeFromSuperviewWithoutNeedingDisplay</a></h2>
|
||||
- (void) <b>removeFromSuperviewWithoutNeedingDisplay</b><br>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
|
||||
Removes the receiver from its superviews list of subviews,
|
||||
by invoking the superviews [-removeSubview:] method.
|
||||
|
@ -641,16 +693,13 @@
|
|||
- (void) <b>removeSubview:</b> (NSView*)aView<br>
|
||||
Standards: NotMacOS-X NotOpenStep<br>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
|
||||
Removes the view from the receivers list of subviews
|
||||
and from the responder chain.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<p>
|
||||
|
||||
Also invokes [aView -viewWillMoveToWindow: nil] to handle
|
||||
removal of aView (and recursively, its children) from its
|
||||
|
@ -669,8 +718,13 @@ Standards: NotMacOS-X NotOpenStep<br>
|
|||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-93">replaceSubview:</a></h2>
|
||||
- (void) <b>replaceSubview:</b> (NSView*)oldView<br>
|
||||
<h2><a name="method-93">replaceSubview:with:</a></h2>
|
||||
- (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>
|
||||
|
@ -862,11 +916,18 @@ Standards: NotMacOS-X NotOpenStep<br>
|
|||
<h2><a name="method-131">viewWillMoveToSuperview:</a></h2>
|
||||
- (void) <b>viewWillMoveToSuperview:</b> (NSView*)newSuperview<br>
|
||||
|
||||
<p>
|
||||
Notifies the receiver that its superview is being changed to
|
||||
<var>newSuperview</var>.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-132">viewWillMoveToWindow:</a></h2>
|
||||
- (void) <b>viewWillMoveToWindow:</b> (NSWindow*)newWindow<br>
|
||||
|
||||
<p>
|
||||
Notifies the receiver that it will now be a view of <var>newWindow</var>.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<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>
|
||||
- (NSWindow*) <b>window</b><br>
|
||||
|
||||
<p>
|
||||
|
||||
Returns the window in which the receiver resides.
|
||||
</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2><a name="method-137">writeEPSInsideRect:toPasteboard:</a></h2>
|
||||
|
|
Loading…
Reference in a new issue