diff --git a/ChangeLog b/ChangeLog
index f99182f50..57104478f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-29 Fabien VALLON Initializes and returns a new NSCachedImageRep with size
- and depth specified by aSize and aDepth recpectivly.
+ and depth specified by aSize and aDepth respectively.
If seperate is YES, the image will gets its own unique cache without
sharing it with other images. Initializes and returns a new NSCachedImageRep into a NSWindow
aWindow. The image will be draw into the rectange aRect of
- this window. aWindow is retained
See Also: -rect -window
*/ - (id) initWithWindow: (NSWindow *)aWindow rect: (NSRect)aRect { @@ -138,14 +140,16 @@ [super dealloc]; } -/**Returns the rectangle where the image is cached
+/**Returns the rectangle where the image is cached.
+See Also: -initWithWindow:rect:
*/ - (NSRect) rect { return _rect; } -/**Returns the NSWindow where the image is cached
+/**Returns the NSWindow where the image is cached.
+See Also: -initWithWindow:rect:
*/ - (NSWindow *) window { diff --git a/Source/NSCell.m b/Source/NSCell.m index a4e164104..478b63fda 100644 --- a/Source/NSCell.m +++ b/Source/NSCell.m @@ -122,8 +122,8 @@ static NSColor *shadowCol; return nil; } -/**TODO. This class method returns NO. This method is override by subclasses -
+/**This class method returns NO. This method should be overrided by + subclasses.
*/ + (BOOL) prefersTrackingUntilMouseUp { @@ -138,9 +138,11 @@ static NSColor *shadowCol; return [self initTextCell: @""]; } -/**Initialize and returns a new NSCell with a NSImage anImage. - This method sets the image position to NSImageOnly and the cell's type - to NSImageCellType.
See Also: -initTextCell:
+/**Initializes and returns a new NSCell with a NSImage anImage. + This method sets the image position to NSImageOnly and the cell's type to + NSImageCellType.
+See Also: -initTextCell:
*/ - (id) initImageCell: (NSImage*)anImage { @@ -171,8 +173,9 @@ static NSColor *shadowCol; return self; } -/**Initialize and returns a new NSCell with a NSString aString. - This method sets the cell's type to NSTextCellType.
+/**Initializes and returns a new NSCell with a NSString aString. + This method sets the cell's type to + NSTextCellType.
See Also: -initImageCell:
*/ - (id) initTextCell: (NSString*)aString @@ -434,7 +437,7 @@ static NSColor *shadowCol; /**Returns some NSCell's attributes for the specified NSCellAttribute
- *See Also: -setCellAttribute:to:
+See Also: -setCellAttribute:to:
*/ - (int) cellAttribute: (NSCellAttribute)aParameter { @@ -599,10 +602,9 @@ static NSColor *shadowCol; } } -/**Set the NSCell's type. See - NSCellType
. -If the cell is set to NSTextCellType, the cell is given a default - title and is reset to the default system font.
+/**Sets the NSCell's type. See NSCellType + .If the cell is set to NSTextCellType, the cell is given + a default title and is reset to the default system font.
See Also: -type
*/ - (void) setType: (NSCellType)aType @@ -635,7 +637,7 @@ static NSColor *shadowCol; /**Returns the cell's type. Returns NSNullCellType if the cell's type flag is set to NSImageCellType and if the cell's image is nil. See NSCellType for more - informations.
See Also -setType:
+ information.See Also -setType:
*/ - (NSCellType) type { @@ -795,7 +797,8 @@ static NSColor *shadowCol; /**Returns the alignment of the text used in the NSCell. See NSTextAlignment for more - informations. By default the text alignment is NSJustifiedTextAlignment
+ informations. By default the text alignment is NSJustifiedTextAlignmentSee Also: -setAlignment:
*/ - (NSTextAlignment) alignment @@ -1063,9 +1066,8 @@ static NSColor *shadowCol; return nil; } -/**Returns whether the cell can continuously send its action messages. - Some subclasses should redefine this method with NSLeftMouseDraggedMask
-See Also: -setContinuous:
+/**Returns whether the cell can continuously send its action messages.
+See Also: -setContinuous:
*/ - (BOOL) isContinuous { @@ -1073,8 +1075,7 @@ static NSColor *shadowCol; return (_action_mask & NSPeriodicMask) != 0; } -/**Sets whether the cell can continuously send its action messages. - Some subclasses should redefine this method with NSLeftMouseDraggedMask
+/**Sets whether the cell can continuously send its action messages.
*See Also: -isContinuous
*/ - (void) setContinuous: (BOOL)flag @@ -1101,7 +1102,8 @@ static NSColor *shadowCol; return previousMask; } -/**Returns the NSCell's image if the NSCell's type is NSImageCellType, +/**
Returns the NSCell's image if the NSCell's type is NSImageCellType, returns nil otherwise.
See Also: -setImage: -setType: -type
*/ @@ -1118,8 +1120,7 @@ static NSColor *shadowCol; /**Sets the NSCell's image to anImage. This method sets the cell's type to NSImageCellType if needed. Raises an NSInvalidArgumentException if the anImage is not an NSImage (sub)class. The new image is retained and the - old one is released
- *See Also: -image
+ old one is releasedSee Also: -image
*/ - (void) setImage: (NSImage*)anImage { @@ -1452,8 +1453,10 @@ static NSColor *shadowCol; ASSIGN (_represented_object, anObject); } -/* - * Tracking the Mouse +/**Returns YES. Subclasses should overrided this method if you want + stop tracking the mouse. This method is call in the + -trackMouse:inRect:ofView:untilMouseUp: main loop.
+See Also: -trackMouse:inRect:ofView:untilMouseUp:
*/ - (BOOL) continueTracking: (NSPoint)lastPoint at: (NSPoint)currentPoint @@ -1462,17 +1465,33 @@ static NSColor *shadowCol; return YES; } +/**Returns the mouse flags. This flags are usally sets in + the -trackMouse:inRect:ofView:untilMouseUp: method
+ */ - (int) mouseDownFlags { return _mouse_down_flags; } +/**Gets the NSCell's delay and the interval + parameters used when NSCell sends continouly action messages. + The NSCell implementation sets both delay and interval + to 0.1.
+See Also: -trackMouse:inRect:ofView:untilMouseUp:
+ */ - (void) getPeriodicDelay: (float*)delay interval: (float*)interval { *delay = 0.1; *interval = 0.1; } +/**Returns whether tracking starts. The NSCell implementation + returns YES when the startPoint is into the control view + retangle, NO otherwise. This method is call at the early stage of + -trackMouse:inRect:ofView:untilMouseUp:
See Also: + [NSView-mouse:inRect:] -trackMouse:inRect:ofView:untilMouseUp: +
+ */ - (BOOL) startTrackingAt: (NSPoint)startPoint inView: (NSView*)controlView { // If the point is in the view then yes start tracking @@ -1482,6 +1501,8 @@ static NSColor *shadowCol; return NO; } +/**TODO
+ */ - (void) stopTracking: (NSPoint)lastPoint at: (NSPoint)stopPoint inView: (NSView*)controlView @@ -1647,14 +1668,14 @@ static NSColor *shadowCol; if (_cell.type == NSTextCellType && _cell.is_disabled == NO && (_cell.is_selectable == YES || _cell.is_editable == YES)) { - static NSCursor *c = nil; - NSRect r; + static NSCursor *cursor = nil; + NSRect rect; - if (c == nil) + if (cursor== nil) { - c = RETAIN([NSCursor IBeamCursor]); + cursor = RETAIN([NSCursor IBeamCursor]); } - r = NSIntersectionRect(cellFrame, [controlView visibleRect]); + rect = NSIntersectionRect(cellFrame, [controlView visibleRect]); /* * Here we depend on an undocumented feature of NSCursor which may or * may not exist in OPENSTEP or MacOS-X ... @@ -1662,7 +1683,7 @@ static NSColor *shadowCol; * either entry to or exit from the view, we push it on entry and * pop it from the cursor stack on exit. */ - [controlView addCursorRect: r cursor: c]; + [controlView addCursorRect: rect cursor: cursor]; } } @@ -1675,7 +1696,8 @@ static NSColor *shadowCol; } /**Does nothing. This method is used by subclasses to recalculate sizes
- *It is usally called from a NSControl object ([NSControl-calcSize])
+It is usally called from a NSControl object
+See Also: [NSControl-calcSize]
*/ - (void) calcDrawInfo: (NSRect)aRect { @@ -1839,8 +1861,8 @@ static NSColor *shadowCol; return NSDefaultControlTint; } -/**This method is used by subclass to specified the control view. - This method returns nil
+/**This method is used by subclasses to specified the control view. + This method returns nil.
*/ - (NSView*) controlView { @@ -1927,13 +1949,16 @@ static NSColor *shadowCol; [self drawInteriorWithFrame: cellFrame inView: controlView]; } +/**Sets whether the NSCell is highlighted.
+See Also: -isHighlighted
+ */ - (void) setHighlighted: (BOOL) flag { _cell.is_highlighted = flag; } -/** - *Returns whether the cell is highlighted. By default NO
+/**Returns whether the cell is highlighted. By default NO
+See Also: -setHighlighted:
*/ - (BOOL) isHighlighted { @@ -2009,7 +2034,9 @@ static NSColor *shadowCol; /* * Editing Text */ -/**TODO
+/**.This method does nothing if a the controlView is nil, + if text object does not exist or if the cell's type is not NSTextCellType
*/ - (void) editWithFrame: (NSRect)aRect inView: (NSView*)controlView @@ -2072,7 +2099,9 @@ static NSColor *shadowCol; [clipView removeFromSuperview]; } -/**TODO
+/**TODO.This method does nothing if a the controlView is nil, + if text object does not exist or if the cell's type is not NSTextCellType
*/ - (void) selectWithFrame: (NSRect)aRect inView: (NSView*)controlView