mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +00:00
Use NSLayoutManager instead of GSSimpleLayoutManager.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7801 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
11055fe8ee
commit
bb07932cfb
1 changed files with 6 additions and 6 deletions
|
@ -56,8 +56,7 @@
|
||||||
#include <AppKit/NSDragging.h>
|
#include <AppKit/NSDragging.h>
|
||||||
#include <AppKit/NSTextStorage.h>
|
#include <AppKit/NSTextStorage.h>
|
||||||
#include <AppKit/NSTextContainer.h>
|
#include <AppKit/NSTextContainer.h>
|
||||||
|
#include <AppKit/NSLayoutManager.h>
|
||||||
#include "GSSimpleLayoutManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define HUGE 1e99
|
#define HUGE 1e99
|
||||||
|
@ -94,7 +93,8 @@ static NSNotificationCenter *nc;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// not the same as NSMakeRange!
|
// not the same as NSMakeRange!
|
||||||
static NSRange MakeRangeFromAbs (unsigned a1, unsigned a2)
|
static inline
|
||||||
|
NSRange MakeRangeFromAbs (unsigned a1, unsigned a2)
|
||||||
{
|
{
|
||||||
if (a1 < a2)
|
if (a1 < a2)
|
||||||
return NSMakeRange(a1, a2 - a1);
|
return NSMakeRange(a1, a2 - a1);
|
||||||
|
@ -113,7 +113,8 @@ static NSRange MakeRangeFromAbs (unsigned a1, unsigned a2)
|
||||||
{
|
{
|
||||||
NSArray *types;
|
NSArray *types;
|
||||||
|
|
||||||
[self setVersion: 1]; // Initial version
|
// Initial version
|
||||||
|
[self setVersion: 1];
|
||||||
|
|
||||||
nc = [NSNotificationCenter defaultCenter];
|
nc = [NSNotificationCenter defaultCenter];
|
||||||
|
|
||||||
|
@ -2309,8 +2310,7 @@ other than copy/paste or dragging. */
|
||||||
- (NSTextContainer*) buildUpTextNetwork: (NSSize)aSize;
|
- (NSTextContainer*) buildUpTextNetwork: (NSSize)aSize;
|
||||||
{
|
{
|
||||||
NSTextContainer *aTextContainer = [[NSTextContainer alloc] initWithContainerSize: aSize];
|
NSTextContainer *aTextContainer = [[NSTextContainer alloc] initWithContainerSize: aSize];
|
||||||
//NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
|
NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
|
||||||
NSLayoutManager *layoutManager = [[GSSimpleLayoutManager alloc] init];
|
|
||||||
NSTextStorage *textStorage = [[NSTextStorage alloc] init];
|
NSTextStorage *textStorage = [[NSTextStorage alloc] init];
|
||||||
|
|
||||||
[aTextContainer setWidthTracksTextView: YES];
|
[aTextContainer setWidthTracksTextView: YES];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue