Change drawing of text field cells so that they can display multiple

lines of text.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29132 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2009-12-16 22:25:59 +00:00
parent 93c18dfe7d
commit f3c7d70152
2 changed files with 24 additions and 5 deletions

View file

@ -223,10 +223,23 @@
[self _drawBackgroundWithFrame: cellFrame inView: controlView];
}
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
{
NSRect titleRect;
/* Make sure we are a text cell; titleRect might return an incorrect
rectangle otherwise. Note that the type could be different if the
user has set an image on us, which we just ignore (OS X does so as
well). */
_cell.type = NSTextCellType;
titleRect = [self titleRectForBounds: cellFrame];
[[self _drawAttributedString] drawInRect: titleRect];
}
/*
Attributed string that will be displayed.
*/
- (NSAttributedString*)_drawAttributedString
- (NSAttributedString*) _drawAttributedString
{
NSAttributedString *attrStr;