From 680d6b60eeff5c6ed5afd33ed1b3f7ed13575600 Mon Sep 17 00:00:00 2001 From: jdess Date: Sat, 6 May 2000 16:20:19 +0000 Subject: [PATCH] Added documentation for NSWindow. Far from complete. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6574 72102866-910b-0410-8b05-ffd578937521 --- Documentation/gsdoc/NSWindow.gsdoc | 78 ++++++++++++++++++++- Documentation/gsdoc/NSWindow.html | 105 ++++++++++++++++++++++++++++- 2 files changed, 181 insertions(+), 2 deletions(-) diff --git a/Documentation/gsdoc/NSWindow.gsdoc b/Documentation/gsdoc/NSWindow.gsdoc index 307b3a047..09979ac6d 100644 --- a/Documentation/gsdoc/NSWindow.gsdoc +++ b/Documentation/gsdoc/NSWindow.gsdoc @@ -7,7 +7,10 @@ - 0.1 + + + + 0.2 28 February, 2000 @@ -17,6 +20,35 @@ Gui/NSWindow.h NSCoding +

+ Instances of the NSWindow class handle on-screen windows, their associated + NSViews, and events generate by the user. An NSWindow's size is defined by its + frame rectangle, which encompasses its entire structure, and its content rectangle, + which includes only the content. +

+ +

+ Every NSWindow has a content view, the NSView which forms the root of the + window's view hierarchy. This view can be set using the setContentView: + method, and accessed through the contentView method. + setContentView: replaces the default content view created by NSWindow. +

+ +

+ Other views may be added to the window by using the content view's + addSubview: method. These subviews can also have subviews added, forming + a tree structure, the view hierarchy. When an NSWindow must display itself, it causes + this hierarchy to draw itself. Leaf nodes in the view hierarchy are drawn last, + causing them to potentially obscure views further up in the hierarchy. +

+ +

+ A delegate can be specified for an NSWindow, which will receive notifications of + events pertaining to the window. The delegate is set using setDelegate:, + and can be retrieved using delegate. The delegate can restrain resizing + by implementing the windowWillResize: toSize: method, or control the closing + of the window by implementing windowShouldClose:. +

contentRectForFrameRect: @@ -136,6 +168,9 @@ contentView +

+ Returns the NSWindow's content view. +

@@ -339,6 +374,21 @@ backing: backingType +

+ Initializes the receiver with a content rect of contentRect, a style mask of + styleMask, and a backing store type of backingType. +

+

+ The style mask values are NSTitledWindowMask, for a window with a title, + NSClosableWindowMask, for a window with a close widget, + NSMiniaturizableWindowMask, for a window with a miniaturize widget, + and NSResizableWindowMask, for a window with a resizing widget. These + mask values can be OR'd in any combination. +

+

+ Backing store values are NSBackingStoreBuffered, + NSBackingStoreRetained and NSBackingStoreNonretained. +

@@ -353,6 +403,23 @@ screen: aScreen +

+ Initializes the receiver with a content rect of contentRect, a style mask of + styleMask, a backing store type of backingType and a boolean + flag. flag specifies whether the window should be created now + (NO), or when it is displayed (YES). +

+

+ The style mask values are NSTitledWindowMask, for a window with a title, + NSClosableWindowMask, for a window with a close widget, + NSMiniaturizableWindowMask, for a window with a miniaturize widget, + and NSResizableWindowMask, for a window with a resizing widget. These + mask values can be OR'd in any combination. +

+

+ Backing store values are NSBackingStoreBuffered, + NSBackingStoreRetained and NSBackingStoreNonretained. +

@@ -691,6 +758,9 @@ setContentView: aView +

+ Sets the window's content view to aView, replacing any previous content view. +

@@ -841,6 +911,9 @@ setTitle: aString +

+ Sets the window's title to the string aString. +

@@ -874,6 +947,9 @@ title +

+ Returns an NSString containing the text of the window's title. +

diff --git a/Documentation/gsdoc/NSWindow.html b/Documentation/gsdoc/NSWindow.html index fad16934c..0d5452615 100644 --- a/Documentation/gsdoc/NSWindow.html +++ b/Documentation/gsdoc/NSWindow.html @@ -10,8 +10,10 @@
Richard Frith-Macdonald
+
James Dessart +
-

Version: 0.1

+

Version: 0.2

Date: 28 February, 2000

NSWindow

NSWindow

@@ -21,6 +23,43 @@


+

+ + Instances of the NSWindow class handle on-screen windows, their associated + NSViews, and events generate by the user. An NSWindow's size is defined by its + frame rectangle, which encompasses its entire structure, and its content rectangle, + which includes only the content. +

+ + +

+ + Every NSWindow has a content view, the NSView which forms the root of the + window's view hierarchy. This view can be set using the setContentView: + method, and accessed through the contentView method. + setContentView: replaces the default content view created by NSWindow. +

+ + +

+ + Other views may be added to the window by using the content view's + addSubview: method. These subviews can also have subviews added, forming + a tree structure, the view hierarchy. When an NSWindow must display itself, it causes + this hierarchy to draw itself. Leaf nodes in the view hierarchy are drawn last, + causing them to potentially obscure views further up in the hierarchy. +

+ + +

+ + A delegate can be specified for an NSWindow, which will receive notifications of + events pertaining to the window. The delegate is set using setDelegate:, + and can be retrieved using delegate. The delegate can restrain resizing + by implementing the windowWillResize: toSize: method, or control the closing + of the window by implementing windowShouldClose:. +

+
  • +contentRectForFrameRect: @@ -293,6 +332,11 @@

    contentView

    - (id) contentView
    +

    + + Returns the NSWindow's content view. +

    +

    convertBaseToScreen:

    @@ -468,11 +512,55 @@

    initWithContentRect:styleMask:backing:

    - (id) initWithContentRect: (NSRect)contentRect styleMask: (unsigned int)styleMask backing: (NSBackingStoreType)backingType
    +

    + + Initializes the receiver with a content rect of contentRect, a style mask of + styleMask, and a backing store type of backingType. +

    + +

    + + The style mask values are NSTitledWindowMask, for a window with a title, + NSClosableWindowMask, for a window with a close widget, + NSMiniaturizableWindowMask, for a window with a miniaturize widget, + and NSResizableWindowMask, for a window with a resizing widget. These + mask values can be OR'd in any combination. +

    + +

    + + Backing store values are NSBackingStoreBuffered, + NSBackingStoreRetained and NSBackingStoreNonretained. +

    +

    initWithContentRect:styleMask:backing:defer:screen:

    - (id) initWithContentRect: (NSRect)contentRect styleMask: (unsigned int)styleMask backing: (NSBackingStoreType)bufferingType defer: (BOOL)flag screen: (NSScreen*)aScreen
    +

    + + Initializes the receiver with a content rect of contentRect, a style mask of + styleMask, a backing store type of backingType and a boolean + flag. flag specifies whether the window should be created now + (NO), or when it is displayed (YES). +

    + +

    + + The style mask values are NSTitledWindowMask, for a window with a title, + NSClosableWindowMask, for a window with a close widget, + NSMiniaturizableWindowMask, for a window with a miniaturize widget, + and NSResizableWindowMask, for a window with a resizing widget. These + mask values can be OR'd in any combination. +

    + +

    + + Backing store values are NSBackingStoreBuffered, + NSBackingStoreRetained and NSBackingStoreNonretained. +

    +

    interfaceStyle

    @@ -773,6 +861,11 @@

    setContentView:

    - (void) setContentView: (NSView*)aView
    +

    + + Sets the window's content view to aView, replacing any previous content view. +

    +

    setDefaultButtonCell:

    @@ -898,6 +991,11 @@

    setTitle:

    - (void) setTitle: (NSString*)aString
    +

    + + Sets the window's title to the string aString. +

    +

    setTitleWithRepresentedFilename:

    @@ -928,6 +1026,11 @@

    title

    - (NSString*) title
    +

    + + Returns an NSString containing the text of the window's title. +

    +

    tryToPerform: