Change return of -drawTitle:withFrame:inView to NSRect instead of void.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38049 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2014-08-21 02:52:06 +00:00
parent 06f21dcd0d
commit ea086d02cf
3 changed files with 17 additions and 6 deletions

View file

@ -1,3 +1,10 @@
2014-08-20 22:49-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Headers/AppKit/NSButtonCell.h
* Source/NSButtonCell.m: Change return type of -drawTitle:withFrame:
inView: to NSRect instead of void per Cocoa documentation.
2014-08-18 12:14-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSWindow.m: Change code in

View file

@ -213,9 +213,9 @@ typedef enum _NSGradientType {
- (void) drawImage: (NSImage*)imageToDisplay
withFrame: (NSRect)cellFrame
inView: (NSView *)controlView;
- (void) drawTitle: (NSAttributedString*)titleToDisplay
withFrame: (NSRect)cellFrame
inView: (NSView *)controlView;
- (NSRect) drawTitle: (NSAttributedString*)titleToDisplay
withFrame: (NSRect)cellFrame
inView: (NSView *)controlView;
#endif
//

View file

@ -1068,12 +1068,16 @@ typedef struct _GSButtonCellFlags
}
}
- (void) drawTitle: (NSAttributedString*)titleToDisplay
withFrame: (NSRect)cellFrame
inView: (NSView*)controlView
- (NSRect) drawTitle: (NSAttributedString*)titleToDisplay
withFrame: (NSRect)cellFrame
inView: (NSView*)controlView
{
[self _drawAttributedText: titleToDisplay
inFrame: cellFrame];
return [titleToDisplay
boundingRectWithSize: cellFrame.size
options: NSStringDrawingUsesLineFragmentOrigin];
}
// Private helper method overridden in subclasses