mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:30:37 +00:00
* Headers/AppKit/NSTextContainer.h,
* Source/NSTextContainer.m, * Source/GSHorizontalTypesetter.m: Correct the definition of NSLineMovementDirection. * Headers/AppKit/NSFont.h * Source/NSFont.m: Add a few missing 10.4 methods. * Header/AppKit/NSLayoutManager.h, * Source/NSLayoutManager.m: Add one 10.5 method. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35999 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ff7f9ada4a
commit
28a4847640
8 changed files with 88 additions and 15 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2013-01-19 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSTextContainer.h,
|
||||
* Source/NSTextContainer.m,
|
||||
* Source/GSHorizontalTypesetter.m: Correct the definition of
|
||||
NSLineMovementDirection.
|
||||
* Headers/AppKit/NSFont.h
|
||||
* Source/NSFont.m: Add a few missing 10.4 methods.
|
||||
* Header/AppKit/NSLayoutManager.h,
|
||||
* Source/NSLayoutManager.m: Add one 10.5 method.
|
||||
|
||||
2013-01-13 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -197,6 +197,10 @@ APPKIT_EXPORT const CGFloat *NSFontIdentityMatrix;
|
|||
- (CGFloat) xHeight;
|
||||
- (CGFloat) widthOfString: (NSString*)string;
|
||||
- (CGFloat) defaultLineHeightForFont;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (CGFloat) leading;
|
||||
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
- (NSUInteger) numberOfGlyphs;
|
||||
|
@ -236,6 +240,17 @@ APPKIT_EXPORT const CGFloat *NSFontIdentityMatrix;
|
|||
- (int) positionsForCompositeSequence: (NSGlyph*)glyphs
|
||||
numberOfGlyphs: (int)numGlyphs
|
||||
pointArray: (NSPoint*)points;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (void) getAdvancements: (NSSizeArray)advancements
|
||||
forGlyphs: (const NSGlyph*)glyphs
|
||||
count: (NSUInteger)count;
|
||||
- (void) getAdvancements: (NSSizeArray)advancements
|
||||
forPackedGlyphs: (const void*)glyphs
|
||||
count: (NSUInteger)count;
|
||||
- (void) getBoundingRects: (NSRectArray)bounds
|
||||
forGlyphs: (const NSGlyph*)glyphs
|
||||
count: (NSUInteger)count;
|
||||
#endif
|
||||
|
||||
- (NSStringEncoding) mostCompatibleStringEncoding;
|
||||
|
||||
|
|
|
@ -183,6 +183,7 @@ GNUstep extension.
|
|||
|
||||
- (void) invalidateLayoutForCharacterRange: (NSRange)charRange
|
||||
actualCharacterRange: (NSRangePointer)actualCharRange;
|
||||
- (void) invalidateGlyphsOnLayoutInvalidationForGlyphRange: (NSRange)glyphRange;
|
||||
|
||||
- (BOOL) allowsNonContiguousLayout;
|
||||
- (void) setAllowsNonContiguousLayout: (BOOL)flag;
|
||||
|
|
|
@ -74,20 +74,22 @@ whenever this happens.
|
|||
@class GSLayoutManager;
|
||||
@class NSTextView;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
NSLineSweepLeft,
|
||||
NSLineSweepRight,
|
||||
NSLineSweepDown,
|
||||
NSLineSweepUp
|
||||
} NSLineSweepDirection;
|
||||
};
|
||||
typedef NSUInteger NSLineSweepDirection;
|
||||
|
||||
typedef enum {
|
||||
NSLineMoveLeft,
|
||||
NSLineMoveRight,
|
||||
NSLineMoveDown,
|
||||
NSLineMoveUp,
|
||||
NSLineDoesntMove
|
||||
} NSLineMovementDirection;
|
||||
enum {
|
||||
NSLineDoesntMove,
|
||||
NSLineMovesLeft,
|
||||
NSLineMovesRight,
|
||||
NSLineMovesDown,
|
||||
NSLineMovesUp
|
||||
};
|
||||
typedef NSUInteger NSLineMovementDirection;
|
||||
|
||||
@interface NSTextContainer : NSObject
|
||||
{
|
||||
|
|
|
@ -587,7 +587,7 @@ Return values 0, 1, 2 are mostly the same as from
|
|||
|
||||
r = [curTextContainer lineFragmentRectForProposedRect: r
|
||||
sweepDirection: NSLineSweepRight
|
||||
movementDirection: NSLineMoveDown
|
||||
movementDirection: NSLineMovesDown
|
||||
remainingRect: &remain];
|
||||
|
||||
if (!NSIsEmptyRect(r))
|
||||
|
@ -669,7 +669,7 @@ restart: ;
|
|||
{
|
||||
rect = [curTextContainer lineFragmentRectForProposedRect: remain
|
||||
sweepDirection: NSLineSweepRight
|
||||
movementDirection: line_frags_num?NSLineDoesntMove:NSLineMoveDown
|
||||
movementDirection: line_frags_num?NSLineDoesntMove:NSLineMovesDown
|
||||
remainingRect: &remain];
|
||||
if (NSIsEmptyRect(rect))
|
||||
break;
|
||||
|
|
|
@ -1118,6 +1118,12 @@ static BOOL flip_hack;
|
|||
- (CGFloat) xHeight { return [fontInfo xHeight]; }
|
||||
- (CGFloat) defaultLineHeightForFont { return [fontInfo defaultLineHeightForFont]; }
|
||||
|
||||
- (CGFloat) leading
|
||||
{
|
||||
// FIXME
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/* Computing font metrics attributes*/
|
||||
- (CGFloat) widthOfString: (NSString*)string
|
||||
{
|
||||
|
@ -1241,6 +1247,39 @@ static BOOL flip_hack;
|
|||
return i;
|
||||
}
|
||||
|
||||
- (void) getAdvancements: (NSSizeArray)advancements
|
||||
forGlyphs: (const NSGlyph*)glyphs
|
||||
count: (NSUInteger)count
|
||||
{
|
||||
// FIXME
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
advancements[i] = [self advancementForGlyph: glyphs[i]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) getAdvancements: (NSSizeArray)advancements
|
||||
forPackedGlyphs: (const void*)glyphs
|
||||
count: (NSUInteger)count
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
- (void) getBoundingRects: (NSRectArray)bounds
|
||||
forGlyphs: (const NSGlyph*)glyphs
|
||||
count: (NSUInteger)count
|
||||
{
|
||||
// FIXME
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
bounds[i] = [self boundingRectForGlyph: glyphs[i]];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSStringEncoding) mostCompatibleStringEncoding
|
||||
{
|
||||
return [fontInfo mostCompatibleStringEncoding];
|
||||
|
|
|
@ -1310,6 +1310,11 @@ has the same y origin and height as the line frag rect it is in.
|
|||
actualCharacterRange: actualCharRange];
|
||||
}
|
||||
|
||||
- (void) invalidateGlyphsOnLayoutInvalidationForGlyphRange: (NSRange)glyphRange
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
- (BOOL) allowsNonContiguousLayout
|
||||
{
|
||||
return NO;
|
||||
|
|
|
@ -379,7 +379,7 @@ framework intact.
|
|||
|
||||
switch (moveDir)
|
||||
{
|
||||
case NSLineMoveLeft:
|
||||
case NSLineMovesLeft:
|
||||
if (maxx < cminx)
|
||||
return NSZeroRect;
|
||||
if (maxx > cmaxx)
|
||||
|
@ -389,7 +389,7 @@ framework intact.
|
|||
}
|
||||
break;
|
||||
|
||||
case NSLineMoveRight:
|
||||
case NSLineMovesRight:
|
||||
if (minx > cmaxx)
|
||||
return NSZeroRect;
|
||||
if (minx < cminx)
|
||||
|
@ -399,7 +399,7 @@ framework intact.
|
|||
}
|
||||
break;
|
||||
|
||||
case NSLineMoveDown:
|
||||
case NSLineMovesDown:
|
||||
if (miny > cmaxy)
|
||||
return NSZeroRect;
|
||||
if (miny < cminy)
|
||||
|
@ -409,7 +409,7 @@ framework intact.
|
|||
}
|
||||
break;
|
||||
|
||||
case NSLineMoveUp:
|
||||
case NSLineMovesUp:
|
||||
if (maxy < cminy)
|
||||
return NSZeroRect;
|
||||
if (maxy > cmaxy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue