mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-02 15:40:57 +00:00
Document gstate methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9593 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d03a6be506
commit
dd51dba9d6
2 changed files with 35 additions and 8 deletions
|
@ -3,6 +3,7 @@
|
||||||
* Source/NSView.m (_invalidateCoordinates): release the gstate.
|
* Source/NSView.m (_invalidateCoordinates): release the gstate.
|
||||||
(-releaseGState): Don't reset _allocate_gstate flag.
|
(-releaseGState): Don't reset _allocate_gstate flag.
|
||||||
(modified patch from Georg Fleischmann <georg@vhf.de>).
|
(modified patch from Georg Fleischmann <georg@vhf.de>).
|
||||||
|
* Documentation/gsdoc/NSView.gsdoc: Document gstate methods.
|
||||||
|
|
||||||
2001-04-14 Adam Fedor <fedor@gnu.org>
|
2001-04-14 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
|
|
@ -23,16 +23,22 @@
|
||||||
<declared>Gui/NSView.h</declared>
|
<declared>Gui/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
|
<p>NSView is an abstract class which provides facilities for
|
||||||
NSWindow object). Within the window is a hierarchy of NSViews, headed by the window's
|
drawing in a window and receiving events. It is the
|
||||||
content view. Every other view in a window is a descendant of this view.</p>
|
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>
|
||||||
|
|
||||||
<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>
|
||||||
|
@ -127,6 +133,16 @@
|
||||||
<method type="void">
|
<method type="void">
|
||||||
<sel>allocateGState</sel>
|
<sel>allocateGState</sel>
|
||||||
<desc>
|
<desc>
|
||||||
|
Tell the view to maintain a private gstate object which
|
||||||
|
encapsulates all the information about drawing, such as coordinate
|
||||||
|
transforms, line widths, etc. If you do not invoke this method,
|
||||||
|
a gstate object is constructed each time the view is lockFocused.
|
||||||
|
Allocating a private gstate may improve the performance of views
|
||||||
|
that are focused a lot and have a lot of customized drawing
|
||||||
|
parameters.
|
||||||
|
<p>
|
||||||
|
View subclasses should override the setUpGstate method to set these
|
||||||
|
custom parameters.
|
||||||
</desc>
|
</desc>
|
||||||
</method>
|
</method>
|
||||||
<method type="NSView*">
|
<method type="NSView*">
|
||||||
|
@ -436,6 +452,12 @@
|
||||||
<method type="int">
|
<method type="int">
|
||||||
<sel>gState</sel>
|
<sel>gState</sel>
|
||||||
<desc>
|
<desc>
|
||||||
|
Returns an identifier that represents the view's gstate object,
|
||||||
|
which is used to encapsulate drawing information about the view.
|
||||||
|
Most of the time a gstate object is created from scratch when
|
||||||
|
the view is focused, so if the view is not currently focused or
|
||||||
|
allocateGState has not been called, then this method will
|
||||||
|
return 0.
|
||||||
</desc>
|
</desc>
|
||||||
</method>
|
</method>
|
||||||
<method type="float">
|
<method type="float">
|
||||||
|
@ -614,6 +636,8 @@
|
||||||
<method type="void">
|
<method type="void">
|
||||||
<sel>releaseGState</sel>
|
<sel>releaseGState</sel>
|
||||||
<desc>
|
<desc>
|
||||||
|
Frees the gstate object, if there is one. Note that the next time
|
||||||
|
the view is lockFocused, the gstate will be allocated again.
|
||||||
</desc>
|
</desc>
|
||||||
</method>
|
</method>
|
||||||
<method type="void">
|
<method type="void">
|
||||||
|
@ -673,6 +697,8 @@
|
||||||
<method type="void">
|
<method type="void">
|
||||||
<sel>renewGState</sel>
|
<sel>renewGState</sel>
|
||||||
<desc>
|
<desc>
|
||||||
|
Invalidates the view's gstate object so it will be set up
|
||||||
|
again using setUpGState the next time the view is focused.
|
||||||
</desc>
|
</desc>
|
||||||
</method>
|
</method>
|
||||||
<method type="void">
|
<method type="void">
|
||||||
|
|
Loading…
Reference in a new issue