mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Add some 10.5 methods for NSLayoutManager
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27480 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
66e22d664f
commit
ae4c7503ac
3 changed files with 56 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-12-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSLayoutManager.h: Add some 10.5 methods.
|
||||
* Source/GSLayoutManager.m: Implement them.
|
||||
|
||||
2008-12-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSWindow.h: Use one of the spare ivars for toolbar.
|
||||
|
|
|
@ -293,12 +293,23 @@ invalidation.)
|
|||
forGlyphRange: (NSRange)glyphRange; /* not OPENSTEP */
|
||||
|
||||
|
||||
- (NSTextContainer *) textContainerForGlyphAtIndex: (unsigned int)glyphIndex
|
||||
- (NSTextContainer *) textContainerForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveRange;
|
||||
- (NSRect) lineFragmentRectForGlyphAtIndex: (unsigned int)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveGlyphRange;
|
||||
- (NSRect) lineFragmentUsedRectForGlyphAtIndex: (unsigned int)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveGlyphRange;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
- (NSTextContainer *) textContainerForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveRange
|
||||
withoutAdditionalLayout: (BOOL)flag;
|
||||
- (NSRect) lineFragmentRectForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveGlyphRange
|
||||
withoutAdditionalLayout: (BOOL)flag;
|
||||
- (NSRect) lineFragmentUsedRectForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveGlyphRange
|
||||
withoutAdditionalLayout: (BOOL)flag;
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -2356,14 +2356,24 @@ forStartOfGlyphRange: (NSRange)glyphRange
|
|||
|
||||
#undef SETUP_STUFF
|
||||
|
||||
- (NSTextContainer *) textContainerForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveRange
|
||||
{
|
||||
return [self textContainerForGlyphAtIndex: glyphIndex
|
||||
effectiveRange: effectiveRange
|
||||
withoutAdditionalLayout: NO];
|
||||
}
|
||||
|
||||
- (NSTextContainer *) textContainerForGlyphAtIndex: (unsigned int)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveRange
|
||||
- (NSTextContainer *) textContainerForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveRange
|
||||
withoutAdditionalLayout: (BOOL)flag
|
||||
{
|
||||
textcontainer_t *tc;
|
||||
int i;
|
||||
|
||||
[self _doLayoutToGlyph: glyphIndex];
|
||||
if (!flag)
|
||||
[self _doLayoutToGlyph: glyphIndex];
|
||||
|
||||
for (i = 0, tc = textcontainers; i < num_textcontainers; i++, tc++)
|
||||
if (tc->pos + tc->length > glyphIndex)
|
||||
break;
|
||||
|
@ -2382,14 +2392,25 @@ forStartOfGlyphRange: (NSRange)glyphRange
|
|||
return tc->textContainer;
|
||||
}
|
||||
|
||||
- (NSRect) lineFragmentRectForGlyphAtIndex: (unsigned int)glyphIndex
|
||||
- (NSRect) lineFragmentRectForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveGlyphRange
|
||||
{
|
||||
return [self lineFragmentRectForGlyphAtIndex: glyphIndex
|
||||
effectiveRange: effectiveGlyphRange
|
||||
withoutAdditionalLayout: NO];
|
||||
}
|
||||
|
||||
- (NSRect) lineFragmentRectForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveGlyphRange
|
||||
withoutAdditionalLayout: (BOOL)flag
|
||||
{
|
||||
int i;
|
||||
textcontainer_t *tc;
|
||||
linefrag_t *lf;
|
||||
|
||||
[self _doLayoutToGlyph: glyphIndex];
|
||||
if (!flag)
|
||||
[self _doLayoutToGlyph: glyphIndex];
|
||||
|
||||
for (i = 0, tc = textcontainers; i < num_textcontainers; i++, tc++)
|
||||
if (tc->pos + tc->length > glyphIndex)
|
||||
break;
|
||||
|
@ -2415,14 +2436,25 @@ forStartOfGlyphRange: (NSRange)glyphRange
|
|||
return lf->rect;
|
||||
}
|
||||
|
||||
- (NSRect) lineFragmentUsedRectForGlyphAtIndex: (unsigned int)glyphIndex
|
||||
- (NSRect) lineFragmentUsedRectForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveGlyphRange
|
||||
{
|
||||
return [self lineFragmentUsedRectForGlyphAtIndex: glyphIndex
|
||||
effectiveRange: effectiveGlyphRange
|
||||
withoutAdditionalLayout: NO];
|
||||
}
|
||||
|
||||
- (NSRect) lineFragmentUsedRectForGlyphAtIndex: (NSUInteger)glyphIndex
|
||||
effectiveRange: (NSRange *)effectiveGlyphRange
|
||||
withoutAdditionalLayout: (BOOL)flag
|
||||
{
|
||||
int i;
|
||||
textcontainer_t *tc;
|
||||
linefrag_t *lf;
|
||||
|
||||
[self _doLayoutToGlyph: glyphIndex];
|
||||
if (!flag)
|
||||
[self _doLayoutToGlyph: glyphIndex];
|
||||
|
||||
for (i = 0, tc = textcontainers; i < num_textcontainers; i++, tc++)
|
||||
if (tc->pos + tc->length > glyphIndex)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue