mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 08:20:49 +00:00
More CGFloat, NSUInteger and NSInteger changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36154 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a7a48ea407
commit
6a52d99499
16 changed files with 211 additions and 207 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
||||||
|
2013-02-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Headers/AppKit/NSBrowser.h
|
||||||
|
* Headers/AppKit/NSClipView.h
|
||||||
|
* Headers/AppKit/NSComboBox.h
|
||||||
|
* Headers/AppKit/NSComboBoxCell.h
|
||||||
|
* Headers/AppKit/NSForm.h
|
||||||
|
* Headers/AppKit/NSFormCell.h
|
||||||
|
* Headers/AppKit/NSParagraphStyle.h
|
||||||
|
* Source/NSAttributedString.m
|
||||||
|
* Source/NSBrowser.m
|
||||||
|
* Source/NSClipView.m
|
||||||
|
* Source/NSComboBox.m
|
||||||
|
* Source/NSComboBoxCell.m
|
||||||
|
* Source/NSForm.m
|
||||||
|
* Source/NSFormCell.m
|
||||||
|
* Source/NSParagraphStyle.m
|
||||||
|
More CGFloat, NSUInteger and NSInteger changes.
|
||||||
|
|
||||||
2013-02-16 Fred Kiefer <FredKiefer@gmx.de>
|
2013-02-16 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/NSDragging.h
|
* Headers/AppKit/NSDragging.h
|
||||||
|
|
|
@ -42,12 +42,13 @@
|
||||||
//@class NSBox;
|
//@class NSBox;
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
typedef enum _NSBrowserColumnResizingType
|
enum _NSBrowserColumnResizingType
|
||||||
{
|
{
|
||||||
NSBrowserNoColumnResizing,
|
NSBrowserNoColumnResizing,
|
||||||
NSBrowserAutoColumnResizing,
|
NSBrowserAutoColumnResizing,
|
||||||
NSBrowserUserColumnResizing
|
NSBrowserUserColumnResizing
|
||||||
} NSBrowserColumnResizingType;
|
};
|
||||||
|
typedef NSUInteger NSBrowserColumnResizingType;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@interface NSBrowser : NSControl <NSCoding>
|
@interface NSBrowser : NSControl <NSCoding>
|
||||||
|
@ -88,12 +89,12 @@ typedef enum _NSBrowserColumnResizingType
|
||||||
NSRect _scrollerRect;
|
NSRect _scrollerRect;
|
||||||
int _alphaNumericalLastColumn;
|
int _alphaNumericalLastColumn;
|
||||||
int _maxVisibleColumns;
|
int _maxVisibleColumns;
|
||||||
float _minColumnWidth;
|
CGFloat _minColumnWidth;
|
||||||
int _lastColumnLoaded;
|
int _lastColumnLoaded;
|
||||||
int _firstVisibleColumn;
|
int _firstVisibleColumn;
|
||||||
int _lastVisibleColumn;
|
int _lastVisibleColumn;
|
||||||
NSString *_columnsAutosaveName;
|
NSString *_columnsAutosaveName;
|
||||||
NSBrowserColumnResizingType _columnResizing;
|
NSBrowserColumnResizingType _columnResizing;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -155,14 +156,14 @@ typedef enum _NSBrowserColumnResizingType
|
||||||
// Setting the NSBrowser's Appearance
|
// Setting the NSBrowser's Appearance
|
||||||
//
|
//
|
||||||
- (NSInteger) maxVisibleColumns;
|
- (NSInteger) maxVisibleColumns;
|
||||||
- (NSInteger) minColumnWidth;
|
- (CGFloat) minColumnWidth;
|
||||||
- (BOOL) separatesColumns;
|
- (BOOL) separatesColumns;
|
||||||
- (void) setMaxVisibleColumns: (NSInteger)columnCount;
|
- (void) setMaxVisibleColumns: (NSInteger)columnCount;
|
||||||
- (void) setMinColumnWidth: (NSInteger)columnWidth;
|
- (void) setMinColumnWidth: (CGFloat)columnWidth;
|
||||||
- (void) setSeparatesColumns: (BOOL)flag;
|
- (void) setSeparatesColumns: (BOOL)flag;
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
- (float) columnWidthForColumnContentWidth: (float)columnContentWidth;
|
- (CGFloat) columnWidthForColumnContentWidth: (CGFloat)columnContentWidth;
|
||||||
- (float) columnContentWidthForColumnWidth: (float)columnWidth;
|
- (CGFloat) columnContentWidthForColumnWidth: (CGFloat)columnWidth;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -260,8 +261,8 @@ typedef enum _NSBrowserColumnResizingType
|
||||||
- (void) setColumnResizingType:(NSBrowserColumnResizingType) type;
|
- (void) setColumnResizingType:(NSBrowserColumnResizingType) type;
|
||||||
- (BOOL) prefersAllColumnUserResizing;
|
- (BOOL) prefersAllColumnUserResizing;
|
||||||
- (void) setPrefersAllColumnUserResizing: (BOOL)flag;
|
- (void) setPrefersAllColumnUserResizing: (BOOL)flag;
|
||||||
- (float) widthOfColumn: (NSInteger)column;
|
- (CGFloat) widthOfColumn: (NSInteger)column;
|
||||||
- (void) setWidth: (float)columnWidth ofColumn: (NSInteger)columnIndex;
|
- (void) setWidth: (CGFloat)columnWidth ofColumn: (NSInteger)columnIndex;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Autosave names
|
// Autosave names
|
||||||
|
@ -304,11 +305,11 @@ typedef enum _NSBrowserColumnResizingType
|
||||||
- (void) browserWillScroll: (NSBrowser *)sender;
|
- (void) browserWillScroll: (NSBrowser *)sender;
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
- (float) browser: (NSBrowser *)browser
|
- (CGFloat) browser: (NSBrowser *)browser
|
||||||
shouldSizeColumn: (NSInteger)column
|
shouldSizeColumn: (NSInteger)column
|
||||||
forUserResize: (BOOL)flag
|
forUserResize: (BOOL)flag
|
||||||
toWidth: (float)width;
|
toWidth: (CGFloat)width;
|
||||||
- (float) browser: (NSBrowser *)browser
|
- (CGFloat) browser: (NSBrowser *)browser
|
||||||
sizeToFitWidthOfColumn: (NSInteger)column;
|
sizeToFitWidthOfColumn: (NSInteger)column;
|
||||||
- (void) browserColumnConfigurationDidChange: (NSNotification *)notification;
|
- (void) browserColumnConfigurationDidChange: (NSNotification *)notification;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -79,21 +79,6 @@
|
||||||
- (BOOL)drawsBackground;
|
- (BOOL)drawsBackground;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Overridden NSView methods */
|
|
||||||
- (BOOL)acceptsFirstResponder;
|
|
||||||
- (BOOL)isFlipped;
|
|
||||||
- (void)rotateByAngle:(float)angle;
|
|
||||||
- (void)scaleUnitSquareToSize:(NSSize)newUnitSize;
|
|
||||||
- (void)setBoundsOrigin:(NSPoint)aPoint;
|
|
||||||
- (void)setBoundsRotation:(float)angle;
|
|
||||||
- (void)setBoundsSize:(NSSize)aSize;
|
|
||||||
- (void)setFrameSize:(NSSize)aSize;
|
|
||||||
- (void)setFrameOrigin:(NSPoint)aPoint;
|
|
||||||
- (void)setFrameRotation:(float)angle;
|
|
||||||
- (void)translateOriginToPoint:(NSPoint)aPoint;
|
|
||||||
- (void)viewBoundsChanged:(NSNotification*)aNotification;
|
|
||||||
- (void)viewFrameChanged:(NSNotification*)aNotification;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* _GNUstep_H_NSClipView */
|
#endif /* _GNUstep_H_NSClipView */
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
- (NSSize) intercellSpacing;
|
- (NSSize) intercellSpacing;
|
||||||
- (void) setIntercellSpacing: (NSSize)aSize;
|
- (void) setIntercellSpacing: (NSSize)aSize;
|
||||||
|
|
||||||
- (float) itemHeight;
|
- (CGFloat) itemHeight;
|
||||||
- (void) setItemHeight: (float)itemHeight;
|
- (void) setItemHeight: (CGFloat)itemHeight;
|
||||||
|
|
||||||
- (NSInteger) numberOfVisibleItems;
|
- (NSInteger) numberOfVisibleItems;
|
||||||
- (void) setNumberOfVisibleItems: (NSInteger)visibleItems;
|
- (void) setNumberOfVisibleItems: (NSInteger)visibleItems;
|
||||||
|
|
|
@ -62,8 +62,8 @@
|
||||||
- (NSSize)intercellSpacing;
|
- (NSSize)intercellSpacing;
|
||||||
- (void)setIntercellSpacing:(NSSize)aSize;
|
- (void)setIntercellSpacing:(NSSize)aSize;
|
||||||
|
|
||||||
- (float)itemHeight;
|
- (CGFloat)itemHeight;
|
||||||
- (void)setItemHeight:(float)itemHeight;
|
- (void)setItemHeight:(CGFloat)itemHeight;
|
||||||
|
|
||||||
- (NSInteger)numberOfVisibleItems;
|
- (NSInteger)numberOfVisibleItems;
|
||||||
- (void)setNumberOfVisibleItems:(NSInteger)visibleItems;
|
- (void)setNumberOfVisibleItems:(NSInteger)visibleItems;
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
- (NSFormCell*)insertEntry:(NSString*)title
|
- (NSFormCell*)insertEntry:(NSString*)title
|
||||||
atIndex:(NSInteger)index;
|
atIndex:(NSInteger)index;
|
||||||
- (void)removeEntryAtIndex:(NSInteger)index;
|
- (void)removeEntryAtIndex:(NSInteger)index;
|
||||||
- (void)setInterlineSpacing:(float)spacing;
|
- (void)setInterlineSpacing:(CGFloat)spacing;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Finding Indices
|
// Finding Indices
|
||||||
|
|
|
@ -54,12 +54,12 @@
|
||||||
- (void)setTitle:(NSString*)aString;
|
- (void)setTitle:(NSString*)aString;
|
||||||
- (void)setTitleAlignment:(NSTextAlignment)mode;
|
- (void)setTitleAlignment:(NSTextAlignment)mode;
|
||||||
- (void)setTitleFont:(NSFont*)fontObject;
|
- (void)setTitleFont:(NSFont*)fontObject;
|
||||||
- (void)setTitleWidth:(float)width;
|
- (void)setTitleWidth:(CGFloat)width;
|
||||||
- (NSString*)title;
|
- (NSString*)title;
|
||||||
- (NSTextAlignment)titleAlignment;
|
- (NSTextAlignment)titleAlignment;
|
||||||
- (NSFont*)titleFont;
|
- (NSFont*)titleFont;
|
||||||
- (float)titleWidth;
|
- (CGFloat)titleWidth;
|
||||||
- (float)titleWidth:(NSSize)aSize;
|
- (CGFloat)titleWidth:(NSSize)aSize;
|
||||||
|
|
||||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||||
//
|
//
|
||||||
|
|
|
@ -43,20 +43,22 @@ typedef enum _NSTextTabType {
|
||||||
NSDecimalTabStopType
|
NSDecimalTabStopType
|
||||||
} NSTextTabType;
|
} NSTextTabType;
|
||||||
|
|
||||||
typedef enum _NSLineBreakMode { /* What to do with long lines */
|
enum _NSLineBreakMode { /* What to do with long lines */
|
||||||
NSLineBreakByWordWrapping = 0, /* Wrap at word boundaries, default */
|
NSLineBreakByWordWrapping = 0, /* Wrap at word boundaries, default */
|
||||||
NSLineBreakByCharWrapping, /* Wrap at character boundaries */
|
NSLineBreakByCharWrapping, /* Wrap at character boundaries */
|
||||||
NSLineBreakByClipping, /* Simply clip */
|
NSLineBreakByClipping, /* Simply clip */
|
||||||
NSLineBreakByTruncatingHead, /* Truncate at head of line: "...wxyz" */
|
NSLineBreakByTruncatingHead, /* Truncate at head of line: "...wxyz" */
|
||||||
NSLineBreakByTruncatingTail, /* Truncate at tail of line: "abcd..." */
|
NSLineBreakByTruncatingTail, /* Truncate at tail of line: "abcd..." */
|
||||||
NSLineBreakByTruncatingMiddle /* Truncate middle of line: "ab...yz" */
|
NSLineBreakByTruncatingMiddle /* Truncate middle of line: "ab...yz" */
|
||||||
} NSLineBreakMode;
|
};
|
||||||
|
typedef NSUInteger NSLineBreakMode;
|
||||||
|
|
||||||
typedef enum _NSWritingDirection {
|
enum _NSWritingDirection {
|
||||||
NSWritingDirectionNaturalDirection,
|
NSWritingDirectionNaturalDirection,
|
||||||
NSWritingDirectionLeftToRight,
|
NSWritingDirectionLeftToRight,
|
||||||
NSWritingDirectionRightToLeft
|
NSWritingDirectionRightToLeft
|
||||||
} NSWritingDirection;
|
};
|
||||||
|
typedef NSInteger NSWritingDirection;
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
||||||
|
@ -70,13 +72,13 @@ APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
||||||
float _location;
|
float _location;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithType: (NSTextTabType)type location: (float)loc;
|
- (id) initWithType: (NSTextTabType)type location: (CGFloat)loc;
|
||||||
- (float) location;
|
- (CGFloat) location;
|
||||||
- (NSTextTabType) tabStopType;
|
- (NSTextTabType) tabStopType;
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
- (id) initWithTextAlignment: (NSTextAlignment)align
|
- (id) initWithTextAlignment: (NSTextAlignment)align
|
||||||
location: (float)loc
|
location: (CGFloat)loc
|
||||||
options: (NSDictionary *)options;
|
options: (NSDictionary *)options;
|
||||||
- (NSTextAlignment) alignment;
|
- (NSTextAlignment) alignment;
|
||||||
- (NSDictionary *) options;
|
- (NSDictionary *) options;
|
||||||
|
@ -115,12 +117,12 @@ APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
||||||
* Can't be negative. This value is included in the line fragment
|
* Can't be negative. This value is included in the line fragment
|
||||||
* heights in layout manager.
|
* heights in layout manager.
|
||||||
*/
|
*/
|
||||||
- (float) lineSpacing;
|
- (CGFloat) lineSpacing;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Distance between the bottom of this paragraph and top of next.
|
* Distance between the bottom of this paragraph and top of next.
|
||||||
*/
|
*/
|
||||||
- (float) paragraphSpacing;
|
- (CGFloat) paragraphSpacing;
|
||||||
|
|
||||||
- (NSTextAlignment) alignment;
|
- (NSTextAlignment) alignment;
|
||||||
|
|
||||||
|
@ -132,18 +134,18 @@ APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
||||||
/*
|
/*
|
||||||
* Distance from margin to front edge of paragraph
|
* Distance from margin to front edge of paragraph
|
||||||
*/
|
*/
|
||||||
- (float) headIndent;
|
- (CGFloat) headIndent;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Distance from margin to back edge of paragraph; if negative or 0,
|
* Distance from margin to back edge of paragraph; if negative or 0,
|
||||||
* from other margin
|
* from other margin
|
||||||
*/
|
*/
|
||||||
- (float) tailIndent;
|
- (CGFloat) tailIndent;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Distance from margin to edge appropriate for text direction
|
* Distance from margin to edge appropriate for text direction
|
||||||
*/
|
*/
|
||||||
- (float) firstLineHeadIndent;
|
- (CGFloat) firstLineHeadIndent;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Distance from margin to tab stops
|
* Distance from margin to tab stops
|
||||||
|
@ -155,12 +157,12 @@ APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
||||||
* of ascenders; basically the line fragment height. Does not include
|
* of ascenders; basically the line fragment height. Does not include
|
||||||
* lineSpacing (which is added after this computation).
|
* lineSpacing (which is added after this computation).
|
||||||
*/
|
*/
|
||||||
- (float) minimumLineHeight;
|
- (CGFloat) minimumLineHeight;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 0 implies no maximum.
|
* 0 implies no maximum.
|
||||||
*/
|
*/
|
||||||
- (float) maximumLineHeight;
|
- (CGFloat) maximumLineHeight;
|
||||||
- (NSLineBreakMode) lineBreakMode;
|
- (NSLineBreakMode) lineBreakMode;
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
|
||||||
|
@ -173,12 +175,12 @@ APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
||||||
- (NSWritingDirection) baseWritingDirection;
|
- (NSWritingDirection) baseWritingDirection;
|
||||||
#endif
|
#endif
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
- (float) defaultTabInterval;
|
- (CGFloat) defaultTabInterval;
|
||||||
- (float) lineHeightMultiple;
|
- (CGFloat) lineHeightMultiple;
|
||||||
- (float) paragraphSpacingBefore;
|
- (CGFloat) paragraphSpacingBefore;
|
||||||
#endif
|
#endif
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||||
- (int) headerLevel;
|
- (NSInteger) headerLevel;
|
||||||
- (float) hyphenationFactor;
|
- (float) hyphenationFactor;
|
||||||
- (NSArray *) textBlocks;
|
- (NSArray *) textBlocks;
|
||||||
- (NSArray *) textLists;
|
- (NSArray *) textLists;
|
||||||
|
@ -191,15 +193,15 @@ APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setLineSpacing: (float)aFloat;
|
- (void) setLineSpacing: (CGFloat)aFloat;
|
||||||
- (void) setParagraphSpacing: (float)aFloat;
|
- (void) setParagraphSpacing: (CGFloat)aFloat;
|
||||||
- (void) setAlignment: (NSTextAlignment)newAlignment;
|
- (void) setAlignment: (NSTextAlignment)newAlignment;
|
||||||
- (void) setFirstLineHeadIndent: (float)aFloat;
|
- (void) setFirstLineHeadIndent: (CGFloat)aFloat;
|
||||||
- (void) setHeadIndent: (float)aFloat;
|
- (void) setHeadIndent: (CGFloat)aFloat;
|
||||||
- (void) setTailIndent: (float)aFloat;
|
- (void) setTailIndent: (CGFloat)aFloat;
|
||||||
- (void) setLineBreakMode: (NSLineBreakMode)mode;
|
- (void) setLineBreakMode: (NSLineBreakMode)mode;
|
||||||
- (void) setMinimumLineHeight: (float)aFloat;
|
- (void) setMinimumLineHeight: (CGFloat)aFloat;
|
||||||
- (void) setMaximumLineHeight: (float)aFloat;
|
- (void) setMaximumLineHeight: (CGFloat)aFloat;
|
||||||
- (void) addTabStop: (NSTextTab*)anObject;
|
- (void) addTabStop: (NSTextTab*)anObject;
|
||||||
- (void) removeTabStop: (NSTextTab*)anObject;
|
- (void) removeTabStop: (NSTextTab*)anObject;
|
||||||
- (void) setTabStops: (NSArray*)array;
|
- (void) setTabStops: (NSArray*)array;
|
||||||
|
@ -209,12 +211,12 @@ APPKIT_EXPORT NSString *NSTabColumnTerminatorsAttributeName;
|
||||||
- (void) setBaseWritingDirection: (NSWritingDirection)direction;
|
- (void) setBaseWritingDirection: (NSWritingDirection)direction;
|
||||||
#endif
|
#endif
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
|
||||||
- (void) setDefaultTabInterval: (float)interval;
|
- (void) setDefaultTabInterval: (CGFloat)interval;
|
||||||
- (void) setLineHeightMultiple: (float)factor;
|
- (void) setLineHeightMultiple: (CGFloat)factor;
|
||||||
- (void) setParagraphSpacingBefore: (float)spacing;
|
- (void) setParagraphSpacingBefore: (CGFloat)spacing;
|
||||||
#endif
|
#endif
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||||
- (void) setHeaderLevel: (int)level;
|
- (void) setHeaderLevel: (NSInteger)level;
|
||||||
- (void) setHyphenationFactor: (float)factor;
|
- (void) setHyphenationFactor: (float)factor;
|
||||||
- (void) setTextBlocks: (NSArray *)blocks;
|
- (void) setTextBlocks: (NSArray *)blocks;
|
||||||
- (void) setTextLists: (NSArray *)lists;
|
- (void) setTextLists: (NSArray *)lists;
|
||||||
|
|
|
@ -409,7 +409,7 @@ create_error(int code, NSString* desc)
|
||||||
withinRange: (NSRange)aRange
|
withinRange: (NSRange)aRange
|
||||||
{
|
{
|
||||||
NSString *str = [self string];
|
NSString *str = [self string];
|
||||||
unsigned length = [str length];
|
NSUInteger length = [str length];
|
||||||
NSRange scanRange;
|
NSRange scanRange;
|
||||||
NSRange startRange;
|
NSRange startRange;
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ create_error(int code, NSString* desc)
|
||||||
- (NSRange) doubleClickAtIndex: (NSUInteger)location
|
- (NSRange) doubleClickAtIndex: (NSUInteger)location
|
||||||
{
|
{
|
||||||
NSString *str = [self string];
|
NSString *str = [self string];
|
||||||
unsigned length = [str length];
|
NSUInteger length = [str length];
|
||||||
NSRange scanRange;
|
NSRange scanRange;
|
||||||
NSRange startRange;
|
NSRange startRange;
|
||||||
NSRange endRange;
|
NSRange endRange;
|
||||||
|
@ -557,10 +557,10 @@ create_error(int code, NSString* desc)
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSUInteger) nextWordFromIndex: (NSUInteger)location
|
- (NSUInteger) nextWordFromIndex: (NSUInteger)location
|
||||||
forward: (BOOL)isForward
|
forward: (BOOL)isForward
|
||||||
{
|
{
|
||||||
NSString *str = [self string];
|
NSString *str = [self string];
|
||||||
unsigned length = [str length];
|
NSUInteger length = [str length];
|
||||||
NSRange range;
|
NSRange range;
|
||||||
|
|
||||||
if (location > length)
|
if (location > length)
|
||||||
|
@ -1118,7 +1118,7 @@ documentAttributes: (NSDictionary **)dict
|
||||||
if ((textBlocks != nil) && [textBlocks containsObject: block])
|
if ((textBlocks != nil) && [textBlocks containsObject: block])
|
||||||
{
|
{
|
||||||
NSRange newEffRange;
|
NSRange newEffRange;
|
||||||
unsigned len = [self length];
|
NSUInteger len = [self length];
|
||||||
|
|
||||||
while ((effRange.location > 0) && style && textBlocks)
|
while ((effRange.location > 0) && style && textBlocks)
|
||||||
{
|
{
|
||||||
|
@ -1174,7 +1174,7 @@ documentAttributes: (NSDictionary **)dict
|
||||||
if ((textLists != nil) && [textLists containsObject: list])
|
if ((textLists != nil) && [textLists containsObject: list])
|
||||||
{
|
{
|
||||||
NSRange newEffRange;
|
NSRange newEffRange;
|
||||||
unsigned len = [self length];
|
NSUInteger len = [self length];
|
||||||
|
|
||||||
while ((effRange.location > 0) && style && textLists)
|
while ((effRange.location > 0) && style && textLists)
|
||||||
{
|
{
|
||||||
|
@ -1246,7 +1246,7 @@ BOOL containsTable(NSArray *textBlocks, NSTextTable *table)
|
||||||
if ((textBlocks != nil) && containsTable(textBlocks, table))
|
if ((textBlocks != nil) && containsTable(textBlocks, table))
|
||||||
{
|
{
|
||||||
NSRange newEffRange;
|
NSRange newEffRange;
|
||||||
unsigned len = [self length];
|
NSUInteger len = [self length];
|
||||||
|
|
||||||
while ((effRange.location > 0) && style && textBlocks)
|
while ((effRange.location > 0) && style && textBlocks)
|
||||||
{
|
{
|
||||||
|
@ -1370,7 +1370,7 @@ BOOL containsTable(NSArray *textBlocks, NSTextTable *table)
|
||||||
range: (NSRange)range
|
range: (NSRange)range
|
||||||
{
|
{
|
||||||
NSFont *font;
|
NSFont *font;
|
||||||
unsigned loc = range.location;
|
NSUInteger loc = range.location;
|
||||||
NSRange effRange;
|
NSRange effRange;
|
||||||
NSFontManager *fm = [NSFontManager sharedFontManager];
|
NSFontManager *fm = [NSFontManager sharedFontManager];
|
||||||
|
|
||||||
|
@ -1406,7 +1406,7 @@ BOOL containsTable(NSArray *textBlocks, NSTextTable *table)
|
||||||
range: (NSRange)range
|
range: (NSRange)range
|
||||||
{
|
{
|
||||||
id value;
|
id value;
|
||||||
unsigned loc = range.location;
|
NSUInteger loc = range.location;
|
||||||
|
|
||||||
if (NSMaxRange(range) > [self length])
|
if (NSMaxRange(range) > [self length])
|
||||||
{
|
{
|
||||||
|
@ -1470,8 +1470,8 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
font: (NSFont*)baseFont
|
font: (NSFont*)baseFont
|
||||||
fromList: (NSArray *)fonts
|
fromList: (NSArray *)fonts
|
||||||
{
|
{
|
||||||
unsigned int count;
|
NSUInteger count;
|
||||||
unsigned int i;
|
NSUInteger i;
|
||||||
|
|
||||||
if (cachedCSets == nil)
|
if (cachedCSets == nil)
|
||||||
{
|
{
|
||||||
|
@ -1554,9 +1554,9 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
NSFont *font = nil;
|
NSFont *font = nil;
|
||||||
NSCharacterSet *charset = nil;
|
NSCharacterSet *charset = nil;
|
||||||
NSRange fontRange = NSMakeRange(NSNotFound, 0);
|
NSRange fontRange = NSMakeRange(NSNotFound, 0);
|
||||||
unsigned int i;
|
NSUInteger i;
|
||||||
unsigned int lastMax;
|
NSUInteger lastMax;
|
||||||
unsigned int start;
|
NSUInteger start;
|
||||||
unichar chars[64];
|
unichar chars[64];
|
||||||
CREATE_AUTORELEASE_POOL(pool);
|
CREATE_AUTORELEASE_POOL(pool);
|
||||||
|
|
||||||
|
@ -1582,7 +1582,7 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
|
|
||||||
if (i >= lastMax)
|
if (i >= lastMax)
|
||||||
{
|
{
|
||||||
unsigned int dist;
|
NSUInteger dist;
|
||||||
|
|
||||||
start = lastMax;
|
start = lastMax;
|
||||||
dist = MIN(64, NSMaxRange(range) - start);
|
dist = MIN(64, NSMaxRange(range) - start);
|
||||||
|
@ -1622,7 +1622,7 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
- (void) fixParagraphStyleAttributeInRange: (NSRange)range
|
- (void) fixParagraphStyleAttributeInRange: (NSRange)range
|
||||||
{
|
{
|
||||||
NSString *str = [self string];
|
NSString *str = [self string];
|
||||||
unsigned loc = range.location;
|
NSUInteger loc = range.location;
|
||||||
NSRange r;
|
NSRange r;
|
||||||
|
|
||||||
if (NSMaxRange (range) > [self length])
|
if (NSMaxRange (range) > [self length])
|
||||||
|
@ -1635,7 +1635,7 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
{
|
{
|
||||||
NSParagraphStyle *style;
|
NSParagraphStyle *style;
|
||||||
NSRange found;
|
NSRange found;
|
||||||
unsigned end;
|
NSUInteger end;
|
||||||
|
|
||||||
/* Extend loc to take in entire paragraph if necessary. */
|
/* Extend loc to take in entire paragraph if necessary. */
|
||||||
r = [str lineRangeForRange: NSMakeRange (loc, 1)];
|
r = [str lineRangeForRange: NSMakeRange (loc, 1)];
|
||||||
|
@ -1697,8 +1697,8 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
- (void) fixAttachmentAttributeInRange: (NSRange)range
|
- (void) fixAttachmentAttributeInRange: (NSRange)range
|
||||||
{
|
{
|
||||||
NSString *string = [self string];
|
NSString *string = [self string];
|
||||||
unsigned location = range.location;
|
NSUInteger location = range.location;
|
||||||
unsigned end = NSMaxRange (range);
|
NSUInteger end = NSMaxRange (range);
|
||||||
|
|
||||||
cache_init ();
|
cache_init ();
|
||||||
|
|
||||||
|
@ -1718,8 +1718,8 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
if ([attr objectForKey: NSAttachmentAttributeName] != nil)
|
if ([attr objectForKey: NSAttachmentAttributeName] != nil)
|
||||||
{
|
{
|
||||||
unichar buf[eRange.length];
|
unichar buf[eRange.length];
|
||||||
unsigned pos = 0;
|
NSUInteger pos = 0;
|
||||||
unsigned start = eRange.location;
|
NSUInteger start = eRange.location;
|
||||||
|
|
||||||
// Leave only one character with the attachment
|
// Leave only one character with the attachment
|
||||||
[string getCharacters: buf range: eRange];
|
[string getCharacters: buf range: eRange];
|
||||||
|
@ -1769,8 +1769,8 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
- (void) updateAttachmentsFromPath: (NSString *)path
|
- (void) updateAttachmentsFromPath: (NSString *)path
|
||||||
{
|
{
|
||||||
NSString *string = [self string];
|
NSString *string = [self string];
|
||||||
unsigned location = 0;
|
NSUInteger location = 0;
|
||||||
unsigned end = [string length];
|
NSUInteger end = [string length];
|
||||||
|
|
||||||
cache_init ();
|
cache_init ();
|
||||||
|
|
||||||
|
@ -1865,7 +1865,7 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
range: (NSRange)range
|
range: (NSRange)range
|
||||||
{
|
{
|
||||||
id value;
|
id value;
|
||||||
unsigned loc = range.location;
|
NSUInteger loc = range.location;
|
||||||
|
|
||||||
if (NSMaxRange(range) > [self length])
|
if (NSMaxRange(range) > [self length])
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#import "GSGuiPrivate.h"
|
#import "GSGuiPrivate.h"
|
||||||
|
|
||||||
/* Cache */
|
/* Cache */
|
||||||
static float scrollerWidth; // == [NSScroller scrollerWidth]
|
static CGFloat scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
static NSTextFieldCell *titleCell;
|
static NSTextFieldCell *titleCell;
|
||||||
|
|
||||||
#define NSBR_COLUMN_SEP 4
|
#define NSBR_COLUMN_SEP 4
|
||||||
|
@ -78,7 +78,7 @@ static NSTextFieldCell *titleCell;
|
||||||
NSScrollView *_columnScrollView;
|
NSScrollView *_columnScrollView;
|
||||||
NSMatrix *_columnMatrix;
|
NSMatrix *_columnMatrix;
|
||||||
NSString *_columnTitle;
|
NSString *_columnTitle;
|
||||||
float _width;
|
CGFloat _width;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setIsLoaded: (BOOL)flag;
|
- (void) setIsLoaded: (BOOL)flag;
|
||||||
|
@ -230,8 +230,8 @@ static NSTextFieldCell *titleCell;
|
||||||
// Private NSBrowser methods
|
// Private NSBrowser methods
|
||||||
//
|
//
|
||||||
@interface NSBrowser (Private)
|
@interface NSBrowser (Private)
|
||||||
- (NSString *) _getTitleOfColumn: (int)column;
|
- (NSString *) _getTitleOfColumn: (NSInteger)column;
|
||||||
- (void) _performLoadOfColumn: (int)column;
|
- (void) _performLoadOfColumn: (NSInteger)column;
|
||||||
- (void) _remapColumnSubviews: (BOOL)flag;
|
- (void) _remapColumnSubviews: (BOOL)flag;
|
||||||
- (void) _setColumnTitlesNeedDisplay;
|
- (void) _setColumnTitlesNeedDisplay;
|
||||||
@end
|
@end
|
||||||
|
@ -305,7 +305,7 @@ static NSTextFieldCell *titleCell;
|
||||||
*/
|
*/
|
||||||
- (id) selectedCell
|
- (id) selectedCell
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
|
|
||||||
// Nothing selected
|
// Nothing selected
|
||||||
|
@ -344,7 +344,7 @@ static NSTextFieldCell *titleCell;
|
||||||
*/
|
*/
|
||||||
- (NSArray *) selectedCells
|
- (NSArray *) selectedCells
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
|
|
||||||
// Nothing selected
|
// Nothing selected
|
||||||
|
@ -448,7 +448,7 @@ static NSTextFieldCell *titleCell;
|
||||||
method in which the following code is integrated (for speed)
|
method in which the following code is integrated (for speed)
|
||||||
*/
|
*/
|
||||||
- (id) loadedCellAtRow: (NSInteger)row
|
- (id) loadedCellAtRow: (NSInteger)row
|
||||||
column: (NSInteger)column
|
column: (NSInteger)column
|
||||||
{
|
{
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
NSCell *cell;
|
NSCell *cell;
|
||||||
|
@ -553,10 +553,10 @@ static NSTextFieldCell *titleCell;
|
||||||
- (BOOL) setPath: (NSString *)path
|
- (BOOL) setPath: (NSString *)path
|
||||||
{
|
{
|
||||||
NSMutableArray *subStrings;
|
NSMutableArray *subStrings;
|
||||||
unsigned numberOfSubStrings;
|
NSUInteger numberOfSubStrings;
|
||||||
unsigned indexOfSubStrings;
|
NSUInteger indexOfSubStrings;
|
||||||
NSInteger column;
|
NSInteger column;
|
||||||
BOOL useDelegate = NO;
|
BOOL useDelegate = NO;
|
||||||
|
|
||||||
if ([_browserDelegate respondsToSelector:
|
if ([_browserDelegate respondsToSelector:
|
||||||
@selector(browser:selectCellWithString:inColumn:)])
|
@selector(browser:selectCellWithString:inColumn:)])
|
||||||
|
@ -581,7 +581,7 @@ static NSTextFieldCell *titleCell;
|
||||||
|
|
||||||
if ([path hasPrefix: _pathSeparator])
|
if ([path hasPrefix: _pathSeparator])
|
||||||
{
|
{
|
||||||
int i;
|
NSUInteger i;
|
||||||
/*
|
/*
|
||||||
* If the path begins with a separator, start at column 0.
|
* If the path begins with a separator, start at column 0.
|
||||||
* Otherwise start at the currently selected column.
|
* Otherwise start at the currently selected column.
|
||||||
|
@ -593,9 +593,9 @@ static NSTextFieldCell *titleCell;
|
||||||
* specified path is already partially selected. If this is the
|
* specified path is already partially selected. If this is the
|
||||||
* case, we can avoid redrawing those columns.
|
* case, we can avoid redrawing those columns.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i <= _lastColumnLoaded && (unsigned)i < numberOfSubStrings; i++)
|
for (i = 0; i <= _lastColumnLoaded && i < numberOfSubStrings; i++)
|
||||||
{
|
{
|
||||||
NSString *c = [[self selectedCellInColumn: i] stringValue];
|
NSString *c = [[self selectedCellInColumn: i] stringValue];
|
||||||
|
|
||||||
if ([c isEqualToString: [subStrings objectAtIndex: i]])
|
if ([c isEqualToString: [subStrings objectAtIndex: i]])
|
||||||
{
|
{
|
||||||
|
@ -798,9 +798,9 @@ static NSTextFieldCell *titleCell;
|
||||||
*/
|
*/
|
||||||
- (void) addColumn
|
- (void) addColumn
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
|
|
||||||
if ((unsigned)(_lastColumnLoaded + 1) >= [_browserColumns count])
|
if ((NSUInteger)(_lastColumnLoaded + 1) >= [_browserColumns count])
|
||||||
{
|
{
|
||||||
i = [_browserColumns indexOfObject: [self _createColumn]];
|
i = [_browserColumns indexOfObject: [self _createColumn]];
|
||||||
}
|
}
|
||||||
|
@ -896,7 +896,7 @@ static NSTextFieldCell *titleCell;
|
||||||
*/
|
*/
|
||||||
- (NSInteger) columnOfMatrix: (NSMatrix *)matrix
|
- (NSInteger) columnOfMatrix: (NSMatrix *)matrix
|
||||||
{
|
{
|
||||||
int i, count;
|
NSInteger i, count;
|
||||||
|
|
||||||
// Loop through columns and compare matrixes
|
// Loop through columns and compare matrixes
|
||||||
count = [_browserColumns count];
|
count = [_browserColumns count];
|
||||||
|
@ -913,7 +913,7 @@ static NSTextFieldCell *titleCell;
|
||||||
/** Returns the index of the last column with a selected item. */
|
/** Returns the index of the last column with a selected item. */
|
||||||
- (NSInteger) selectedColumn
|
- (NSInteger) selectedColumn
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
|
|
||||||
for (i = _lastColumnLoaded; i >= 0; i--)
|
for (i = _lastColumnLoaded; i >= 0; i--)
|
||||||
|
@ -921,7 +921,7 @@ static NSTextFieldCell *titleCell;
|
||||||
if (!(matrix = [self matrixInColumn: i]))
|
if (!(matrix = [self matrixInColumn: i]))
|
||||||
continue;
|
continue;
|
||||||
if ([matrix selectedCell])
|
if ([matrix selectedCell])
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -940,7 +940,7 @@ static NSTextFieldCell *titleCell;
|
||||||
*/
|
*/
|
||||||
- (void) setLastColumn: (NSInteger)column
|
- (void) setLastColumn: (NSInteger)column
|
||||||
{
|
{
|
||||||
int i, count;
|
NSInteger i, count;
|
||||||
NSBrowserColumn *bc;
|
NSBrowserColumn *bc;
|
||||||
NSScrollView *sc;
|
NSScrollView *sc;
|
||||||
|
|
||||||
|
@ -1015,7 +1015,7 @@ static NSTextFieldCell *titleCell;
|
||||||
*/
|
*/
|
||||||
- (void) validateVisibleColumns
|
- (void) validateVisibleColumns
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
|
|
||||||
// If delegate doesn't care, just return
|
// If delegate doesn't care, just return
|
||||||
if (![_browserDelegate respondsToSelector:
|
if (![_browserDelegate respondsToSelector:
|
||||||
|
@ -1135,7 +1135,7 @@ static NSTextFieldCell *titleCell;
|
||||||
{
|
{
|
||||||
if (_allowsEmptySelection != flag)
|
if (_allowsEmptySelection != flag)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
|
|
||||||
_allowsEmptySelection = flag;
|
_allowsEmptySelection = flag;
|
||||||
for (i = 0; i <= _lastColumnLoaded; i++)
|
for (i = 0; i <= _lastColumnLoaded; i++)
|
||||||
|
@ -1160,7 +1160,7 @@ static NSTextFieldCell *titleCell;
|
||||||
{
|
{
|
||||||
if (_allowsMultipleSelection != flag)
|
if (_allowsMultipleSelection != flag)
|
||||||
{
|
{
|
||||||
int i;
|
NSInteger i;
|
||||||
NSMatrixMode mode;
|
NSMatrixMode mode;
|
||||||
|
|
||||||
_allowsMultipleSelection = flag;
|
_allowsMultipleSelection = flag;
|
||||||
|
@ -1229,7 +1229,7 @@ static NSTextFieldCell *titleCell;
|
||||||
/** <p>Returns the minimum column width in pixels.</p>
|
/** <p>Returns the minimum column width in pixels.</p>
|
||||||
<p>See Also: -setMinColumnWidth:</p>
|
<p>See Also: -setMinColumnWidth:</p>
|
||||||
*/
|
*/
|
||||||
- (NSInteger) minColumnWidth
|
- (CGFloat) minColumnWidth
|
||||||
{
|
{
|
||||||
return _minColumnWidth;
|
return _minColumnWidth;
|
||||||
}
|
}
|
||||||
|
@ -1237,9 +1237,9 @@ static NSTextFieldCell *titleCell;
|
||||||
/** <p>Sets the minimum column width in pixels and adjusts subviews.</p>
|
/** <p>Sets the minimum column width in pixels and adjusts subviews.</p>
|
||||||
<p>See Also: -minColumnWidth</p>
|
<p>See Also: -minColumnWidth</p>
|
||||||
*/
|
*/
|
||||||
- (void) setMinColumnWidth: (NSInteger)columnWidth
|
- (void) setMinColumnWidth: (CGFloat)columnWidth
|
||||||
{
|
{
|
||||||
float sw;
|
CGFloat sw;
|
||||||
|
|
||||||
sw = scrollerWidth;
|
sw = scrollerWidth;
|
||||||
// Take the border into account
|
// Take the border into account
|
||||||
|
@ -1292,9 +1292,9 @@ static NSTextFieldCell *titleCell;
|
||||||
[self setNeedsDisplay:YES];
|
[self setNeedsDisplay:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) columnWidthForColumnContentWidth: (float)columnContentWidth
|
- (CGFloat) columnWidthForColumnContentWidth: (CGFloat)columnContentWidth
|
||||||
{
|
{
|
||||||
float cw;
|
CGFloat cw;
|
||||||
|
|
||||||
cw = columnContentWidth;
|
cw = columnContentWidth;
|
||||||
if (scrollerWidth > cw)
|
if (scrollerWidth > cw)
|
||||||
|
@ -1309,9 +1309,9 @@ static NSTextFieldCell *titleCell;
|
||||||
return cw;
|
return cw;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) columnContentWidthForColumnWidth: (float)columnWidth
|
- (CGFloat) columnContentWidthForColumnWidth: (CGFloat)columnWidth
|
||||||
{
|
{
|
||||||
float cw;
|
CGFloat cw;
|
||||||
|
|
||||||
cw = columnWidth;
|
cw = columnWidth;
|
||||||
// Take the border into account
|
// Take the border into account
|
||||||
|
@ -1341,7 +1341,7 @@ static NSTextFieldCell *titleCell;
|
||||||
_prefersAllColumnUserResizing = flag;
|
_prefersAllColumnUserResizing = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) widthOfColumn: (NSInteger)column
|
- (CGFloat) widthOfColumn: (NSInteger)column
|
||||||
{
|
{
|
||||||
NSBrowserColumn *browserColumn;
|
NSBrowserColumn *browserColumn;
|
||||||
|
|
||||||
|
@ -1350,7 +1350,7 @@ static NSTextFieldCell *titleCell;
|
||||||
return browserColumn->_width;
|
return browserColumn->_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setWidth: (float)columnWidth ofColumn: (NSInteger)columnIndex
|
- (void) setWidth: (CGFloat)columnWidth ofColumn: (NSInteger)columnIndex
|
||||||
{
|
{
|
||||||
NSBrowserColumn *browserColumn;
|
NSBrowserColumn *browserColumn;
|
||||||
|
|
||||||
|
@ -1863,7 +1863,7 @@ static NSTextFieldCell *titleCell;
|
||||||
{
|
{
|
||||||
NSSize bezelBorderSize = [[GSTheme theme] sizeForBorderType: NSBezelBorder];
|
NSSize bezelBorderSize = [[GSTheme theme] sizeForBorderType: NSBezelBorder];
|
||||||
NSInteger i, num, columnCount, delta;
|
NSInteger i, num, columnCount, delta;
|
||||||
float frameWidth;
|
CGFloat frameWidth;
|
||||||
|
|
||||||
_columnSize.height = _frame.size.height;
|
_columnSize.height = _frame.size.height;
|
||||||
|
|
||||||
|
@ -1903,7 +1903,7 @@ static NSTextFieldCell *titleCell;
|
||||||
|
|
||||||
if (_minColumnWidth > 0)
|
if (_minColumnWidth > 0)
|
||||||
{
|
{
|
||||||
float colWidth = _minColumnWidth + scrollerWidth;
|
CGFloat colWidth = _minColumnWidth + scrollerWidth;
|
||||||
|
|
||||||
if (_separatesColumns)
|
if (_separatesColumns)
|
||||||
colWidth += NSBR_COLUMN_SEP;
|
colWidth += NSBR_COLUMN_SEP;
|
||||||
|
@ -1947,7 +1947,7 @@ static NSTextFieldCell *titleCell;
|
||||||
frameWidth = _frame.size.width - ((columnCount - 1) +
|
frameWidth = _frame.size.width - ((columnCount - 1) +
|
||||||
(2 * bezelBorderSize.width));
|
(2 * bezelBorderSize.width));
|
||||||
|
|
||||||
_columnSize.width = (int)(frameWidth / (float)columnCount);
|
_columnSize.width = (int)(frameWidth / (CGFloat)columnCount);
|
||||||
|
|
||||||
if (_columnSize.height < 0)
|
if (_columnSize.height < 0)
|
||||||
_columnSize.height = 0;
|
_columnSize.height = 0;
|
||||||
|
@ -2114,7 +2114,7 @@ static NSTextFieldCell *titleCell;
|
||||||
NSMutableArray *selectedCells;
|
NSMutableArray *selectedCells;
|
||||||
NSEnumerator *enumerator;
|
NSEnumerator *enumerator;
|
||||||
NSBrowserCell *cell;
|
NSBrowserCell *cell;
|
||||||
int column, aCount, selectedCellsCount;
|
NSInteger column, aCount, selectedCellsCount;
|
||||||
|
|
||||||
if ([sender class] != _browserMatrixClass)
|
if ([sender class] != _browserMatrixClass)
|
||||||
return;
|
return;
|
||||||
|
@ -2355,7 +2355,7 @@ static NSTextFieldCell *titleCell;
|
||||||
if (_acceptsArrowKeys)
|
if (_acceptsArrowKeys)
|
||||||
{
|
{
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
int selectedColumn;
|
NSInteger selectedColumn;
|
||||||
|
|
||||||
matrix = (NSMatrix *)[_window firstResponder];
|
matrix = (NSMatrix *)[_window firstResponder];
|
||||||
selectedColumn = [self columnOfMatrix:matrix];
|
selectedColumn = [self columnOfMatrix:matrix];
|
||||||
|
@ -2388,7 +2388,7 @@ static NSTextFieldCell *titleCell;
|
||||||
if (_acceptsArrowKeys)
|
if (_acceptsArrowKeys)
|
||||||
{
|
{
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
int selectedColumn;
|
NSInteger selectedColumn;
|
||||||
|
|
||||||
matrix = (NSMatrix *)[_window firstResponder];
|
matrix = (NSMatrix *)[_window firstResponder];
|
||||||
selectedColumn = [self columnOfMatrix:matrix];
|
selectedColumn = [self columnOfMatrix:matrix];
|
||||||
|
@ -2483,9 +2483,9 @@ static NSTextFieldCell *titleCell;
|
||||||
{
|
{
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
NSString *sv;
|
NSString *sv;
|
||||||
int i, n, s;
|
NSInteger i, n, s;
|
||||||
int match;
|
NSInteger match;
|
||||||
int selectedColumn;
|
NSInteger selectedColumn;
|
||||||
SEL lcarcSel = @selector(loadedCellAtRow:column:);
|
SEL lcarcSel = @selector(loadedCellAtRow:column:);
|
||||||
IMP lcarc = [self methodForSelector: lcarcSel];
|
IMP lcarc = [self methodForSelector: lcarcSel];
|
||||||
|
|
||||||
|
@ -2901,7 +2901,7 @@ static NSTextFieldCell *titleCell;
|
||||||
{
|
{
|
||||||
NSBrowserColumn *bc;
|
NSBrowserColumn *bc;
|
||||||
NSScrollView *sc;
|
NSScrollView *sc;
|
||||||
int i, count;
|
NSUInteger i, count;
|
||||||
id firstResponder = nil;
|
id firstResponder = nil;
|
||||||
BOOL setFirstResponder = NO;
|
BOOL setFirstResponder = NO;
|
||||||
|
|
||||||
|
@ -2975,12 +2975,12 @@ static NSTextFieldCell *titleCell;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Loads column 'column' (asking the delegate). */
|
/* Loads column 'column' (asking the delegate). */
|
||||||
- (void) _performLoadOfColumn: (int)column
|
- (void) _performLoadOfColumn: (NSInteger)column
|
||||||
{
|
{
|
||||||
NSBrowserColumn *bc;
|
NSBrowserColumn *bc;
|
||||||
NSScrollView *sc;
|
NSScrollView *sc;
|
||||||
NSMatrix *matrix;
|
NSMatrix *matrix;
|
||||||
int i, rows, cols;
|
NSInteger i, rows, cols;
|
||||||
|
|
||||||
if (_passiveDelegate)
|
if (_passiveDelegate)
|
||||||
{
|
{
|
||||||
|
@ -3107,7 +3107,7 @@ static NSTextFieldCell *titleCell;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the title of a column. */
|
/* Get the title of a column. */
|
||||||
- (NSString *) _getTitleOfColumn: (int)column
|
- (NSString *) _getTitleOfColumn: (NSInteger)column
|
||||||
{
|
{
|
||||||
// Ask the delegate for the column title
|
// Ask the delegate for the column title
|
||||||
if ([_browserDelegate respondsToSelector:
|
if ([_browserDelegate respondsToSelector:
|
||||||
|
@ -3190,7 +3190,7 @@ static NSTextFieldCell *titleCell;
|
||||||
|
|
||||||
- (void) setNeedsDisplayInRect: (NSRect)invalidRect
|
- (void) setNeedsDisplayInRect: (NSRect)invalidRect
|
||||||
{
|
{
|
||||||
[super setNeedsDisplayInRect: invalidRect];
|
[super setNeedsDisplayInRect: invalidRect];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -61,25 +61,25 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
||||||
output = [view convertRect: rect toView: nil];
|
output = [view convertRect: rect toView: nil];
|
||||||
|
|
||||||
rounded = (int)(output.origin.x);
|
rounded = (int)(output.origin.x);
|
||||||
if ((float)rounded != output.origin.x)
|
if ((CGFloat)rounded != output.origin.x)
|
||||||
{
|
{
|
||||||
output.origin.x = rounded + 1;
|
output.origin.x = rounded + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rounded = (int)(output.origin.y);
|
rounded = (int)(output.origin.y);
|
||||||
if ((float)rounded != output.origin.y)
|
if ((CGFloat)rounded != output.origin.y)
|
||||||
{
|
{
|
||||||
output.origin.y = rounded + 1;
|
output.origin.y = rounded + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rounded = (int)(NSMaxX (output));
|
rounded = (int)(NSMaxX (output));
|
||||||
if ((float)rounded != NSMaxX (output))
|
if ((CGFloat)rounded != NSMaxX (output))
|
||||||
{
|
{
|
||||||
output.size.width = rounded - output.origin.x;
|
output.size.width = rounded - output.origin.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
rounded = (int)(NSMaxY (output));
|
rounded = (int)(NSMaxY (output));
|
||||||
if ((float)rounded != NSMaxY (output))
|
if ((CGFloat)rounded != NSMaxY (output))
|
||||||
{
|
{
|
||||||
output.size.height = rounded - output.origin.y;
|
output.size.height = rounded - output.origin.y;
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
||||||
|
|
||||||
if (_documentView)
|
if (_documentView)
|
||||||
{
|
{
|
||||||
NSRect df;
|
NSRect df;
|
||||||
|
|
||||||
[self addSubview: _documentView];
|
[self addSubview: _documentView];
|
||||||
|
|
||||||
|
@ -275,8 +275,6 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
||||||
scrolling. Then, document view needs to redraw the remaining
|
scrolling. Then, document view needs to redraw the remaining
|
||||||
areas. */
|
areas. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Common part - which is a first approx of what we could
|
/* Common part - which is a first approx of what we could
|
||||||
copy... */
|
copy... */
|
||||||
intersection = NSIntersectionRect (originalBounds, newBounds);
|
intersection = NSIntersectionRect (originalBounds, newBounds);
|
||||||
|
@ -309,8 +307,8 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
||||||
origins, both of which should be integers in device space
|
origins, both of which should be integers in device space
|
||||||
because of the code at the end of
|
because of the code at the end of
|
||||||
constrainScrollPoint:. */
|
constrainScrollPoint:. */
|
||||||
float dx = newBounds.origin.x - originalBounds.origin.x;
|
CGFloat dx = newBounds.origin.x - originalBounds.origin.x;
|
||||||
float dy = newBounds.origin.y - originalBounds.origin.y;
|
CGFloat dy = newBounds.origin.y - originalBounds.origin.y;
|
||||||
NSRect redrawRect;
|
NSRect redrawRect;
|
||||||
|
|
||||||
/* Copy the intersection to the new position */
|
/* Copy the intersection to the new position */
|
||||||
|
@ -660,7 +658,6 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
||||||
_isOpaque = YES;
|
_isOpaque = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setDrawsBackground: (BOOL)flag
|
- (void) setDrawsBackground: (BOOL)flag
|
||||||
|
@ -699,15 +696,15 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable rotation of clip view */
|
/* Disable rotation of clip view */
|
||||||
- (void) rotateByAngle: (float)angle
|
- (void) rotateByAngle: (CGFloat)angle
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setBoundsRotation: (float)angle
|
- (void) setBoundsRotation: (CGFloat)angle
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setFrameRotation: (float)angle
|
- (void) setFrameRotation: (CGFloat)angle
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ static NSNotificationCenter *nc;
|
||||||
/**
|
/**
|
||||||
* Returns the height of the items in the combo box cell list.
|
* Returns the height of the items in the combo box cell list.
|
||||||
*/
|
*/
|
||||||
- (float)itemHeight
|
- (CGFloat)itemHeight
|
||||||
{
|
{
|
||||||
return [_cell itemHeight];
|
return [_cell itemHeight];
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ static NSNotificationCenter *nc;
|
||||||
* Sets the height of the items in the combo box cell list to
|
* Sets the height of the items in the combo box cell list to
|
||||||
* <var>itemHeight</var>.
|
* <var>itemHeight</var>.
|
||||||
*/
|
*/
|
||||||
- (void)setItemHeight:(float)itemHeight
|
- (void)setItemHeight:(CGFloat)itemHeight
|
||||||
{
|
{
|
||||||
[_cell setItemHeight:itemHeight];
|
[_cell setItemHeight:itemHeight];
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,13 +98,13 @@ static NSNotificationCenter *nc;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSComboBoxCell (GNUstepPrivate)
|
@interface NSComboBoxCell (GNUstepPrivate)
|
||||||
- (NSString *) _stringValueAtIndex: (int)index;
|
- (NSString *) _stringValueAtIndex: (NSInteger)index;
|
||||||
- (void) _performClickWithFrame: (NSRect)cellFrame inView: (NSView *)controlView;
|
- (void) _performClickWithFrame: (NSRect)cellFrame inView: (NSView *)controlView;
|
||||||
- (void) _didClickWithinButton: (id)sender;
|
- (void) _didClickWithinButton: (id)sender;
|
||||||
- (BOOL) _isWantedEvent: (NSEvent *)event;
|
- (BOOL) _isWantedEvent: (NSEvent *)event;
|
||||||
- (GSComboWindow *) _popUp;
|
- (GSComboWindow *) _popUp;
|
||||||
- (NSRect) _textCellFrame;
|
- (NSRect) _textCellFrame;
|
||||||
- (void) _setSelectedItem: (int)index;
|
- (void) _setSelectedItem: (NSInteger)index;
|
||||||
- (void) _loadButtonCell;
|
- (void) _loadButtonCell;
|
||||||
- (void) _selectCompleted;
|
- (void) _selectCompleted;
|
||||||
@end
|
@end
|
||||||
|
@ -207,12 +207,12 @@ static GSComboWindow *gsWindow = nil;
|
||||||
{
|
{
|
||||||
NSSize bsize = [[GSTheme theme] sizeForBorderType: NSLineBorder];
|
NSSize bsize = [[GSTheme theme] sizeForBorderType: NSLineBorder];
|
||||||
NSSize size;
|
NSSize size;
|
||||||
float itemHeight;
|
CGFloat itemHeight;
|
||||||
float textCellWidth;
|
CGFloat textCellWidth;
|
||||||
float popUpWidth;
|
CGFloat popUpWidth;
|
||||||
NSSize intercellSpacing;
|
NSSize intercellSpacing;
|
||||||
int num = [comboBoxCell numberOfItems];
|
NSInteger num = [comboBoxCell numberOfItems];
|
||||||
int max = [comboBoxCell numberOfVisibleItems];
|
NSInteger max = [comboBoxCell numberOfVisibleItems];
|
||||||
|
|
||||||
// Manage table view or browser cells height
|
// Manage table view or browser cells height
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ static GSComboWindow *gsWindow = nil;
|
||||||
|
|
||||||
- (void) moveDownSelection
|
- (void) moveDownSelection
|
||||||
{
|
{
|
||||||
int index = [_tableView selectedRow] + 1;
|
NSInteger index = [_tableView selectedRow] + 1;
|
||||||
|
|
||||||
if (index > -1 && index < [_tableView numberOfRows])
|
if (index > -1 && index < [_tableView numberOfRows])
|
||||||
{
|
{
|
||||||
|
@ -577,7 +577,7 @@ static GSComboWindow *gsWindow = nil;
|
||||||
{
|
{
|
||||||
NSText *textObject = nil;
|
NSText *textObject = nil;
|
||||||
id cv = [_cell controlView];
|
id cv = [_cell controlView];
|
||||||
int index = [_cell indexOfSelectedItem];
|
NSInteger index = [_cell indexOfSelectedItem];
|
||||||
|
|
||||||
if ([cv isKindOfClass: [NSControl class]])
|
if ([cv isKindOfClass: [NSControl class]])
|
||||||
{
|
{
|
||||||
|
@ -731,7 +731,7 @@ static GSComboWindow *gsWindow = nil;
|
||||||
/**
|
/**
|
||||||
* Returns the height of the items in the combo box cell list.
|
* Returns the height of the items in the combo box cell list.
|
||||||
*/
|
*/
|
||||||
- (float) itemHeight
|
- (CGFloat) itemHeight
|
||||||
{
|
{
|
||||||
return _itemHeight;
|
return _itemHeight;
|
||||||
}
|
}
|
||||||
|
@ -740,9 +740,9 @@ static GSComboWindow *gsWindow = nil;
|
||||||
* Sets the height of the items in the combo box cell list to
|
* Sets the height of the items in the combo box cell list to
|
||||||
* <var>itemHeight</var>.
|
* <var>itemHeight</var>.
|
||||||
*/
|
*/
|
||||||
- (void) setItemHeight: (float)itemHeight
|
- (void) setItemHeight: (CGFloat)itemHeight
|
||||||
{
|
{
|
||||||
if (itemHeight > 14)
|
if (itemHeight > 14.0)
|
||||||
_itemHeight = itemHeight;
|
_itemHeight = itemHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1130,7 +1130,7 @@ static GSComboWindow *gsWindow = nil;
|
||||||
*/
|
*/
|
||||||
- (id) objectValue
|
- (id) objectValue
|
||||||
{
|
{
|
||||||
int index = [self indexOfSelectedItem];
|
NSInteger index = [self indexOfSelectedItem];
|
||||||
|
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
{
|
{
|
||||||
|
@ -1182,7 +1182,7 @@ static GSComboWindow *gsWindow = nil;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int index = [self indexOfSelectedItem];
|
NSInteger index = [self indexOfSelectedItem];
|
||||||
|
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
{
|
{
|
||||||
|
@ -1268,7 +1268,7 @@ static GSComboWindow *gsWindow = nil;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int i;
|
NSInteger i;
|
||||||
|
|
||||||
for (i = 0; i < [self numberOfItems]; i++)
|
for (i = 0; i < [self numberOfItems]; i++)
|
||||||
{
|
{
|
||||||
|
@ -1281,7 +1281,7 @@ static GSComboWindow *gsWindow = nil;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int i;
|
NSUInteger i;
|
||||||
|
|
||||||
for (i = 0; i < [_popUpList count]; i++)
|
for (i = 0; i < [_popUpList count]; i++)
|
||||||
{
|
{
|
||||||
|
@ -1740,8 +1740,8 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
||||||
{
|
{
|
||||||
NSString *myString = [[textObject string] copy];
|
NSString *myString = [[textObject string] copy];
|
||||||
NSString *more;
|
NSString *more;
|
||||||
unsigned int myStringLength = [myString length];
|
NSUInteger myStringLength = [myString length];
|
||||||
unsigned int location, length;
|
NSUInteger location, length;
|
||||||
NSRange selectedRange = [textObject selectedRange];
|
NSRange selectedRange = [textObject selectedRange];
|
||||||
|
|
||||||
if (myStringLength != 0
|
if (myStringLength != 0
|
||||||
|
@ -1766,7 +1766,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
||||||
|
|
||||||
@implementation NSComboBoxCell (GNUstepPrivate)
|
@implementation NSComboBoxCell (GNUstepPrivate)
|
||||||
|
|
||||||
- (NSString *) _stringValueAtIndex: (int)index
|
- (NSString *) _stringValueAtIndex: (NSInteger)index
|
||||||
{
|
{
|
||||||
if (_usesDataSource == NO)
|
if (_usesDataSource == NO)
|
||||||
{
|
{
|
||||||
|
@ -1869,7 +1869,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
||||||
return textCellFrameFromRect(_lastValidFrame);
|
return textCellFrameFromRect(_lastValidFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _setSelectedItem: (int)index
|
- (void) _setSelectedItem: (NSInteger)index
|
||||||
{
|
{
|
||||||
_selectedItem = index;
|
_selectedItem = index;
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,7 +214,7 @@ static Class defaultCellClass = nil;
|
||||||
/** <p>Sets the spacing between all entries to spacing. By default
|
/** <p>Sets the spacing between all entries to spacing. By default
|
||||||
the spacing is 4.</p><p>See Also: [NSMatrix-setIntercellSpacing:]</p>
|
the spacing is 4.</p><p>See Also: [NSMatrix-setIntercellSpacing:]</p>
|
||||||
*/
|
*/
|
||||||
- (void) setInterlineSpacing: (float)spacing
|
- (void) setInterlineSpacing: (CGFloat)spacing
|
||||||
{
|
{
|
||||||
[self setIntercellSpacing: NSMakeSize(0, spacing)];
|
[self setIntercellSpacing: NSMakeSize(0, spacing)];
|
||||||
}
|
}
|
||||||
|
@ -356,8 +356,8 @@ static Class defaultCellClass = nil;
|
||||||
- (void) calcSize
|
- (void) calcSize
|
||||||
{
|
{
|
||||||
NSInteger i, count = [self numberOfRows];
|
NSInteger i, count = [self numberOfRows];
|
||||||
float new_title_width = 0;
|
CGFloat new_title_width = 0;
|
||||||
float candidate_title_width = 0;
|
CGFloat candidate_title_width = 0;
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
|
|
||||||
// Compute max of title width in the cells
|
// Compute max of title width in the cells
|
||||||
|
|
|
@ -168,7 +168,7 @@
|
||||||
/**<p>Sets the width of the NSFormCell's title to width. All NSFormCell
|
/**<p>Sets the width of the NSFormCell's title to width. All NSFormCell
|
||||||
of the NSForm are updated</p><p>See Also: -titleWidth</p>
|
of the NSForm are updated</p><p>See Also: -titleWidth</p>
|
||||||
*/
|
*/
|
||||||
- (void)setTitleWidth: (float)width
|
- (void)setTitleWidth: (CGFloat)width
|
||||||
{
|
{
|
||||||
if (width >= 0)
|
if (width >= 0)
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@
|
||||||
// manually with setTitleWidth: disables any alignment with other
|
// manually with setTitleWidth: disables any alignment with other
|
||||||
// cells.
|
// cells.
|
||||||
//
|
//
|
||||||
- (float)titleWidth
|
- (CGFloat)titleWidth
|
||||||
{
|
{
|
||||||
if (_formcell_auto_title_width == NO)
|
if (_formcell_auto_title_width == NO)
|
||||||
return _displayedTitleWidth;
|
return _displayedTitleWidth;
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float)titleWidth: (NSSize)aSize
|
- (CGFloat)titleWidth: (NSSize)aSize
|
||||||
{
|
{
|
||||||
if (_formcell_auto_title_width == NO)
|
if (_formcell_auto_title_width == NO)
|
||||||
return _displayedTitleWidth;
|
return _displayedTitleWidth;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
@implementation NSTextTab
|
@implementation NSTextTab
|
||||||
|
|
||||||
- (id) initWithType: (NSTextTabType)type location: (float)loc
|
- (id) initWithType: (NSTextTabType)type location: (CGFloat)loc
|
||||||
{
|
{
|
||||||
if ((self = [super init]))
|
if ((self = [super init]))
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithTextAlignment: (NSTextAlignment)align
|
- (id) initWithTextAlignment: (NSTextAlignment)align
|
||||||
location: (float)loc
|
location: (CGFloat)loc
|
||||||
options: (NSDictionary *)options
|
options: (NSDictionary *)options
|
||||||
{
|
{
|
||||||
NSTextTabType type;
|
NSTextTabType type;
|
||||||
|
@ -138,9 +138,9 @@
|
||||||
|
|
||||||
- (NSUInteger) hash
|
- (NSUInteger) hash
|
||||||
{
|
{
|
||||||
unsigned val = (unsigned)_location;
|
NSUInteger val = (NSUInteger)_location;
|
||||||
|
|
||||||
val ^= (unsigned)_tabStopType;
|
val ^= (NSUInteger)_tabStopType;
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) location
|
- (CGFloat) location
|
||||||
{
|
{
|
||||||
return _location;
|
return _location;
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
* Can't be negative. This value is included in the line fragment
|
* Can't be negative. This value is included in the line fragment
|
||||||
* heights in layout manager.
|
* heights in layout manager.
|
||||||
*/
|
*/
|
||||||
- (float) lineSpacing
|
- (CGFloat) lineSpacing
|
||||||
{
|
{
|
||||||
return _lineSpacing;
|
return _lineSpacing;
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
/*
|
/*
|
||||||
* Distance between the bottom of this paragraph and top of next.
|
* Distance between the bottom of this paragraph and top of next.
|
||||||
*/
|
*/
|
||||||
- (float) paragraphSpacing
|
- (CGFloat) paragraphSpacing
|
||||||
{
|
{
|
||||||
return _paragraphSpacing;
|
return _paragraphSpacing;
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
/*
|
/*
|
||||||
* Distance from margin to front edge of paragraph
|
* Distance from margin to front edge of paragraph
|
||||||
*/
|
*/
|
||||||
- (float) headIndent
|
- (CGFloat) headIndent
|
||||||
{
|
{
|
||||||
return _headIndent;
|
return _headIndent;
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
* Distance from margin to back edge of paragraph; if negative or 0,
|
* Distance from margin to back edge of paragraph; if negative or 0,
|
||||||
* from other margin
|
* from other margin
|
||||||
*/
|
*/
|
||||||
- (float) tailIndent
|
- (CGFloat) tailIndent
|
||||||
{
|
{
|
||||||
return _tailIndent;
|
return _tailIndent;
|
||||||
}
|
}
|
||||||
|
@ -355,7 +355,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
/*
|
/*
|
||||||
* Distance from margin to edge appropriate for text direction
|
* Distance from margin to edge appropriate for text direction
|
||||||
*/
|
*/
|
||||||
- (float) firstLineHeadIndent
|
- (CGFloat) firstLineHeadIndent
|
||||||
{
|
{
|
||||||
return _firstLineHeadIndent;
|
return _firstLineHeadIndent;
|
||||||
}
|
}
|
||||||
|
@ -373,7 +373,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
* of ascenders; basically the line fragment height. Does not include
|
* of ascenders; basically the line fragment height. Does not include
|
||||||
* lineSpacing (which is added after this computation).
|
* lineSpacing (which is added after this computation).
|
||||||
*/
|
*/
|
||||||
- (float) minimumLineHeight
|
- (CGFloat) minimumLineHeight
|
||||||
{
|
{
|
||||||
return _minimumLineHeight;
|
return _minimumLineHeight;
|
||||||
}
|
}
|
||||||
|
@ -381,7 +381,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
/*
|
/*
|
||||||
* 0 implies no maximum.
|
* 0 implies no maximum.
|
||||||
*/
|
*/
|
||||||
- (float) maximumLineHeight
|
- (CGFloat) maximumLineHeight
|
||||||
{
|
{
|
||||||
return _maximumLineHeight;
|
return _maximumLineHeight;
|
||||||
}
|
}
|
||||||
|
@ -396,22 +396,22 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
return _baseDirection;
|
return _baseDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) defaultTabInterval
|
- (CGFloat) defaultTabInterval
|
||||||
{
|
{
|
||||||
return _defaultTabInterval;
|
return _defaultTabInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) lineHeightMultiple
|
- (CGFloat) lineHeightMultiple
|
||||||
{
|
{
|
||||||
return _lineHeightMultiple;
|
return _lineHeightMultiple;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) paragraphSpacingBefore
|
- (CGFloat) paragraphSpacingBefore
|
||||||
{
|
{
|
||||||
return _paragraphSpacingBefore;
|
return _paragraphSpacingBefore;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) headerLevel
|
- (NSInteger) headerLevel
|
||||||
{
|
{
|
||||||
return _headerLevel;
|
return _headerLevel;
|
||||||
}
|
}
|
||||||
|
@ -613,13 +613,13 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
return AUTORELEASE ([[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
|
return AUTORELEASE ([[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setLineSpacing: (float)aFloat
|
- (void) setLineSpacing: (CGFloat)aFloat
|
||||||
{
|
{
|
||||||
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
||||||
_lineSpacing = aFloat;
|
_lineSpacing = aFloat;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setParagraphSpacing: (float)aFloat
|
- (void) setParagraphSpacing: (CGFloat)aFloat
|
||||||
{
|
{
|
||||||
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
||||||
_paragraphSpacing = aFloat;
|
_paragraphSpacing = aFloat;
|
||||||
|
@ -630,19 +630,19 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
_alignment = newAlignment;
|
_alignment = newAlignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setFirstLineHeadIndent: (float)aFloat
|
- (void) setFirstLineHeadIndent: (CGFloat)aFloat
|
||||||
{
|
{
|
||||||
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
||||||
_firstLineHeadIndent = aFloat;
|
_firstLineHeadIndent = aFloat;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setHeadIndent: (float)aFloat
|
- (void) setHeadIndent: (CGFloat)aFloat
|
||||||
{
|
{
|
||||||
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
||||||
_headIndent = aFloat;
|
_headIndent = aFloat;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setTailIndent: (float)aFloat
|
- (void) setTailIndent: (CGFloat)aFloat
|
||||||
{
|
{
|
||||||
_tailIndent = aFloat;
|
_tailIndent = aFloat;
|
||||||
}
|
}
|
||||||
|
@ -652,13 +652,13 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
_lineBreakMode = mode;
|
_lineBreakMode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setMinimumLineHeight: (float)aFloat
|
- (void) setMinimumLineHeight: (CGFloat)aFloat
|
||||||
{
|
{
|
||||||
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
||||||
_minimumLineHeight = aFloat;
|
_minimumLineHeight = aFloat;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setMaximumLineHeight: (float)aFloat
|
- (void) setMaximumLineHeight: (CGFloat)aFloat
|
||||||
{
|
{
|
||||||
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
NSAssert (aFloat >= 0.0, NSInvalidArgumentException);
|
||||||
_maximumLineHeight = aFloat;
|
_maximumLineHeight = aFloat;
|
||||||
|
@ -682,12 +682,12 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
_baseDirection = direction;
|
_baseDirection = direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setDefaultTabInterval: (float)interval
|
- (void) setDefaultTabInterval: (CGFloat)interval
|
||||||
{
|
{
|
||||||
_defaultTabInterval = interval;
|
_defaultTabInterval = interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setLineHeightMultiple: (float)factor
|
- (void) setLineHeightMultiple: (CGFloat)factor
|
||||||
{
|
{
|
||||||
_lineHeightMultiple = factor;
|
_lineHeightMultiple = factor;
|
||||||
}
|
}
|
||||||
|
@ -697,7 +697,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
_paragraphSpacingBefore = spacing;
|
_paragraphSpacingBefore = spacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setHeaderLevel: (int)level
|
- (void) setHeaderLevel: (NSInteger)level
|
||||||
{
|
{
|
||||||
_headerLevel = level;
|
_headerLevel = level;
|
||||||
}
|
}
|
||||||
|
@ -724,7 +724,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
|
|
||||||
- (void) addTabStop: (NSTextTab*)anObject
|
- (void) addTabStop: (NSTextTab*)anObject
|
||||||
{
|
{
|
||||||
unsigned count = [_tabStops count];
|
NSUInteger count = [_tabStops count];
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
|
@ -734,7 +734,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
{
|
{
|
||||||
while (count-- > 0)
|
while (count-- > 0)
|
||||||
{
|
{
|
||||||
NSTextTab *tab;
|
NSTextTab *tab;
|
||||||
|
|
||||||
tab = [_tabStops objectAtIndex: count];
|
tab = [_tabStops objectAtIndex: count];
|
||||||
if ([tab compare: anObject] != NSOrderedDescending)
|
if ([tab compare: anObject] != NSOrderedDescending)
|
||||||
|
@ -767,7 +767,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
|
|
||||||
- (void) setParagraphStyle: (NSParagraphStyle*)obj
|
- (void) setParagraphStyle: (NSParagraphStyle*)obj
|
||||||
{
|
{
|
||||||
NSMutableParagraphStyle *p = (NSMutableParagraphStyle*)obj;
|
NSMutableParagraphStyle *p = (NSMutableParagraphStyle*)obj;
|
||||||
|
|
||||||
if (p == self)
|
if (p == self)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue