Next bit of NSInteger cleanup for -gui.

Fix all of the current warnings in Gorm so that it can be used to test
NSInteger things.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36039 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
theraven 2013-01-30 12:43:27 +00:00
parent 30eb57e642
commit d07b4ef40f
18 changed files with 329 additions and 329 deletions

View file

@ -228,18 +228,18 @@ createRowsForColumn: (NSInteger)column
{ {
} }
- (int) numberOfItemsInComboBox: (NSComboBox *)aComboBox - (NSInteger) numberOfItemsInComboBox: (NSComboBox *)aComboBox
{ {
return [lists count]; return [lists count];
} }
- (id) comboBox: (NSComboBox *)aComboBox - (id) comboBox: (NSComboBox *)aComboBox
objectValueForItemAtIndex: (int)index objectValueForItemAtIndex: (NSInteger)index
{ {
return [(NSColorList*)[lists objectAtIndex: index] name]; return [(NSColorList*)[lists objectAtIndex: index] name];
} }
- (unsigned int) comboBox: (NSComboBox *)aComboBox - (NSUInteger) comboBox: (NSComboBox *)aComboBox
indexOfItemWithStringValue: (NSString *)string indexOfItemWithStringValue: (NSString *)string
{ {
return [lists indexOfObject: [NSColorList colorListNamed: string]]; return [lists indexOfObject: [NSColorList colorListNamed: string]];

View file

@ -48,8 +48,8 @@
- (float) itemHeight; - (float) itemHeight;
- (void) setItemHeight: (float)itemHeight; - (void) setItemHeight: (float)itemHeight;
- (int) numberOfVisibleItems; - (NSInteger) numberOfVisibleItems;
- (void) setNumberOfVisibleItems: (int)visibleItems; - (void) setNumberOfVisibleItems: (NSInteger)visibleItems;
- (void) reloadData; - (void) reloadData;
- (void) noteNumberOfItemsChanged; - (void) noteNumberOfItemsChanged;
@ -57,13 +57,13 @@
- (BOOL) usesDataSource; - (BOOL) usesDataSource;
- (void) setUsesDataSource: (BOOL)flag; - (void) setUsesDataSource: (BOOL)flag;
- (void) scrollItemAtIndexToTop: (int)index; - (void) scrollItemAtIndexToTop: (NSInteger)index;
- (void) scrollItemAtIndexToVisible: (int)index; - (void) scrollItemAtIndexToVisible: (NSInteger)index;
- (void) selectItemAtIndex: (int)index; - (void) selectItemAtIndex: (NSInteger)index;
- (void) deselectItemAtIndex: (int)index; - (void) deselectItemAtIndex: (NSInteger)index;
- (int) indexOfSelectedItem; - (NSInteger) indexOfSelectedItem;
- (int) numberOfItems; - (NSInteger) numberOfItems;
/* These two methods can only be used when usesDataSource is YES */ /* These two methods can only be used when usesDataSource is YES */
- (id) dataSource; - (id) dataSource;
@ -72,14 +72,14 @@
/* These methods can only be used when usesDataSource is NO */ /* These methods can only be used when usesDataSource is NO */
- (void) addItemWithObjectValue: (id)object; - (void) addItemWithObjectValue: (id)object;
- (void) addItemsWithObjectValues: (NSArray *)objects; - (void) addItemsWithObjectValues: (NSArray *)objects;
- (void) insertItemWithObjectValue: (id)object atIndex:(int)index; - (void) insertItemWithObjectValue: (id)object atIndex:(NSInteger)index;
- (void) removeItemWithObjectValue: (id)object; - (void) removeItemWithObjectValue: (id)object;
- (void) removeItemAtIndex: (int)index; - (void) removeItemAtIndex: (NSInteger)index;
- (void) removeAllItems; - (void) removeAllItems;
- (void) selectItemWithObjectValue: (id)object; - (void) selectItemWithObjectValue: (id)object;
- (id) itemObjectValueAtIndex: (int)index; - (id) itemObjectValueAtIndex: (NSInteger)index;
- (id) objectValueOfSelectedItem; - (id) objectValueOfSelectedItem;
- (int) indexOfItemWithObjectValue: (id)object; - (NSInteger) indexOfItemWithObjectValue: (id)object;
- (NSArray *) objectValues; - (NSArray *) objectValues;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
@ -95,9 +95,9 @@
@end @end
@interface NSObject (NSComboBoxDataSource) @interface NSObject (NSComboBoxDataSource)
- (int) numberOfItemsInComboBox: (NSComboBox *)aComboBox; - (NSInteger) numberOfItemsInComboBox: (NSComboBox *)aComboBox;
- (id) comboBox: (NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index; - (id) comboBox: (NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index;
- (unsigned int) comboBox: (NSComboBox *)aComboBox - (NSUInteger) comboBox: (NSComboBox *)aComboBox
indexOfItemWithStringValue: (NSString *)string; indexOfItemWithStringValue: (NSString *)string;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
/* text completion */ /* text completion */

View file

@ -65,8 +65,8 @@
- (float)itemHeight; - (float)itemHeight;
- (void)setItemHeight:(float)itemHeight; - (void)setItemHeight:(float)itemHeight;
- (int)numberOfVisibleItems; - (NSInteger)numberOfVisibleItems;
- (void)setNumberOfVisibleItems:(int)visibleItems; - (void)setNumberOfVisibleItems:(NSInteger)visibleItems;
- (void)reloadData; - (void)reloadData;
- (void)noteNumberOfItemsChanged; - (void)noteNumberOfItemsChanged;
@ -74,13 +74,13 @@
- (BOOL)usesDataSource; - (BOOL)usesDataSource;
- (void)setUsesDataSource:(BOOL)flag; - (void)setUsesDataSource:(BOOL)flag;
- (void)scrollItemAtIndexToTop:(int)index; - (void)scrollItemAtIndexToTop:(NSInteger)index;
- (void)scrollItemAtIndexToVisible:(int)index; - (void)scrollItemAtIndexToVisible:(NSInteger)index;
- (void)selectItemAtIndex:(int)index; - (void)selectItemAtIndex:(NSInteger)index;
- (void)deselectItemAtIndex:(int)index; - (void)deselectItemAtIndex:(NSInteger)index;
- (int)indexOfSelectedItem; - (NSInteger)indexOfSelectedItem;
- (int)numberOfItems; - (NSInteger)numberOfItems;
/* These two methods can only be used when usesDataSource is YES */ /* These two methods can only be used when usesDataSource is YES */
- (id)dataSource; - (id)dataSource;
@ -89,14 +89,14 @@
/* These methods can only be used when usesDataSource is NO */ /* These methods can only be used when usesDataSource is NO */
- (void)addItemWithObjectValue:(id)object; - (void)addItemWithObjectValue:(id)object;
- (void)addItemsWithObjectValues:(NSArray *)objects; - (void)addItemsWithObjectValues:(NSArray *)objects;
- (void)insertItemWithObjectValue:(id)object atIndex:(int)index; - (void)insertItemWithObjectValue:(id)object atIndex:(NSInteger)index;
- (void)removeItemWithObjectValue:(id)object; - (void)removeItemWithObjectValue:(id)object;
- (void)removeItemAtIndex:(int)index; - (void)removeItemAtIndex:(NSInteger)index;
- (void)removeAllItems; - (void)removeAllItems;
- (void)selectItemWithObjectValue:(id)object; - (void)selectItemWithObjectValue:(id)object;
- (id)itemObjectValueAtIndex:(int)index; - (id)itemObjectValueAtIndex:(NSInteger)index;
- (id)objectValueOfSelectedItem; - (id)objectValueOfSelectedItem;
- (int)indexOfItemWithObjectValue:(id)object; - (NSInteger)indexOfItemWithObjectValue:(id)object;
- (NSArray *)objectValues; - (NSArray *)objectValues;
- (BOOL) trackMouse: (NSEvent *)theEvent - (BOOL) trackMouse: (NSEvent *)theEvent
@ -118,10 +118,10 @@
@end @end
@interface NSObject (NSComboBoxCellDataSource) @interface NSObject (NSComboBoxCellDataSource)
- (int)numberOfItemsInComboBoxCell:(NSComboBoxCell *)comboBoxCell; - (NSInteger)numberOfItemsInComboBoxCell:(NSComboBoxCell *)comboBoxCell;
- (id)comboBoxCell:(NSComboBoxCell *)aComboBoxCell - (id)comboBoxCell:(NSComboBoxCell *)aComboBoxCell
objectValueForItemAtIndex:(int)index; objectValueForItemAtIndex:(NSInteger)index;
- (unsigned int)comboBoxCell:(NSComboBoxCell *)aComboBoxCell - (NSUInteger)comboBoxCell:(NSComboBoxCell *)aComboBoxCell
indexOfItemWithStringValue:(NSString *)string; indexOfItemWithStringValue:(NSString *)string;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
/* text completion */ /* text completion */

View file

@ -45,15 +45,15 @@
// //
- (NSFormCell*)addEntry:(NSString*)title; - (NSFormCell*)addEntry:(NSString*)title;
- (NSFormCell*)insertEntry:(NSString*)title - (NSFormCell*)insertEntry:(NSString*)title
atIndex:(int)index; atIndex:(NSInteger)index;
- (void)removeEntryAtIndex:(int)index; - (void)removeEntryAtIndex:(NSInteger)index;
- (void)setInterlineSpacing:(float)spacing; - (void)setInterlineSpacing:(float)spacing;
// //
// Finding Indices // Finding Indices
// //
- (int)indexOfCellWithTag:(int)aTag; - (NSInteger)indexOfCellWithTag:(NSInteger)aTag;
- (int)indexOfSelectedItem; - (NSInteger)indexOfSelectedItem;
// //
// Modifying Graphic Attributes // Modifying Graphic Attributes
@ -72,17 +72,17 @@
// //
// Getting a Cell // Getting a Cell
// //
- (id)cellAtIndex:(int)index; - (id)cellAtIndex:(NSInteger)index;
// //
// Displaying a Cell // Displaying a Cell
// //
- (void)drawCellAtIndex:(int)index; - (void)drawCellAtIndex:(NSInteger)index;
// //
// Editing Text // Editing Text
// //
- (void)selectTextAtIndex:(int)index; - (void)selectTextAtIndex:(NSInteger)index;
// //
// Resizing the Form // Resizing the Form

View file

@ -101,13 +101,13 @@ typedef enum _NSMatrixMode {
- (id) initWithFrame: (NSRect)frameRect - (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode mode: (int)aMode
cellClass: (Class)classId cellClass: (Class)classId
numberOfRows: (int)rowsHigh numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (int)colsWide; numberOfColumns: (NSInteger)colsWide;
- (id) initWithFrame: (NSRect)frameRect - (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode mode: (int)aMode
prototype: (NSCell *)aCell prototype: (NSCell *)aCell
numberOfRows: (int)rowsHigh numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (int)colsWide; numberOfColumns: (NSInteger)colsWide;
/* /*
* Setting the Selection Mode * Setting the Selection Mode
@ -138,49 +138,49 @@ typedef enum _NSMatrixMode {
- (void) addColumnWithCells: (NSArray *)cellArray; - (void) addColumnWithCells: (NSArray *)cellArray;
- (void) addRow; - (void) addRow;
- (void) addRowWithCells: (NSArray *)cellArray; - (void) addRowWithCells: (NSArray *)cellArray;
- (NSRect) cellFrameAtRow: (int)row - (NSRect) cellFrameAtRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
- (NSSize) cellSize; - (NSSize) cellSize;
- (void) getNumberOfRows: (int *)rowCount - (void) getNumberOfRows: (NSInteger *)rowCount
columns: (int *)columnCount; columns: (NSInteger *)columnCount;
- (void) insertColumn: (int)column; - (void) insertColumn: (NSInteger)column;
- (void) insertColumn: (int)column withCells: (NSArray *)cellArray; - (void) insertColumn: (NSInteger)column withCells: (NSArray *)cellArray;
- (void) insertRow: (int)row; - (void) insertRow: (NSInteger)row;
- (void) insertRow: (int)row withCells: (NSArray *)cellArray; - (void) insertRow: (NSInteger)row withCells: (NSArray *)cellArray;
- (NSSize) intercellSpacing; - (NSSize) intercellSpacing;
- (NSCell *) makeCellAtRow: (int)row - (NSCell *) makeCellAtRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
- (void) putCell: (NSCell *)newCell - (void) putCell: (NSCell *)newCell
atRow: (int)row atRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
- (void) removeColumn: (int)column; - (void) removeColumn: (NSInteger)column;
- (void) removeRow: (int)row; - (void) removeRow: (NSInteger)row;
- (void) renewRows: (int)newRows - (void) renewRows: (NSInteger)newRows
columns: (int)newColumns; columns: (NSInteger)newColumns;
- (void) setCellSize: (NSSize)aSize; - (void) setCellSize: (NSSize)aSize;
- (void) setIntercellSpacing: (NSSize)aSize; - (void) setIntercellSpacing: (NSSize)aSize;
- (void) sortUsingFunction: (int (*)(id element1, id element2, void *userData))comparator - (void) sortUsingFunction: (NSComparisonResult (*)(id element1, id element2, void *userData))comparator
context: (void *)context; context: (void *)context;
- (void) sortUsingSelector: (SEL)comparator; - (void) sortUsingSelector: (SEL)comparator;
- (int) numberOfColumns; - (NSInteger) numberOfColumns;
- (int) numberOfRows; - (NSInteger) numberOfRows;
/* /*
* Finding Matrix Coordinates * Finding Matrix Coordinates
*/ */
- (BOOL) getRow: (int *)row - (BOOL) getRow: (NSInteger *)row
column: (int *)column column: (NSInteger *)column
forPoint: (NSPoint)aPoint; forPoint: (NSPoint)aPoint;
- (BOOL) getRow: (int *)row - (BOOL) getRow: (NSInteger *)row
column: (int *)column column: (NSInteger *)column
ofCell: (NSCell *)aCell; ofCell: (NSCell *)aCell;
/* /*
* Modifying Individual Cells * Modifying Individual Cells
*/ */
- (void) setState: (int)value - (void) setState: (NSInteger)value
atRow: (int)row atRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
/* /*
* Selecting Cells * Selecting Cells
@ -188,24 +188,24 @@ typedef enum _NSMatrixMode {
- (void) deselectAllCells; - (void) deselectAllCells;
- (void) deselectSelectedCell; - (void) deselectSelectedCell;
- (void) selectAll: (id)sender; - (void) selectAll: (id)sender;
- (void) selectCellAtRow: (int)row - (void) selectCellAtRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
- (BOOL) selectCellWithTag: (int)anInt; - (BOOL) selectCellWithTag: (NSInteger)anInt;
- (id) selectedCell; - (id) selectedCell;
- (NSArray *) selectedCells; - (NSArray *) selectedCells;
- (NSInteger) selectedColumn; - (NSInteger) selectedColumn;
- (NSInteger) selectedRow; - (NSInteger) selectedRow;
- (void) setSelectionFrom: (int)startPos - (void) setSelectionFrom: (NSInteger)startPos
to: (int)endPos to: (NSInteger)endPos
anchor: (int)anchorPos anchor: (NSInteger)anchorPos
highlight: (BOOL)flag; highlight: (BOOL)flag;
/* /*
* Finding Cells * Finding Cells
*/ */
- (id) cellAtRow: (int)row - (id) cellAtRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
- (id) cellWithTag: (int)anInt; - (id) cellWithTag: (NSInteger)anInt;
- (NSArray *) cells; - (NSArray *) cells;
/* /*
@ -224,8 +224,8 @@ typedef enum _NSMatrixMode {
* Editing Text in Cells * Editing Text in Cells
*/ */
- (void) selectText: (id)sender; - (void) selectText: (id)sender;
- (id) selectTextAtRow: (int)row - (id) selectTextAtRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
- (void) textDidBeginEditing: (NSNotification *)aNotification; - (void) textDidBeginEditing: (NSNotification *)aNotification;
- (void) textDidChange: (NSNotification *)aNotification; - (void) textDidChange: (NSNotification *)aNotification;
- (void) textDidEndEditing: (NSNotification *)aNotification; - (void) textDidEndEditing: (NSNotification *)aNotification;
@ -262,19 +262,19 @@ typedef enum _NSMatrixMode {
* Scrolling * Scrolling
*/ */
- (BOOL) isAutoscroll; - (BOOL) isAutoscroll;
- (void) scrollCellToVisibleAtRow: (int)row - (void) scrollCellToVisibleAtRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
- (void) setAutoscroll: (BOOL)flag; - (void) setAutoscroll: (BOOL)flag;
- (void) setScrollable: (BOOL)flag; - (void) setScrollable: (BOOL)flag;
/* /*
* Displaying * Displaying
*/ */
- (void) drawCellAtRow: (int)row - (void) drawCellAtRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
- (void) highlightCell: (BOOL)flag - (void) highlightCell: (BOOL)flag
atRow: (int)row atRow: (NSInteger)row
column: (int)column; column: (NSInteger)column;
/* /*
*Target and Action *Target and Action
@ -296,7 +296,7 @@ typedef enum _NSMatrixMode {
*/ */
- (BOOL) acceptsFirstMouse: (NSEvent *)theEvent; - (BOOL) acceptsFirstMouse: (NSEvent *)theEvent;
- (void) mouseDown: (NSEvent *)theEvent; - (void) mouseDown: (NSEvent *)theEvent;
- (int) mouseDownFlags; - (NSInteger) mouseDownFlags;
- (BOOL) performKeyEquivalent: (NSEvent *)theEvent; - (BOOL) performKeyEquivalent: (NSEvent *)theEvent;
/* /*

View file

@ -65,12 +65,12 @@
* version and the transient version are on the screen. * version and the transient version are on the screen.
* A value of -1 means that no item will be highlighted. * A value of -1 means that no item will be highlighted.
*/ */
- (void) setHighlightedItemIndex: (int)index; - (void) setHighlightedItemIndex: (NSInteger)index;
/** Returns the currently highlighted item. Returns -1 /** Returns the currently highlighted item. Returns -1
* if no item is highlighted. * if no item is highlighted.
*/ */
- (int) highlightedItemIndex; - (NSInteger) highlightedItemIndex;
/** This should ensure that if there is an attached /** This should ensure that if there is an attached
* submenu this submenu will be detached. * submenu this submenu will be detached.
@ -122,7 +122,7 @@
*/ */
- (NSPoint) locationForSubmenu: (NSMenu *)aSubmenu; - (NSPoint) locationForSubmenu: (NSMenu *)aSubmenu;
- (void) performActionWithHighlightingForItemAtIndex: (int)index; //???? - (void) performActionWithHighlightingForItemAtIndex: (NSInteger)index; //????
/** <p>This is method is responsible for handling all events while /** <p>This is method is responsible for handling all events while
* the user is interacting with this menu. It should pass on this * the user is interacting with this menu. It should pass on this
@ -434,29 +434,29 @@
/** Returns the index of item anObject. /** Returns the index of item anObject.
*/ */
- (int) indexOfItem: (id <NSMenuItem>)anObject; - (NSInteger) indexOfItem: (id <NSMenuItem>)anObject;
/** Returns the index of an item with the tag aTag. /** Returns the index of an item with the tag aTag.
*/ */
- (int) indexOfItemWithTag: (int)aTag; - (NSInteger) indexOfItemWithTag: (NSInteger)aTag;
/** Returns the index of an item with the target anObject /** Returns the index of an item with the target anObject
* and the actionSelector. * and the actionSelector.
*/ */
- (int) indexOfItemWithTarget: (id)anObject - (NSInteger) indexOfItemWithTarget: (id)anObject
andAction: (SEL)actionSelector; andAction: (SEL)actionSelector;
/** Returns the index of an item with the represented object anObject. /** Returns the index of an item with the represented object anObject.
*/ */
- (int) indexOfItemWithRepresentedObject: (id)anObject; - (NSInteger) indexOfItemWithRepresentedObject: (id)anObject;
/** Returns the index of an item with the submenu anObject. /** Returns the index of an item with the submenu anObject.
*/ */
- (int) indexOfItemWithSubmenu: (NSMenu *)anObject; - (NSInteger) indexOfItemWithSubmenu: (NSMenu *)anObject;
/** Returns the index of an item with the title aTitle. /** Returns the index of an item with the title aTitle.
*/ */
- (int) indexOfItemWithTitle: (NSString *)aTitle; - (NSInteger) indexOfItemWithTitle: (NSString *)aTitle;
/** <init/> /** <init/>
*/ */
@ -465,7 +465,7 @@
/** Insert newItem at position index. /** Insert newItem at position index.
*/ */
- (void) insertItem: (id <NSMenuItem>)newItem - (void) insertItem: (id <NSMenuItem>)newItem
atIndex: (int)index; atIndex: (NSInteger)index;
/** Inserts a new menu item at position index. /** Inserts a new menu item at position index.
* <p>See Also: * <p>See Also:
@ -477,7 +477,7 @@
- (id <NSMenuItem>) insertItemWithTitle: (NSString *)aString - (id <NSMenuItem>) insertItemWithTitle: (NSString *)aString
action: (SEL)aSelector action: (SEL)aSelector
keyEquivalent: (NSString *)charCode keyEquivalent: (NSString *)charCode
atIndex: (unsigned int)index; atIndex: (NSInteger)index;
/** Returns if this menu is attached to its supermenu, /** Returns if this menu is attached to its supermenu,
* return nil if it does not have a parent menu. * return nil if it does not have a parent menu.
@ -500,7 +500,7 @@
/** Returns an item located at index. /** Returns an item located at index.
*/ */
- (id <NSMenuItem>) itemAtIndex: (int)index; - (id <NSMenuItem>) itemAtIndex: (NSInteger)index;
/** Informs the menu that the specified item has changed. /** Informs the menu that the specified item has changed.
*/ */
@ -514,7 +514,7 @@
* <item>[(NSMenuItem)-tag]</item> * <item>[(NSMenuItem)-tag]</item>
* </list> * </list>
*/ */
- (id <NSMenuItem>) itemWithTag: (int)aTag; - (id <NSMenuItem>) itemWithTag: (NSInteger)aTag;
/** Returns an item with aString as its title. /** Returns an item with aString as its title.
*/ */
@ -543,7 +543,7 @@
/** Returns the numbers of items on the menu /** Returns the numbers of items on the menu
*/ */
- (int) numberOfItems; - (NSInteger) numberOfItems;
/** Simulates a mouse click on item located at index. /** Simulates a mouse click on item located at index.
* <p>See Also: * <p>See Also:
@ -553,7 +553,7 @@
* <item>-indexOfItemWithTitle:</item> * <item>-indexOfItemWithTitle:</item>
* </list> * </list>
*/ */
- (void) performActionForItemAtIndex: (int)index; - (void) performActionForItemAtIndex: (NSInteger)index;
/** Looks for a menu item that responds to theEvent on the receiver. If /** Looks for a menu item that responds to theEvent on the receiver. If
* the receiver is a submenu, the method is performed on it. * the receiver is a submenu, the method is performed on it.
@ -566,7 +566,7 @@
/** Removes item at position index. /** Removes item at position index.
*/ */
- (void) removeItemAtIndex: (int)index; - (void) removeItemAtIndex: (NSInteger)index;
/** Sets if a menu does autoenable. /** Sets if a menu does autoenable.
*/ */
@ -665,10 +665,10 @@
#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)
@interface NSObject (NSMenuDelegate) @interface NSObject (NSMenuDelegate)
- (void) menuNeedsUpdate: (NSMenu *)menu; - (void) menuNeedsUpdate: (NSMenu *)menu;
- (int) numberOfItemsInMenu: (NSMenu *)menu; - (NSInteger) numberOfItemsInMenu: (NSMenu *)menu;
- (BOOL) menu: (NSMenu *)menu - (BOOL) menu: (NSMenu *)menu
updateItem: (NSMenuItem *)item updateItem: (NSMenuItem *)item
atIndex: (int)index atIndex: (NSInteger)index
shouldCancel: (BOOL)shouldCancel; shouldCancel: (BOOL)shouldCancel;
- (BOOL) menuHasKeyEquivalent: (NSMenu *)menu - (BOOL) menuHasKeyEquivalent: (NSMenu *)menu
forEvent: (NSEvent *)event forEvent: (NSEvent *)event

View file

@ -164,24 +164,24 @@
/** /**
Highlights item with at index. If index is -1 all highlighing is removed. Highlights item with at index. If index is -1 all highlighing is removed.
*/ */
- (void) setHighlightedItemIndex: (int)index; - (void) setHighlightedItemIndex: (NSInteger)index;
/** /**
Returns the index of the highlighted item. Returns -1 if there is no Returns the index of the highlighted item. Returns -1 if there is no
highlighted item. highlighted item.
*/ */
- (int) highlightedItemIndex; - (NSInteger) highlightedItemIndex;
/** /**
Replaces item cell at index with cell. Highlighting of item is preserved. Replaces item cell at index with cell. Highlighting of item is preserved.
*/ */
- (void) setMenuItemCell: (NSMenuItemCell *)cell - (void) setMenuItemCell: (NSMenuItemCell *)cell
forItemAtIndex: (int)index; forItemAtIndex: (NSInteger)index;
/** /**
Returns cell associated with item at index. Returns cell associated with item at index.
*/ */
- (NSMenuItemCell *) menuItemCellForItemAtIndex: (int)index; - (NSMenuItemCell *) menuItemCellForItemAtIndex: (NSInteger)index;
/** /**
Returns menu view associated with visible attached submenu. Returns menu view associated with visible attached submenu.
@ -261,7 +261,7 @@
Attach submenu if the item at index is a submenu. It will figure out Attach submenu if the item at index is a submenu. It will figure out
if the new submenu should be transient or not. if the new submenu should be transient or not.
*/ */
- (void) attachSubmenuForItemAtIndex: (int)index; - (void) attachSubmenuForItemAtIndex: (NSInteger)index;
/*********************************************************************** /***********************************************************************
* Calculating menu geometry * Calculating menu geometry
@ -333,18 +333,18 @@
Returns frame rectangle of menu item cell. It is smaller by 1 pixel Returns frame rectangle of menu item cell. It is smaller by 1 pixel
in width than menu window (dark gray border). in width than menu window (dark gray border).
*/ */
- (NSRect) rectOfItemAtIndex: (int)index; - (NSRect) rectOfItemAtIndex: (NSInteger)index;
/** /**
Returns the index of the item below point. Returns -1 if mouse is Returns the index of the item below point. Returns -1 if mouse is
not above a menu item. not above a menu item.
*/ */
- (int) indexOfItemAtPoint: (NSPoint)point; - (NSInteger) indexOfItemAtPoint: (NSPoint)point;
/** /**
Calls setNeedsDisplayInRect: for rectangle occupied by item at index. Calls setNeedsDisplayInRect: for rectangle occupied by item at index.
*/ */
- (void) setNeedsDisplayForItemAtIndex: (int)index; - (void) setNeedsDisplayForItemAtIndex: (NSInteger)index;
/** /**
Returns the correct frame origin for aSubmenu based on the location Returns the correct frame origin for aSubmenu based on the location
@ -363,12 +363,12 @@
- (void) setWindowFrameForAttachingToRect: (NSRect)screenRect - (void) setWindowFrameForAttachingToRect: (NSRect)screenRect
onScreen: (NSScreen *)screen onScreen: (NSScreen *)screen
preferredEdge: (NSRectEdge)edge preferredEdge: (NSRectEdge)edge
popUpSelectedItem: (int)selectedItemIndex; popUpSelectedItem: (NSInteger)selectedItemIndex;
/*********************************************************************** /***********************************************************************
* Event handling * Event handling
***********************************************************************/ ***********************************************************************/
- (void) performActionWithHighlightingForItemAtIndex: (int)index; - (void) performActionWithHighlightingForItemAtIndex: (NSInteger)index;
/** /**
This method is responsible for tracking the mouse while this menu This method is responsible for tracking the mouse while this menu

View file

@ -59,31 +59,31 @@
- (void)addItemWithTitle:(NSString *)title; - (void)addItemWithTitle:(NSString *)title;
- (void)addItemsWithTitles:(NSArray *)itemTitles; - (void)addItemsWithTitles:(NSArray *)itemTitles;
- (void)insertItemWithTitle:(NSString *)title - (void)insertItemWithTitle:(NSString *)title
atIndex:(int)index; atIndex:(NSInteger)index;
- (void)removeAllItems; - (void)removeAllItems;
- (void)removeItemWithTitle:(NSString *)title; - (void)removeItemWithTitle:(NSString *)title;
- (void)removeItemAtIndex:(int)index; - (void)removeItemAtIndex:(NSInteger)index;
- (id <NSMenuItem>)selectedItem; - (id <NSMenuItem>)selectedItem;
- (NSString *)titleOfSelectedItem; - (NSString *)titleOfSelectedItem;
- (int)indexOfSelectedItem; - (NSInteger)indexOfSelectedItem;
- (void)selectItem:(id <NSMenuItem>)anObject; - (void)selectItem:(id <NSMenuItem>)anObject;
- (void)selectItemAtIndex:(int)index; - (void)selectItemAtIndex:(NSInteger)index;
- (void)selectItemWithTitle:(NSString *)title; - (void)selectItemWithTitle:(NSString *)title;
#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)
- (BOOL) selectItemWithTag: (NSInteger)tag; - (BOOL) selectItemWithTag: (NSInteger)tag;
#endif #endif
- (int)numberOfItems; - (NSInteger)numberOfItems;
- (NSArray *)itemArray; - (NSArray *)itemArray;
- (id <NSMenuItem>)itemAtIndex:(int)index; - (id <NSMenuItem>)itemAtIndex:(NSInteger)index;
- (NSString *)itemTitleAtIndex:(int)index; - (NSString *)itemTitleAtIndex:(NSInteger)index;
- (NSArray *)itemTitles; - (NSArray *)itemTitles;
- (id <NSMenuItem>)itemWithTitle:(NSString *)title; - (id <NSMenuItem>)itemWithTitle:(NSString *)title;
- (id <NSMenuItem>)lastItem; - (id <NSMenuItem>)lastItem;
- (int)indexOfItem:(id <NSMenuItem>)anObject; - (NSInteger)indexOfItem:(id <NSMenuItem>)anObject;
- (int)indexOfItemWithTag:(int)tag; - (NSInteger)indexOfItemWithTag:(NSInteger)tag;
- (int)indexOfItemWithTitle:(NSString *)title; - (NSInteger)indexOfItemWithTitle:(NSString *)title;
- (int)indexOfItemWithRepresentedObject:(id)anObject; - (NSInteger)indexOfItemWithRepresentedObject:(id)anObject;
- (int)indexOfItemWithTarget:(id)target - (NSInteger)indexOfItemWithTarget:(id)target
andAction:(SEL)actionSelector; andAction:(SEL)actionSelector;
- (void)setPreferredEdge:(NSRectEdge)edge; - (void)setPreferredEdge:(NSRectEdge)edge;
- (NSRectEdge)preferredEdge; - (NSRectEdge)preferredEdge;

View file

@ -74,7 +74,7 @@ typedef enum {
/** /**
* Index of the currently selected item in the reciever. * Index of the currently selected item in the reciever.
*/ */
- (int) indexOfSelectedItem; - (NSInteger) indexOfSelectedItem;
/** /**
* Synchronizes the title and the selected item. This sets * Synchronizes the title and the selected item. This sets
@ -90,7 +90,7 @@ typedef enum {
/** /**
* Select item at the given index. * Select item at the given index.
*/ */
- (void) selectItemAtIndex: (int)index; - (void) selectItemAtIndex: (NSInteger)index;
/** /**
* Select the item with the given title. * Select the item with the given title.
@ -194,7 +194,7 @@ typedef enum {
* index, it, and all items after it are advanced one position. Index needs * index, it, and all items after it are advanced one position. Index needs
* to be within the valid range for the array of items in the popup button. * to be within the valid range for the array of items in the popup button.
*/ */
- (void) insertItemWithTitle: (NSString*)title atIndex: (int)index; - (void) insertItemWithTitle: (NSString*)title atIndex: (NSInteger)index;
/** /**
* Remove a given item based on its title. * Remove a given item based on its title.
@ -205,7 +205,7 @@ typedef enum {
* Remove a given item based on its index, must be a valid index within the * Remove a given item based on its index, must be a valid index within the
* range for the item array of this popup. * range for the item array of this popup.
*/ */
- (void) removeItemAtIndex: (int)index; - (void) removeItemAtIndex: (NSInteger)index;
/** /**
* Purges all items from the popup. * Purges all items from the popup.
@ -221,38 +221,38 @@ typedef enum {
/** /**
* Number of items in the reciever. * Number of items in the reciever.
*/ */
- (int) numberOfItems; - (NSInteger) numberOfItems;
/** /**
* Return the index of item in the item array of the reciever. * Return the index of item in the item array of the reciever.
*/ */
- (int) indexOfItem: (id<NSMenuItem>)item; - (NSInteger) indexOfItem: (id<NSMenuItem>)item;
/** /**
* Return index of the item with the given title. * Return index of the item with the given title.
*/ */
- (int) indexOfItemWithTitle: (NSString*)title; - (NSInteger) indexOfItemWithTitle: (NSString*)title;
/** /**
* Return index of the item with a tag equal to aTag. * Return index of the item with a tag equal to aTag.
*/ */
- (int) indexOfItemWithTag: (int)tag; - (NSInteger) indexOfItemWithTag: (NSInteger)tag;
/** /**
* Index of the item whose menu item's representedObject is equal to obj. * Index of the item whose menu item's representedObject is equal to obj.
*/ */
- (int) indexOfItemWithRepresentedObject: (id)obj; - (NSInteger) indexOfItemWithRepresentedObject: (id)obj;
/** /**
* Index of the item in the reciever whose target and action * Index of the item in the reciever whose target and action
* are equal to aTarget and actionSelector. * are equal to aTarget and actionSelector.
*/ */
- (int) indexOfItemWithTarget: (id)aTarget andAction: (SEL)actionSelector; - (NSInteger) indexOfItemWithTarget: (id)aTarget andAction: (SEL)actionSelector;
/** /**
* Return the item at index. * Return the item at index.
*/ */
- (id <NSMenuItem>) itemAtIndex: (int)index; - (id <NSMenuItem>) itemAtIndex: (NSInteger)index;
/** /**
* Return the item with title. * Return the item with title.
@ -269,7 +269,7 @@ typedef enum {
/** /**
* Set item title at the given index in the reciever. * Set item title at the given index in the reciever.
*/ */
- (NSString*) itemTitleAtIndex: (int)index; - (NSString*) itemTitleAtIndex: (NSInteger)index;
/** /**
* Returns an array containing all of the current item titles. * Returns an array containing all of the current item titles.

View file

@ -1088,7 +1088,7 @@ static NSTextFieldCell *titleCell;
selectedCellsEnumerator = [selectedCells objectEnumerator]; selectedCellsEnumerator = [selectedCells objectEnumerator];
while ((cell = [selectedCellsEnumerator nextObject]) != nil) while ((cell = [selectedCellsEnumerator nextObject]) != nil)
{ {
int sRow, sColumn; NSInteger sRow, sColumn;
if ([matrix getRow: &sRow column: &sColumn ofCell: cell]) if ([matrix getRow: &sRow column: &sColumn ofCell: cell])
{ {

View file

@ -159,7 +159,7 @@ static NSNotificationCenter *nc;
* Returns the maximum number of allowed items to be displayed in the combo box * Returns the maximum number of allowed items to be displayed in the combo box
* cell list. * cell list.
*/ */
- (int)numberOfVisibleItems - (NSInteger)numberOfVisibleItems
{ {
return [_cell numberOfVisibleItems]; return [_cell numberOfVisibleItems];
} }
@ -168,7 +168,7 @@ static NSNotificationCenter *nc;
* Sets the maximum number of allowed items to be displayed in the combo box * Sets the maximum number of allowed items to be displayed in the combo box
* cell list. * cell list.
*/ */
- (void)setNumberOfVisibleItems:(int)visibleItems - (void)setNumberOfVisibleItems:(NSInteger)visibleItems
{ {
[_cell setNumberOfVisibleItems:visibleItems]; [_cell setNumberOfVisibleItems:visibleItems];
} }
@ -222,7 +222,7 @@ static NSNotificationCenter *nc;
* <var>index</var> in the closest position relative to the top. There is no * <var>index</var> in the closest position relative to the top. There is no
* need to have the list displayed when this method is invoked. * need to have the list displayed when this method is invoked.
*/ */
- (void)scrollItemAtIndexToTop:(int)index - (void)scrollItemAtIndexToTop:(NSInteger)index
{ {
[_cell scrollItemAtIndexToTop:index]; [_cell scrollItemAtIndexToTop:index];
} }
@ -232,7 +232,7 @@ static NSNotificationCenter *nc;
* <var>index</var> visible. There is no need to have the list displayed when * <var>index</var> visible. There is no need to have the list displayed when
* this method is invoked. * this method is invoked.
*/ */
- (void)scrollItemAtIndexToVisible:(int)index - (void)scrollItemAtIndexToVisible:(NSInteger)index
{ {
[_cell scrollItemAtIndexToVisible:index]; [_cell scrollItemAtIndexToVisible:index];
} }
@ -244,7 +244,7 @@ static NSNotificationCenter *nc;
* Posts an NSComboBoxSelectionDidChangeNotification to the default notification * Posts an NSComboBoxSelectionDidChangeNotification to the default notification
* center when there is a new selection different from the previous one. * center when there is a new selection different from the previous one.
*/ */
- (void)selectItemAtIndex:(int)index - (void)selectItemAtIndex:(NSInteger)index
{ {
[_cell selectItemAtIndex:index]; [_cell selectItemAtIndex:index];
} }
@ -255,7 +255,7 @@ static NSNotificationCenter *nc;
* Posts an NSComboBoxSelectionDidChangeNotification to the default notification * Posts an NSComboBoxSelectionDidChangeNotification to the default notification
* center, when there is a new selection. * center, when there is a new selection.
*/ */
- (void)deselectItemAtIndex:(int)index - (void)deselectItemAtIndex:(NSInteger)index
{ {
[_cell deselectItemAtIndex:index]; [_cell deselectItemAtIndex:index];
} }
@ -266,7 +266,7 @@ static NSNotificationCenter *nc;
* object in the case <code>usesDataSource</code> returns YES else to the * object in the case <code>usesDataSource</code> returns YES else to the
* default items list. * default items list.
*/ */
- (int)indexOfSelectedItem - (NSInteger)indexOfSelectedItem
{ {
return [_cell indexOfSelectedItem]; return [_cell indexOfSelectedItem];
} }
@ -276,7 +276,7 @@ static NSNotificationCenter *nc;
* items can be be related to the data source object in the case * items can be be related to the data source object in the case
* <code>usesDataSource</code> returns YES else to the default items list. * <code>usesDataSource</code> returns YES else to the default items list.
*/ */
- (int)numberOfItems - (NSInteger)numberOfItems
{ {
return [_cell numberOfItems]; return [_cell numberOfItems];
} }
@ -332,7 +332,7 @@ static NSNotificationCenter *nc;
* is used when <code>usesDataSource</code> returns NO. In the case * is used when <code>usesDataSource</code> returns NO. In the case
* <code>usesDataSource</code> returns YES, this method logs a warning. * <code>usesDataSource</code> returns YES, this method logs a warning.
*/ */
- (void)insertItemWithObjectValue:(id)object atIndex:(int)index - (void)insertItemWithObjectValue:(id)object atIndex:(NSInteger)index
{ {
[_cell insertItemWithObjectValue:object atIndex:index]; [_cell insertItemWithObjectValue:object atIndex:index];
} }
@ -352,7 +352,7 @@ static NSNotificationCenter *nc;
* default items list which is used when <code>usesDataSource</code> returns NO. * default items list which is used when <code>usesDataSource</code> returns NO.
* In the case <code>usesDataSource</code> returns YES, this method logs a warning. * In the case <code>usesDataSource</code> returns YES, this method logs a warning.
*/ */
- (void)removeItemAtIndex:(int)index - (void)removeItemAtIndex:(NSInteger)index
{ {
[_cell removeItemAtIndex:index]; [_cell removeItemAtIndex:index];
} }
@ -387,7 +387,7 @@ static NSNotificationCenter *nc;
* raised. In the case <code>usesDataSource</code> returns YES, this method logs * raised. In the case <code>usesDataSource</code> returns YES, this method logs
* a warning. * a warning.
*/ */
- (id)itemObjectValueAtIndex:(int)index - (id)itemObjectValueAtIndex:(NSInteger)index
{ {
return [_cell itemObjectValueAtIndex:index]; return [_cell itemObjectValueAtIndex:index];
} }
@ -408,7 +408,7 @@ static NSNotificationCenter *nc;
* NSNotFound when there is no such value. In the case * NSNotFound when there is no such value. In the case
* <code>usesDataSource</code> returns YES, this method logs a warning. * <code>usesDataSource</code> returns YES, this method logs a warning.
*/ */
- (int)indexOfItemWithObjectValue:(id)object - (NSInteger)indexOfItemWithObjectValue:(id)object
{ {
return [_cell indexOfItemWithObjectValue:object]; return [_cell indexOfItemWithObjectValue:object];
} }

View file

@ -87,10 +87,10 @@ static NSNotificationCenter *nc;
- (void) clickItem: (id)sender; - (void) clickItem: (id)sender;
- (void) reloadData; - (void) reloadData;
- (void) noteNumberOfItemsChanged; - (void) noteNumberOfItemsChanged;
- (void) scrollItemAtIndexToTop: (int)index; - (void) scrollItemAtIndexToTop: (NSInteger)index;
- (void) scrollItemAtIndexToVisible: (int)index; - (void) scrollItemAtIndexToVisible: (NSInteger)index;
- (void) selectItemAtIndex: (int)index; - (void) selectItemAtIndex: (NSInteger)index;
- (void) deselectItemAtIndex: (int)index; - (void) deselectItemAtIndex: (NSInteger)index;
- (void) moveUpSelection; - (void) moveUpSelection;
- (void) moveDownSelection; - (void) moveDownSelection;
- (void) validateSelection; - (void) validateSelection;
@ -463,7 +463,7 @@ static GSComboWindow *gsWindow = nil;
[self reloadData]; [self reloadData];
} }
- (void) scrollItemAtIndexToTop: (int)index - (void) scrollItemAtIndexToTop: (NSInteger)index
{ {
NSRect rect; NSRect rect;
@ -471,12 +471,12 @@ static GSComboWindow *gsWindow = nil;
[_tableView scrollPoint: rect.origin]; [_tableView scrollPoint: rect.origin];
} }
- (void) scrollItemAtIndexToVisible: (int)index - (void) scrollItemAtIndexToVisible: (NSInteger)index
{ {
[_tableView scrollRowToVisible: index]; [_tableView scrollRowToVisible: index];
} }
- (void) selectItemAtIndex: (int)index - (void) selectItemAtIndex: (NSInteger)index
{ {
if (index < 0) if (index < 0)
return; return;
@ -487,7 +487,7 @@ static GSComboWindow *gsWindow = nil;
[_tableView selectRow: index byExtendingSelection: NO]; [_tableView selectRow: index byExtendingSelection: NO];
} }
- (void) deselectItemAtIndex: (int)index - (void) deselectItemAtIndex: (NSInteger)index
{ {
[_tableView deselectAll: self]; [_tableView deselectAll: self];
} }
@ -750,7 +750,7 @@ static GSComboWindow *gsWindow = nil;
* Returns the maximum number of allowed items to be displayed in the combo box * Returns the maximum number of allowed items to be displayed in the combo box
* cell list. * cell list.
*/ */
- (int) numberOfVisibleItems - (NSInteger) numberOfVisibleItems
{ {
return _visibleItems; return _visibleItems;
} }
@ -759,7 +759,7 @@ static GSComboWindow *gsWindow = nil;
* Sets the maximum number of allowed items to be displayed in the combo box * Sets the maximum number of allowed items to be displayed in the combo box
* cell list. * cell list.
*/ */
- (void) setNumberOfVisibleItems: (int)visibleItems - (void) setNumberOfVisibleItems: (NSInteger)visibleItems
{ {
if (visibleItems > 10) if (visibleItems > 10)
_visibleItems = visibleItems; _visibleItems = visibleItems;
@ -814,7 +814,7 @@ static GSComboWindow *gsWindow = nil;
* <var>index</var> in the closest position relative to the top. There is no * <var>index</var> in the closest position relative to the top. There is no
* need to have the list displayed when this method is invoked. * need to have the list displayed when this method is invoked.
*/ */
- (void) scrollItemAtIndexToTop: (int)index - (void) scrollItemAtIndexToTop: (NSInteger)index
{ {
[_popup scrollItemAtIndexToTop: index]; [_popup scrollItemAtIndexToTop: index];
} }
@ -824,7 +824,7 @@ static GSComboWindow *gsWindow = nil;
* <var>index</var> visible. There is no need to have the list displayed when * <var>index</var> visible. There is no need to have the list displayed when
* this method is invoked. * this method is invoked.
*/ */
- (void) scrollItemAtIndexToVisible: (int)index - (void) scrollItemAtIndexToVisible: (NSInteger)index
{ {
[_popup scrollItemAtIndexToVisible: index]; [_popup scrollItemAtIndexToVisible: index];
} }
@ -836,7 +836,7 @@ static GSComboWindow *gsWindow = nil;
* Posts an NSComboBoxSelectionDidChangeNotification to the default notification * Posts an NSComboBoxSelectionDidChangeNotification to the default notification
* center when there is a new selection different from the previous one. * center when there is a new selection different from the previous one.
*/ */
- (void) selectItemAtIndex: (int)index - (void) selectItemAtIndex: (NSInteger)index
{ {
// Method called by GSComboWindow when a selection is done in the table view or // Method called by GSComboWindow when a selection is done in the table view or
// the browser // the browser
@ -865,7 +865,7 @@ static GSComboWindow *gsWindow = nil;
* Posts an NSComboBoxSelectionDidChangeNotification to the default notification * Posts an NSComboBoxSelectionDidChangeNotification to the default notification
* center, when there is a new selection. * center, when there is a new selection.
*/ */
- (void) deselectItemAtIndex: (int)index - (void) deselectItemAtIndex: (NSInteger)index
{ {
if (_selectedItem == index) if (_selectedItem == index)
{ {
@ -885,7 +885,7 @@ static GSComboWindow *gsWindow = nil;
* object in the case <code>usesDataSource</code> returns YES else to the * object in the case <code>usesDataSource</code> returns YES else to the
* default items list. * default items list.
*/ */
- (int) indexOfSelectedItem - (NSInteger) indexOfSelectedItem
{ {
return _selectedItem; return _selectedItem;
} }
@ -895,7 +895,7 @@ static GSComboWindow *gsWindow = nil;
* items can be be related to the data source object in the case * items can be be related to the data source object in the case
* <code>usesDataSource</code> returns YES else to the default items list. * <code>usesDataSource</code> returns YES else to the default items list.
*/ */
- (int) numberOfItems - (NSInteger) numberOfItems
{ {
if (_usesDataSource) if (_usesDataSource)
{ {
@ -1002,7 +1002,7 @@ static GSComboWindow *gsWindow = nil;
* is used when <code>usesDataSource</code> returns NO. In the case * is used when <code>usesDataSource</code> returns NO. In the case
* <code>usesDataSource</code> returns YES, this method logs a warning. * <code>usesDataSource</code> returns YES, this method logs a warning.
*/ */
- (void) insertItemWithObjectValue: (id)object atIndex: (int)index - (void) insertItemWithObjectValue: (id)object atIndex: (NSInteger)index
{ {
if (_usesDataSource) if (_usesDataSource)
{ {
@ -1042,7 +1042,7 @@ static GSComboWindow *gsWindow = nil;
* default items list which is used when <code>usesDataSource</code> returns NO. * default items list which is used when <code>usesDataSource</code> returns NO.
* In the case <code>usesDataSource</code> returns YES, this method logs a warning. * In the case <code>usesDataSource</code> returns YES, this method logs a warning.
*/ */
- (void) removeItemAtIndex: (int)index - (void) removeItemAtIndex: (NSInteger)index
{ {
if (_usesDataSource) if (_usesDataSource)
{ {
@ -1110,7 +1110,7 @@ static GSComboWindow *gsWindow = nil;
* raised. In the case <code>usesDataSource</code> returns YES, this method logs * raised. In the case <code>usesDataSource</code> returns YES, this method logs
* a warning. * a warning.
*/ */
- (id) itemObjectValueAtIndex: (int)index - (id) itemObjectValueAtIndex: (NSInteger)index
{ {
if (_usesDataSource) if (_usesDataSource)
{ {
@ -1201,7 +1201,7 @@ static GSComboWindow *gsWindow = nil;
* NSNotFound when there is no such value. In the case * NSNotFound when there is no such value. In the case
* <code>usesDataSource</code> returns YES, this method logs a warning. * <code>usesDataSource</code> returns YES, this method logs a warning.
*/ */
- (int) indexOfItemWithObjectValue: (id)object - (NSInteger) indexOfItemWithObjectValue: (id)object
{ {
if (_usesDataSource) if (_usesDataSource)
{ {

View file

@ -61,14 +61,14 @@ static Class defaultCellClass = nil;
- (id) initWithFrame: (NSRect)frameRect - (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode mode: (int)aMode
cellClass: (Class)class cellClass: (Class)class
numberOfRows: (int)rowsHigh numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (int)colsWide numberOfColumns: (NSInteger)colsWide
{ {
self = [super initWithFrame: (NSRect)frameRect self = [super initWithFrame: (NSRect)frameRect
mode: (int)aMode mode: (int)aMode
cellClass: (Class)class cellClass: (Class)class
numberOfRows: (int)rowsHigh numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (int)colsWide]; numberOfColumns: (NSInteger)colsWide];
if (nil == self) if (nil == self)
return nil; return nil;
@ -79,14 +79,14 @@ static Class defaultCellClass = nil;
- (id) initWithFrame: (NSRect)frameRect - (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode mode: (int)aMode
prototype: (NSCell*)prototype prototype: (NSCell*)prototype
numberOfRows: (int)rowsHigh numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (int)colsWide numberOfColumns: (NSInteger)colsWide
{ {
self = [super initWithFrame: (NSRect)frameRect self = [super initWithFrame: (NSRect)frameRect
mode: (int)aMode mode: (int)aMode
prototype: (NSCell*)prototype prototype: (NSCell*)prototype
numberOfRows: (int)rowsHigh numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (int)colsWide]; numberOfColumns: (NSInteger)colsWide];
if (nil == self) if (nil == self)
return nil; return nil;
@ -108,7 +108,7 @@ static Class defaultCellClass = nil;
<p>See Also: -addEntry: -removeEntryAtIndex:</p> <p>See Also: -addEntry: -removeEntryAtIndex:</p>
*/ */
- (NSFormCell*) insertEntry: (NSString*)title - (NSFormCell*) insertEntry: (NSString*)title
atIndex: (int)index atIndex: (NSInteger)index
{ {
NSFormCell *new_cell = [[[object_getClass(self) cellClass] alloc] initTextCell: title]; NSFormCell *new_cell = [[[object_getClass(self) cellClass] alloc] initTextCell: title];
@ -122,7 +122,7 @@ static Class defaultCellClass = nil;
/** <p>Removes the entry at index index. </p> /** <p>Removes the entry at index index. </p>
<p>See Also: -insertEntry:atIndex: -addEntry:</p> <p>See Also: -insertEntry:atIndex: -addEntry:</p>
*/ */
- (void) removeEntryAtIndex: (int)index - (void) removeEntryAtIndex: (NSInteger)index
{ {
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
removeObserver: self removeObserver: self
@ -134,7 +134,7 @@ static Class defaultCellClass = nil;
/* Overriding this method allows decoding stuff to be inherited /* Overriding this method allows decoding stuff to be inherited
simpler by NSForm */ simpler by NSForm */
- (void) putCell: (NSCell*)newCell atRow: (int)row column: (int)column - (void) putCell: (NSCell*)newCell atRow: (NSInteger)row column: (NSInteger)column
{ {
if (column > 0) if (column > 0)
{ {
@ -167,7 +167,7 @@ static Class defaultCellClass = nil;
*/ */
- (void) setBezeled: (BOOL)flag - (void) setBezeled: (BOOL)flag
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
/* Set the bezeled attribute to the cell prototype */ /* Set the bezeled attribute to the cell prototype */
[[self prototype] setBezeled: flag]; [[self prototype] setBezeled: flag];
@ -181,7 +181,7 @@ static Class defaultCellClass = nil;
*/ */
- (void) setBordered: (BOOL)flag - (void) setBordered: (BOOL)flag
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
/* Set the bordered attribute to the cell prototype */ /* Set the bordered attribute to the cell prototype */
[[self prototype] setBordered: flag]; [[self prototype] setBordered: flag];
@ -230,7 +230,7 @@ static Class defaultCellClass = nil;
*/ */
- (void) setTitleAlignment: (NSTextAlignment)aMode - (void) setTitleAlignment: (NSTextAlignment)aMode
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
/* Set the title alignment attribute to the cell prototype */ /* Set the title alignment attribute to the cell prototype */
[[self prototype] setTitleAlignment: aMode]; [[self prototype] setTitleAlignment: aMode];
@ -246,7 +246,7 @@ static Class defaultCellClass = nil;
*/ */
- (void) setTextAlignment: (int)aMode - (void) setTextAlignment: (int)aMode
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
/* Set the text alignment attribute to the cell prototype */ /* Set the text alignment attribute to the cell prototype */
[[self prototype] setAlignment: aMode]; [[self prototype] setAlignment: aMode];
@ -260,7 +260,7 @@ static Class defaultCellClass = nil;
*/ */
- (void) setTitleFont: (NSFont*)fontObject - (void) setTitleFont: (NSFont*)fontObject
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
/* Set the title font attribute to the cell prototype */ /* Set the title font attribute to the cell prototype */
[[self prototype] setTitleFont: fontObject]; [[self prototype] setTitleFont: fontObject];
@ -274,7 +274,7 @@ static Class defaultCellClass = nil;
*/ */
- (void) setTextFont: (NSFont*)fontObject - (void) setTextFont: (NSFont*)fontObject
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
/* Set the text font attribute to the cell prototype */ /* Set the text font attribute to the cell prototype */
[[self prototype] setFont: fontObject]; [[self prototype] setFont: fontObject];
@ -288,7 +288,7 @@ static Class defaultCellClass = nil;
*/ */
- (void) setTitleBaseWritingDirection: (NSWritingDirection)direction - (void) setTitleBaseWritingDirection: (NSWritingDirection)direction
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
/* Set the writing direction attribute to the cell prototype */ /* Set the writing direction attribute to the cell prototype */
[[self prototype] setTitleBaseWritingDirection: direction]; [[self prototype] setTitleBaseWritingDirection: direction];
@ -302,7 +302,7 @@ static Class defaultCellClass = nil;
*/ */
- (void) setTextBaseWritingDirection: (NSWritingDirection)direction - (void) setTextBaseWritingDirection: (NSWritingDirection)direction
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
/* Set the writing direction attribute to the cell prototype */ /* Set the writing direction attribute to the cell prototype */
[[self prototype] setBaseWritingDirection: direction]; [[self prototype] setBaseWritingDirection: direction];
@ -314,9 +314,9 @@ static Class defaultCellClass = nil;
/**<p>Returns the index of the entry specified by aTag or -1 if aTag is not /**<p>Returns the index of the entry specified by aTag or -1 if aTag is not
found in entries.</p><p>See Also: [NSMatrix-cellAtRow:column:]</p> found in entries.</p><p>See Also: [NSMatrix-cellAtRow:column:]</p>
*/ */
- (int) indexOfCellWithTag: (int)aTag - (NSInteger) indexOfCellWithTag: (NSInteger)aTag
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
if ([[self cellAtRow: i column: 0] tag] == aTag) if ([[self cellAtRow: i column: 0] tag] == aTag)
@ -327,7 +327,7 @@ static Class defaultCellClass = nil;
/**<p>Returns the index of the current selected entry.</p> /**<p>Returns the index of the current selected entry.</p>
<p>[NSMatrix-selectedRow]</p> <p>[NSMatrix-selectedRow]</p>
*/ */
- (int) indexOfSelectedItem - (NSInteger) indexOfSelectedItem
{ {
return [self selectedRow]; return [self selectedRow];
} }
@ -335,7 +335,7 @@ static Class defaultCellClass = nil;
/**<p>Returns the NSFormCell at index <var>index</var></p> /**<p>Returns the NSFormCell at index <var>index</var></p>
<p>See Also: [NSMatrix-cellAtRow:column:]</p> <p>See Also: [NSMatrix-cellAtRow:column:]</p>
*/ */
- (id) cellAtIndex: (int)index - (id) cellAtIndex: (NSInteger)index
{ {
return [self cellAtRow: index column: 0]; return [self cellAtRow: index column: 0];
} }
@ -355,7 +355,7 @@ static Class defaultCellClass = nil;
- (void) calcSize - (void) calcSize
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
float new_title_width = 0; float new_title_width = 0;
float candidate_title_width = 0; float candidate_title_width = 0;
NSRect rect; NSRect rect;
@ -389,7 +389,7 @@ static Class defaultCellClass = nil;
<p>See Also: -cellAtIndex: [NSCell-drawWithFrame:inView:] <p>See Also: -cellAtIndex: [NSCell-drawWithFrame:inView:]
[NSMatrix-cellFrameAtRow:column:]</p> [NSMatrix-cellFrameAtRow:column:]</p>
*/ */
- (void) drawCellAtIndex: (int)index - (void) drawCellAtIndex: (NSInteger)index
{ {
id theCell = [self cellAtIndex: index]; id theCell = [self cellAtIndex: index];
@ -397,7 +397,7 @@ static Class defaultCellClass = nil;
inView: self]; inView: self];
} }
- (void) drawCellAtRow: (int)row column: (int)column - (void) drawCellAtRow: (NSInteger)row column: (NSInteger)column
{ {
[self drawCellAtIndex: row]; [self drawCellAtIndex: row];
} }
@ -405,7 +405,7 @@ static Class defaultCellClass = nil;
/** <p>Selects the text in the entry specified by index.</p> /** <p>Selects the text in the entry specified by index.</p>
<p>[NSMatrix-selectTextAtRow:column:]</p> <p>[NSMatrix-selectTextAtRow:column:]</p>
*/ */
- (void) selectTextAtIndex: (int)index - (void) selectTextAtIndex: (NSInteger)index
{ {
[self selectTextAtRow: index column: 0]; [self selectTextAtRow: index column: 0];
} }

View file

@ -344,8 +344,8 @@ static SEL getSel;
- (id) initWithFrame: (NSRect)frameRect - (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode mode: (int)aMode
cellClass: (Class)classId cellClass: (Class)classId
numberOfRows: (int)rowsHigh numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (int)colsWide numberOfColumns: (NSInteger)colsWide
{ {
if ( ! ( self = [super initWithFrame: frameRect] ) ) if ( ! ( self = [super initWithFrame: frameRect] ) )
return nil; return nil;
@ -367,8 +367,8 @@ static SEL getSel;
- (id) initWithFrame: (NSRect)frameRect - (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode mode: (int)aMode
prototype: (NSCell*)aCell prototype: (NSCell*)aCell
numberOfRows: (int)rowsHigh numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (int)colsWide numberOfColumns: (NSInteger)colsWide
{ {
if (! ( self = [super initWithFrame: frameRect] ) ) if (! ( self = [super initWithFrame: frameRect] ) )
return nil; return nil;
@ -457,7 +457,7 @@ static SEL getSel;
/**<p>Inserts a new column at the specified column <var>column</var>.</p> /**<p>Inserts a new column at the specified column <var>column</var>.</p>
<p>See Also: -insertColumn:withCells:</p> <p>See Also: -insertColumn:withCells:</p>
*/ */
- (void) insertColumn: (int)column - (void) insertColumn: (NSInteger)column
{ {
[self insertColumn: column withCells: nil]; [self insertColumn: column withCells: nil];
} }
@ -467,7 +467,7 @@ static SEL getSel;
the matrix as necessay if needed</p> the matrix as necessay if needed</p>
<p>See Also: -insertColumn:</p> <p>See Also: -insertColumn:</p>
*/ */
- (void) insertColumn: (int)column withCells: (NSArray*)cellArray - (void) insertColumn: (NSInteger)column withCells: (NSArray*)cellArray
{ {
int count = [cellArray count]; int count = [cellArray count];
int i = _numCols + 1; int i = _numCols + 1;
@ -476,10 +476,10 @@ static SEL getSel;
{ {
column = 0; column = 0;
#if NSMATRIX_STRICT_CHECKING == 0 #if NSMATRIX_STRICT_CHECKING == 0
NSLog(@"insert negative column (%d) in matrix", column); NSLog(@"insert negative column (%d) in matrix", (int)column);
#else #else
[NSException raise: NSRangeException [NSException raise: NSRangeException
format: @"insert negative column (%d) in matrix", column]; format: @"insert negative column (%d) in matrix", (int)column];
#endif #endif
} }
@ -554,7 +554,7 @@ static SEL getSel;
/**<p>Inserts a new row at index <var>row</var>.</p> /**<p>Inserts a new row at index <var>row</var>.</p>
<p>See Also: -insertRow:withCells: </p> <p>See Also: -insertRow:withCells: </p>
*/ */
- (void) insertRow: (int)row - (void) insertRow: (NSInteger)row
{ {
[self insertRow: row withCells: nil]; [self insertRow: row withCells: nil];
} }
@ -564,7 +564,7 @@ static SEL getSel;
the matrix as necessay if needed</p> the matrix as necessay if needed</p>
<p>See Also: -insertColumn:</p> <p>See Also: -insertColumn:</p>
*/ */
- (void) insertRow: (int)row withCells: (NSArray*)cellArray - (void) insertRow: (NSInteger)row withCells: (NSArray*)cellArray
{ {
int count = [cellArray count]; int count = [cellArray count];
int i = _numRows + 1; int i = _numRows + 1;
@ -573,10 +573,10 @@ static SEL getSel;
{ {
row = 0; row = 0;
#if NSMATRIX_STRICT_CHECKING == 0 #if NSMATRIX_STRICT_CHECKING == 0
NSLog(@"insert negative row (%d) in matrix", row); NSLog(@"insert negative row (%d) in matrix", (int)row);
#else #else
[NSException raise: NSRangeException [NSException raise: NSRangeException
format: @"insert negative row (%d) in matrix", row]; format: @"insert negative row (%d) in matrix", (int)row];
#endif #endif
} }
@ -647,8 +647,8 @@ static SEL getSel;
/**<p>Makes and returns new cell at row <var>row</var> and /**<p>Makes and returns new cell at row <var>row</var> and
column <var>column</var>.</p> column <var>column</var>.</p>
*/ */
- (NSCell*) makeCellAtRow: (int)row - (NSCell*) makeCellAtRow: (NSInteger)row
column: (int)column column: (NSInteger)column
{ {
NSCell *aCell; NSCell *aCell;
@ -677,8 +677,8 @@ static SEL getSel;
/** <p>Returns the rectangle of the cell at row <var>row</var> and column /** <p>Returns the rectangle of the cell at row <var>row</var> and column
<var>column</var></p> <var>column</var></p>
*/ */
- (NSRect) cellFrameAtRow: (int)row - (NSRect) cellFrameAtRow: (NSInteger)row
column: (int)column column: (NSInteger)column
{ {
NSRect rect; NSRect rect;
@ -691,8 +691,8 @@ static SEL getSel;
/**<p>Gets the number of rows and columns of the NSMatrix</p> /**<p>Gets the number of rows and columns of the NSMatrix</p>
<p>See Also: -numberOfColumns -numberOfRows</p> <p>See Also: -numberOfColumns -numberOfRows</p>
*/ */
- (void) getNumberOfRows: (int*)rowCount - (void) getNumberOfRows: (NSInteger*)rowCount
columns: (int*)columnCount columns: (NSInteger*)columnCount
{ {
*rowCount = _numRows; *rowCount = _numRows;
*columnCount = _numCols; *columnCount = _numCols;
@ -704,8 +704,8 @@ static SEL getSel;
are out of range.</p> are out of range.</p>
*/ */
- (void) putCell: (NSCell*)newCell - (void) putCell: (NSCell*)newCell
atRow: (int)row atRow: (NSInteger)row
column: (int)column column: (NSInteger)column
{ {
if (row < 0 || row >= _numRows || column < 0 || column >= _numCols) if (row < 0 || row >= _numRows || column < 0 || column >= _numCols)
{ {
@ -727,7 +727,7 @@ static SEL getSel;
/**<p>Removes the NSMatrix's column at index <var>column</var></p> /**<p>Removes the NSMatrix's column at index <var>column</var></p>
<p>See Also: -removeRow:</p> <p>See Also: -removeRow:</p>
*/ */
- (void) removeColumn: (int)column - (void) removeColumn: (NSInteger)column
{ {
if (column >= 0 && column < _numCols) if (column >= 0 && column < _numCols)
{ {
@ -768,10 +768,10 @@ static SEL getSel;
else else
{ {
#if NSMATRIX_STRICT_CHECKING == 0 #if NSMATRIX_STRICT_CHECKING == 0
NSLog(@"remove non-existent column (%d) from matrix", column); NSLog(@"remove non-existent column (%d) from matrix", (int) column);
#else #else
[NSException raise: NSRangeException [NSException raise: NSRangeException
format: @"remove non-existent column (%d) from matrix", column]; format: @"remove non-existent column (%d) from matrix", (int)column];
#endif #endif
} }
} }
@ -780,7 +780,7 @@ static SEL getSel;
/**<p>Removes the NSMatrix's row at index <var>row</var></p> /**<p>Removes the NSMatrix's row at index <var>row</var></p>
<p>See Also: -removeColumn:</p> <p>See Also: -removeColumn:</p>
*/ */
- (void) removeRow: (int)row - (void) removeRow: (NSInteger)row
{ {
if (row >= 0 && row < _numRows) if (row >= 0 && row < _numRows)
{ {
@ -823,16 +823,16 @@ static SEL getSel;
else else
{ {
#if NSMATRIX_STRICT_CHECKING == 0 #if NSMATRIX_STRICT_CHECKING == 0
NSLog(@"remove non-existent row (%d) from matrix", row); NSLog(@"remove non-existent row (%d) from matrix", (int)row);
#else #else
[NSException raise: NSRangeException [NSException raise: NSRangeException
format: @"remove non-existent row (%d) from matrix", row]; format: @"remove non-existent row (%d) from matrix", (int)row];
#endif #endif
} }
} }
- (void) renewRows: (int)newRows - (void) renewRows: (NSInteger)newRows
columns: (int)newColumns columns: (NSInteger)newColumns
{ {
[self _renewRows: newRows columns: newColumns rowSpace: 0 colSpace: 0]; [self _renewRows: newRows columns: newColumns rowSpace: 0 colSpace: 0];
} }
@ -853,7 +853,7 @@ static SEL getSel;
[self sizeToCells]; [self sizeToCells];
} }
- (void) sortUsingFunction: (int (*)(id element1, id element2, - (void) sortUsingFunction: (NSComparisonResult (*)(id element1, id element2,
void *userData))comparator void *userData))comparator
context: (void*)context context: (void*)context
{ {
@ -919,8 +919,8 @@ static SEL getSel;
specified NSPoint aPoint. Returns YES if aPoint is within the NSMatrix, specified NSPoint aPoint. Returns YES if aPoint is within the NSMatrix,
NO otherwise</p> NO otherwise</p>
*/ */
- (BOOL) getRow: (int*)row - (BOOL) getRow: (NSInteger*)row
column: (int*)column column: (NSInteger*)column
forPoint: (NSPoint)aPoint forPoint: (NSPoint)aPoint
{ {
BOOL betweenRows; BOOL betweenRows;
@ -996,8 +996,8 @@ static SEL getSel;
specified NSCell aCell. Returns YES if aCell is in the NSMatrix, specified NSCell aCell. Returns YES if aCell is in the NSMatrix,
NO otherwise</p> NO otherwise</p>
*/ */
- (BOOL) getRow: (int*)row - (BOOL) getRow: (NSInteger*)row
column: (int*)column column: (NSInteger*)column
ofCell: (NSCell*)aCell ofCell: (NSCell*)aCell
{ {
int i; int i;
@ -1031,9 +1031,9 @@ static SEL getSel;
to value. If the NSMatrix's mode is NSRadioModeMatrix it deselects to value. If the NSMatrix's mode is NSRadioModeMatrix it deselects
the cell currently selected if needed.</p> the cell currently selected if needed.</p>
*/ */
- (void) setState: (int)value - (void) setState: (NSInteger)value
atRow: (int)row atRow: (NSInteger)row
column: (int)column column: (NSInteger)column
{ {
NSCell *aCell = [self cellAtRow: row column: column]; NSCell *aCell = [self cellAtRow: row column: column];
@ -1245,7 +1245,7 @@ static SEL getSel;
- (void) selectCell: (NSCell *)aCell - (void) selectCell: (NSCell *)aCell
{ {
int row, column; NSInteger row, column;
if ([self getRow: &row column: &column ofCell: aCell] == YES) if ([self getRow: &row column: &column ofCell: aCell] == YES)
{ {
@ -1264,7 +1264,7 @@ static SEL getSel;
the cells.</p> the cells.</p>
<p>See Also: -deselectSelectedCell -selectTextAtRow:column:</p> <p>See Also: -deselectSelectedCell -selectTextAtRow:column:</p>
*/ */
- (void) selectCellAtRow: (int)row column: (int)column - (void) selectCellAtRow: (NSInteger)row column: (NSInteger)column
{ {
NSCell *aCell; NSCell *aCell;
@ -1288,7 +1288,7 @@ static SEL getSel;
NO otherwise.</p><p>See Also: -deselectSelectedCell NO otherwise.</p><p>See Also: -deselectSelectedCell
-selectTextAtRow:column:</p> -selectTextAtRow:column:</p>
*/ */
- (BOOL) selectCellWithTag: (int)anInt - (BOOL) selectCellWithTag: (NSInteger)anInt
{ {
id aCell; id aCell;
int i = _numRows; int i = _numRows;
@ -1333,9 +1333,9 @@ static SEL getSel;
return array; return array;
} }
- (void) setSelectionFrom: (int)startPos - (void) setSelectionFrom: (NSInteger)startPos
to: (int)endPos to: (NSInteger)endPos
anchor: (int)anchorPos anchor: (NSInteger)anchorPos
highlight: (BOOL)flag highlight: (BOOL)flag
{ {
/* Cells are selected from the anchor (A) to the point where the mouse /* Cells are selected from the anchor (A) to the point where the mouse
@ -1487,8 +1487,8 @@ static SEL getSel;
Returns nil if the <var>row</var> or <var>column</var> are out of Returns nil if the <var>row</var> or <var>column</var> are out of
range</p> range</p>
*/ */
- (id) cellAtRow: (int)row - (id) cellAtRow: (NSInteger)row
column: (int)column column: (NSInteger)column
{ {
if (row < 0 || row >= _numRows || column < 0 || column >= _numCols) if (row < 0 || row >= _numRows || column < 0 || column >= _numCols)
return nil; return nil;
@ -1498,7 +1498,7 @@ static SEL getSel;
/**<p>Returns the cell with tag <var>anInt</var> /**<p>Returns the cell with tag <var>anInt</var>
Returns nil if no cell has a tag <var>anInt</var></p> Returns nil if no cell has a tag <var>anInt</var></p>
*/ */
- (id) cellWithTag: (int)anInt - (id) cellWithTag: (NSInteger)anInt
{ {
int i = _numRows; int i = _numRows;
@ -1589,7 +1589,7 @@ static SEL getSel;
methods returns the selected cell if exists and selectable, methods returns the selected cell if exists and selectable,
nil otherwise</p> nil otherwise</p>
*/ */
- (id) selectTextAtRow: (int)row column: (int)column - (id) selectTextAtRow: (NSInteger)row column: (NSInteger)column
{ {
if (row < 0 || row >= _numRows || column < 0 || column >= _numCols) if (row < 0 || row >= _numRows || column < 0 || column >= _numCols)
return self; return self;
@ -1658,7 +1658,7 @@ static SEL getSel;
- (void) setKeyCell: (NSCell *)aCell - (void) setKeyCell: (NSCell *)aCell
{ {
BOOL isValid; BOOL isValid;
int row, column; NSInteger row, column;
isValid = [self getRow: &row column: &column ofCell: aCell]; isValid = [self getRow: &row column: &column ofCell: aCell];
@ -1989,8 +1989,8 @@ static SEL getSel;
<var>column</var> visible</p> <var>column</var> visible</p>
<p>See Also: -scrollRectToVisible: -cellFrameAtRow:column:</p> <p>See Also: -scrollRectToVisible: -cellFrameAtRow:column:</p>
*/ */
- (void) scrollCellToVisibleAtRow: (int)row - (void) scrollCellToVisibleAtRow: (NSInteger)row
column: (int)column column: (NSInteger)column
{ {
[self scrollRectToVisible: [self cellFrameAtRow: row column: column]]; [self scrollRectToVisible: [self cellFrameAtRow: row column: column]];
} }
@ -2071,7 +2071,7 @@ static SEL getSel;
- (void) drawCell: (NSCell *)aCell - (void) drawCell: (NSCell *)aCell
{ {
int row, column; NSInteger row, column;
if ([self getRow: &row column: &column ofCell: aCell] == YES) if ([self getRow: &row column: &column ofCell: aCell] == YES)
{ {
@ -2083,7 +2083,7 @@ static SEL getSel;
<p>See Also: [NSCell-drawWithFrame:inView:] -setDrawsCellBackground: <p>See Also: [NSCell-drawWithFrame:inView:] -setDrawsCellBackground:
-drawsCellBackground</p> -drawsCellBackground</p>
*/ */
- (void) drawCellAtRow: (int)row column: (int)column - (void) drawCellAtRow: (NSInteger)row column: (NSInteger)column
{ {
NSCell *aCell = [self cellAtRow: row column: column]; NSCell *aCell = [self cellAtRow: row column: column];
@ -2119,7 +2119,7 @@ static SEL getSel;
and column <var>column</var>. and maks the cell rect for display.</p> and column <var>column</var>. and maks the cell rect for display.</p>
<p>See Also: -setNeedsDisplayInRect: [NSCell-setHighlighted:]</p> <p>See Also: -setNeedsDisplayInRect: [NSCell-setHighlighted:]</p>
*/ */
- (void) highlightCell: (BOOL)flag atRow: (int)row column: (int)column - (void) highlightCell: (BOOL)flag atRow: (NSInteger)row column: (NSInteger)column
{ {
NSCell *aCell = [self cellAtRow: row column: column]; NSCell *aCell = [self cellAtRow: row column: column];
@ -2243,8 +2243,8 @@ static SEL getSel;
{ {
BOOL mouseUpInCell = NO, onCell, scrolling = NO, mouseUp = NO; BOOL mouseUpInCell = NO, onCell, scrolling = NO, mouseUp = NO;
NSCell *mouseCell; NSCell *mouseCell;
int mouseRow; NSInteger mouseRow;
int mouseColumn; NSInteger mouseColumn;
NSPoint mouseLocation; NSPoint mouseLocation;
NSRect mouseCellFrame; NSRect mouseCellFrame;
NSCell *originallySelectedCell = _selectedCell; NSCell *originallySelectedCell = _selectedCell;
@ -2363,8 +2363,8 @@ static SEL getSel;
- (void) _mouseDownListMode: (NSEvent *) theEvent - (void) _mouseDownListMode: (NSEvent *) theEvent
{ {
NSPoint locationInWindow, mouseLocation; NSPoint locationInWindow, mouseLocation;
int mouseRow, mouseColumn; NSInteger mouseRow, mouseColumn;
int mouseIndex, previousIndex = 0, anchor = 0; NSInteger mouseIndex, previousIndex = 0, anchor = 0;
id mouseCell, previousCell = nil; id mouseCell, previousCell = nil;
BOOL onCell; BOOL onCell;
BOOL isSelecting = YES; BOOL isSelecting = YES;
@ -2470,7 +2470,7 @@ static SEL getSel;
dequeue: YES]; dequeue: YES];
NSDebugLLog(@"NSMatrix", @"matrix: got event of type: %d\n", NSDebugLLog(@"NSMatrix", @"matrix: got event of type: %d\n",
[theEvent type]); (int)[theEvent type]);
if ([theEvent type] != NSPeriodic) if ([theEvent type] != NSPeriodic)
{ {
@ -2488,7 +2488,7 @@ static SEL getSel;
- (void) mouseDown: (NSEvent*)theEvent - (void) mouseDown: (NSEvent*)theEvent
{ {
int row, column; NSInteger row, column;
NSPoint lastLocation = [theEvent locationInWindow]; NSPoint lastLocation = [theEvent locationInWindow];
int clickCount; int clickCount;
@ -2576,7 +2576,7 @@ static SEL getSel;
- (void) updateCell: (NSCell*)aCell - (void) updateCell: (NSCell*)aCell
{ {
int row, col; NSInteger row, col;
NSRect rect; NSRect rect;
if ([self getRow: &row column: &col ofCell: aCell] == NO) if ([self getRow: &row column: &col ofCell: aCell] == NO)
@ -3273,7 +3273,7 @@ static SEL getSel;
/**<p>Returns the number of rows of the NSMatrix</p> /**<p>Returns the number of rows of the NSMatrix</p>
<p>See Also: -numberOfColumns</p> <p>See Also: -numberOfColumns</p>
*/ */
- (int) numberOfRows - (NSInteger) numberOfRows
{ {
return _numRows; return _numRows;
} }
@ -3281,7 +3281,7 @@ static SEL getSel;
/**<p>Returns the number of columns of the NSMatrix</p> /**<p>Returns the number of columns of the NSMatrix</p>
<p>See Also: -numberOfRows</p> <p>See Also: -numberOfRows</p>
*/ */
- (int) numberOfColumns - (NSInteger) numberOfColumns
{ {
return _numCols; return _numCols;
} }
@ -3308,7 +3308,7 @@ static SEL getSel;
return _selectedRow; return _selectedRow;
} }
- (int) mouseDownFlags - (NSInteger) mouseDownFlags
{ {
return mouseDownFlags; return mouseDownFlags;
} }
@ -3943,20 +3943,20 @@ static SEL getSel;
if (row < 0) if (row < 0)
{ {
#if NSMATRIX_STRICT_CHECKING == 0 #if NSMATRIX_STRICT_CHECKING == 0
NSLog(@"renew negative row (%d) in matrix", row); NSLog(@"renew negative row (%d) in matrix", (int)row);
#else #else
[NSException raise: NSRangeException [NSException raise: NSRangeException
format: @"renew negative row (%d) in matrix", row]; format: @"renew negative row (%d) in matrix", (int)row];
#endif #endif
row = 0; row = 0;
} }
if (col < 0) if (col < 0)
{ {
#if NSMATRIX_STRICT_CHECKING == 0 #if NSMATRIX_STRICT_CHECKING == 0
NSLog(@"renew negative column (%d) in matrix", col); NSLog(@"renew negative column (%d) in matrix", (int)col);
#else #else
[NSException raise: NSRangeException [NSException raise: NSRangeException
format: @"renew negative column (%d) in matrix", col]; format: @"renew negative column (%d) in matrix", (int)col];
#endif #endif
col = 0; col = 0;
} }

View file

@ -710,7 +710,7 @@ static BOOL menuBarVisible = YES;
} }
- (void) insertItem: (id <NSMenuItem>)newItem - (void) insertItem: (id <NSMenuItem>)newItem
atIndex: (int)index atIndex: (NSInteger)index
{ {
NSNotification *inserted; NSNotification *inserted;
NSDictionary *d; NSDictionary *d;
@ -757,7 +757,7 @@ static BOOL menuBarVisible = YES;
- (id <NSMenuItem>) insertItemWithTitle: (NSString*)aString - (id <NSMenuItem>) insertItemWithTitle: (NSString*)aString
action: (SEL)aSelector action: (SEL)aSelector
keyEquivalent: (NSString*)charCode keyEquivalent: (NSString*)charCode
atIndex: (unsigned int)index atIndex: (NSInteger)index
{ {
NSMenuItem *anItem = [[NSMenuItem alloc] initWithTitle: aString NSMenuItem *anItem = [[NSMenuItem alloc] initWithTitle: aString
action: aSelector action: aSelector
@ -795,7 +795,7 @@ static BOOL menuBarVisible = YES;
[self removeItemAtIndex: index]; [self removeItemAtIndex: index];
} }
- (void) removeItemAtIndex: (int)index - (void) removeItemAtIndex: (NSInteger)index
{ {
NSNotification *removed; NSNotification *removed;
NSDictionary *d; NSDictionary *d;
@ -827,7 +827,7 @@ static BOOL menuBarVisible = YES;
{ {
NSNotification *changed; NSNotification *changed;
NSDictionary *d; NSDictionary *d;
int index = [self indexOfItem: anObject]; NSInteger index = [self indexOfItem: anObject];
if (-1 == index) if (-1 == index)
return; return;
@ -855,7 +855,7 @@ static BOOL menuBarVisible = YES;
/* /*
* Finding Menu Items * Finding Menu Items
*/ */
- (id <NSMenuItem>) itemWithTag: (int)aTag - (id <NSMenuItem>) itemWithTag: (NSInteger)aTag
{ {
unsigned i; unsigned i;
unsigned count = [_items count]; unsigned count = [_items count];
@ -885,16 +885,16 @@ static BOOL menuBarVisible = YES;
return nil; return nil;
} }
- (id <NSMenuItem>) itemAtIndex: (int)index - (id <NSMenuItem>) itemAtIndex: (NSInteger)index
{ {
if (index >= (int)[_items count] || index < 0) if (index >= [_items count] || index < 0)
[NSException raise: NSRangeException [NSException raise: NSRangeException
format: @"Range error in method -itemAtIndex: "]; format: @"Range error in method -itemAtIndex: "];
return [_items objectAtIndex: index]; return [_items objectAtIndex: index];
} }
- (int) numberOfItems - (NSInteger) numberOfItems
{ {
return [_items count]; return [_items count];
} }
@ -907,7 +907,7 @@ static BOOL menuBarVisible = YES;
/* /*
* Finding Indices of Menu Items * Finding Indices of Menu Items
*/ */
- (int) indexOfItem: (id <NSMenuItem>)anObject - (NSInteger) indexOfItem: (id <NSMenuItem>)anObject
{ {
NSUInteger index; NSUInteger index;
@ -919,7 +919,7 @@ static BOOL menuBarVisible = YES;
return index; return index;
} }
- (int) indexOfItemWithTitle: (NSString*)aTitle - (NSInteger) indexOfItemWithTitle: (NSString*)aTitle
{ {
id anItem; id anItem;
@ -929,7 +929,7 @@ static BOOL menuBarVisible = YES;
return -1; return -1;
} }
- (int) indexOfItemWithTag: (int)aTag - (NSInteger) indexOfItemWithTag: (NSInteger)aTag
{ {
id anItem; id anItem;
@ -939,7 +939,7 @@ static BOOL menuBarVisible = YES;
return -1; return -1;
} }
- (int) indexOfItemWithTarget: (id)anObject - (NSInteger) indexOfItemWithTarget: (id)anObject
andAction: (SEL)actionSelector andAction: (SEL)actionSelector
{ {
unsigned i; unsigned i;
@ -962,9 +962,9 @@ static BOOL menuBarVisible = YES;
return -1; return -1;
} }
- (int) indexOfItemWithRepresentedObject: (id)anObject - (NSInteger) indexOfItemWithRepresentedObject: (id)anObject
{ {
int i, count = [_items count]; NSInteger i, count = [_items count];
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
@ -978,9 +978,9 @@ static BOOL menuBarVisible = YES;
return -1; return -1;
} }
- (int) indexOfItemWithSubmenu: (NSMenu *)anObject - (NSInteger) indexOfItemWithSubmenu: (NSMenu *)anObject
{ {
int i, count = [_items count]; NSInteger i, count = [_items count];
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
@ -1084,14 +1084,14 @@ static BOOL menuBarVisible = YES;
} }
else if ([_delegate respondsToSelector:@selector(numberOfItemsInMenu:)]) else if ([_delegate respondsToSelector:@selector(numberOfItemsInMenu:)])
{ {
int num; NSInteger num;
num = [_delegate numberOfItemsInMenu: self]; num = [_delegate numberOfItemsInMenu: self];
if (num > 0) if (num > 0)
{ {
BOOL cont = YES; BOOL cont = YES;
int i = 0; NSInteger i = 0;
int curr = [self numberOfItems]; NSInteger curr = [self numberOfItems];
while (num < curr) while (num < curr)
{ {
@ -1288,7 +1288,7 @@ static BOOL menuBarVisible = YES;
// //
// Simulating Mouse Clicks // Simulating Mouse Clicks
// //
- (void) performActionForItemAtIndex: (int)index - (void) performActionForItemAtIndex: (NSInteger)index
{ {
id<NSMenuItem> item = [_items objectAtIndex: index]; id<NSMenuItem> item = [_items objectAtIndex: index];
NSDictionary *d; NSDictionary *d;

View file

@ -363,7 +363,7 @@ static NSMapTable *viewInfo = 0;
return _font; return _font;
} }
- (void) setHighlightedItemIndex: (int)index - (void) setHighlightedItemIndex: (NSInteger)index
{ {
NSMenuItemCell *aCell; NSMenuItemCell *aCell;
@ -390,13 +390,13 @@ static NSMapTable *viewInfo = 0;
} }
} }
- (int) highlightedItemIndex - (NSInteger) highlightedItemIndex
{ {
return _highlightedItemIndex; return _highlightedItemIndex;
} }
- (void) setMenuItemCell: (NSMenuItemCell *)cell - (void) setMenuItemCell: (NSMenuItemCell *)cell
forItemAtIndex: (int)index forItemAtIndex: (NSInteger)index
{ {
NSMenuItem *anItem = [_items_link objectAtIndex: index]; NSMenuItem *anItem = [_items_link objectAtIndex: index];
@ -416,7 +416,7 @@ static NSMapTable *viewInfo = 0;
[self setNeedsDisplayForItemAtIndex: index]; [self setNeedsDisplayForItemAtIndex: index];
} }
- (NSMenuItemCell*) menuItemCellForItemAtIndex: (int)index - (NSMenuItemCell*) menuItemCellForItemAtIndex: (NSInteger)index
{ {
if (index < [_itemCells count]) if (index < [_itemCells count])
return [_itemCells objectAtIndex: index]; return [_itemCells objectAtIndex: index];
@ -564,7 +564,7 @@ static NSMapTable *viewInfo = 0;
} }
} }
- (void) attachSubmenuForItemAtIndex: (int)index - (void) attachSubmenuForItemAtIndex: (NSInteger)index
{ {
/* /*
* Transient menus are used for torn-off menus, which are already on the * Transient menus are used for torn-off menus, which are already on the
@ -962,7 +962,7 @@ static NSMapTable *viewInfo = 0;
} }
} }
- (NSRect) rectOfItemAtIndex: (int)index - (NSRect) rectOfItemAtIndex: (NSInteger)index
{ {
if (_needsSizing == YES) if (_needsSizing == YES)
{ {
@ -1001,7 +1001,7 @@ static NSMapTable *viewInfo = 0;
} }
} }
- (int) indexOfItemAtPoint: (NSPoint)point - (NSInteger) indexOfItemAtPoint: (NSPoint)point
{ {
unsigned howMany = [_itemCells count]; unsigned howMany = [_itemCells count];
unsigned i; unsigned i;
@ -1029,7 +1029,7 @@ static NSMapTable *viewInfo = 0;
return -1; return -1;
} }
- (void) setNeedsDisplayForItemAtIndex: (int)index - (void) setNeedsDisplayForItemAtIndex: (NSInteger)index
{ {
NSRect aRect; NSRect aRect;
@ -1102,7 +1102,7 @@ static NSMapTable *viewInfo = 0;
- (void) setWindowFrameForAttachingToRect: (NSRect)screenRect - (void) setWindowFrameForAttachingToRect: (NSRect)screenRect
onScreen: (NSScreen*)screen onScreen: (NSScreen*)screen
preferredEdge: (NSRectEdge)edge preferredEdge: (NSRectEdge)edge
popUpSelectedItem: (int)selectedItemIndex popUpSelectedItem: (NSInteger)selectedItemIndex
{ {
NSRect r; NSRect r;
NSRect cellFrame; NSRect cellFrame;
@ -1361,7 +1361,7 @@ static NSMapTable *viewInfo = 0;
/* /*
* Event Handling * Event Handling
*/ */
- (void) performActionWithHighlightingForItemAtIndex: (int)index - (void) performActionWithHighlightingForItemAtIndex: (NSInteger)index
{ {
NSMenu *candidateMenu = _attachedMenu; NSMenu *candidateMenu = _attachedMenu;
NSMenuView *targetMenuView; NSMenuView *targetMenuView;

View file

@ -188,7 +188,7 @@ this to return nil to indicate that we have no context menu.
-synchronizeTitleAndSelectedItem</p> -synchronizeTitleAndSelectedItem</p>
*/ */
- (void) insertItemWithTitle: (NSString*)title - (void) insertItemWithTitle: (NSString*)title
atIndex: (int)index atIndex: (NSInteger)index
{ {
[_cell insertItemWithTitle: title [_cell insertItemWithTitle: title
atIndex: index]; atIndex: index];
@ -225,7 +225,7 @@ this to return nil to indicate that we have no context menu.
</p><p>See Also: [NSPopUpButtonCell-removeItemAtIndex:] </p><p>See Also: [NSPopUpButtonCell-removeItemAtIndex:]
-removeAllItems -removeItemWithTitle: -synchronizeTitleAndSelectedItem</p> -removeAllItems -removeItemWithTitle: -synchronizeTitleAndSelectedItem</p>
*/ */
- (void) removeItemAtIndex: (int)index - (void) removeItemAtIndex: (NSInteger)index
{ {
[_cell removeItemAtIndex: index]; [_cell removeItemAtIndex: index];
@ -251,7 +251,7 @@ this to return nil to indicate that we have no context menu.
/**<p>Returns the index of the selected item</p> /**<p>Returns the index of the selected item</p>
<p>See Also: [NSPopUpButtonCell-indexOfSelectedItem]</p> <p>See Also: [NSPopUpButtonCell-indexOfSelectedItem]</p>
*/ */
- (int) indexOfSelectedItem - (NSInteger) indexOfSelectedItem
{ {
return [_cell indexOfSelectedItem]; return [_cell indexOfSelectedItem];
} }
@ -274,7 +274,7 @@ this to return nil to indicate that we have no context menu.
NSPopUpButton's title with the title of the selected</p><p>See Also: NSPopUpButton's title with the title of the selected</p><p>See Also:
[NSPopUpButtonCell-selectItemAtIndex:] -synchronizeTitleAndSelectedItem</p> [NSPopUpButtonCell-selectItemAtIndex:] -synchronizeTitleAndSelectedItem</p>
*/ */
- (void) selectItemAtIndex: (int)index - (void) selectItemAtIndex: (NSInteger)index
{ {
[_cell selectItemAtIndex: index]; [_cell selectItemAtIndex: index];
[self synchronizeTitleAndSelectedItem]; [self synchronizeTitleAndSelectedItem];
@ -293,7 +293,7 @@ this to return nil to indicate that we have no context menu.
- (BOOL) selectItemWithTag: (NSInteger)tag - (BOOL) selectItemWithTag: (NSInteger)tag
{ {
int index = [self indexOfItemWithTag: tag]; NSInteger index = [self indexOfItemWithTag: tag];
if (index >= 0) if (index >= 0)
{ {
@ -310,7 +310,7 @@ this to return nil to indicate that we have no context menu.
/** <p>Returns the number of items in the item list</p> /** <p>Returns the number of items in the item list</p>
<p>See Also: [NSPopUpButtonCell-numberOfItems]</p> <p>See Also: [NSPopUpButtonCell-numberOfItems]</p>
*/ */
- (int) numberOfItems - (NSInteger) numberOfItems
{ {
return [_cell numberOfItems]; return [_cell numberOfItems];
} }
@ -323,14 +323,14 @@ this to return nil to indicate that we have no context menu.
/**<p>Returns the NSMenuItem at index index or nil if index is out of /**<p>Returns the NSMenuItem at index index or nil if index is out of
range</p><p>See Also: [NSPopUpButtonCell-itemAtIndex:] </p> range</p><p>See Also: [NSPopUpButtonCell-itemAtIndex:] </p>
*/ */
- (id <NSMenuItem>) itemAtIndex: (int)index - (id <NSMenuItem>) itemAtIndex: (NSInteger)index
{ {
return [_cell itemAtIndex: index]; return [_cell itemAtIndex: index];
} }
/** <p>Returns the item's title at index <var>index</var></p> /** <p>Returns the item's title at index <var>index</var></p>
*/ */
- (NSString*) itemTitleAtIndex: (int)index - (NSString*) itemTitleAtIndex: (NSInteger)index
{ {
return [_cell itemTitleAtIndex: index]; return [_cell itemTitleAtIndex: index];
} }
@ -356,7 +356,7 @@ this to return nil to indicate that we have no context menu.
return [_cell lastItem]; return [_cell lastItem];
} }
- (int) indexOfItem: (id <NSMenuItem>)anObject - (NSInteger) indexOfItem: (id <NSMenuItem>)anObject
{ {
return [_cell indexOfItem: anObject]; return [_cell indexOfItem: anObject];
} }
@ -366,7 +366,7 @@ this to return nil to indicate that we have no context menu.
[NSPopUpButtonCell-indexOfItemWithTag:] -indexOfItemWithTitle: [NSPopUpButtonCell-indexOfItemWithTag:] -indexOfItemWithTitle:
-indexOfItemWithRepresentedObject:</p> -indexOfItemWithRepresentedObject:</p>
*/ */
- (int) indexOfItemWithTag: (int)tag - (NSInteger) indexOfItemWithTag: (NSInteger)tag
{ {
return [_cell indexOfItemWithTag: tag]; return [_cell indexOfItemWithTag: tag];
} }
@ -376,17 +376,17 @@ this to return nil to indicate that we have no context menu.
[NSPopUpButtonCell-indexOfItemWithTitle:] -indexOfItemWithTag: [NSPopUpButtonCell-indexOfItemWithTitle:] -indexOfItemWithTag:
-indexOfItemWithRepresentedObject:</p> -indexOfItemWithRepresentedObject:</p>
*/ */
- (int) indexOfItemWithTitle: (NSString*)title - (NSInteger) indexOfItemWithTitle: (NSString*)title
{ {
return [_cell indexOfItemWithTitle: title]; return [_cell indexOfItemWithTitle: title];
} }
- (int) indexOfItemWithRepresentedObject: (id)anObject - (NSInteger) indexOfItemWithRepresentedObject: (id)anObject
{ {
return [_cell indexOfItemWithRepresentedObject: anObject]; return [_cell indexOfItemWithRepresentedObject: anObject];
} }
- (int) indexOfItemWithTarget: (id)target - (NSInteger) indexOfItemWithTarget: (id)target
andAction: (SEL)actionSelector andAction: (SEL)actionSelector
{ {
return [_cell indexOfItemWithTarget: target andAction: actionSelector]; return [_cell indexOfItemWithTarget: target andAction: actionSelector];
@ -485,7 +485,7 @@ this to return nil to indicate that we have no context menu.
} }
case ' ': case ' ':
{ {
int selectedIndex; NSInteger selectedIndex;
NSMenuView *menuView; NSMenuView *menuView;
// Beep, as on OS, and then return. // Beep, as on OS, and then return.
@ -518,7 +518,7 @@ this to return nil to indicate that we have no context menu.
case NSUpArrowFunctionKey: case NSUpArrowFunctionKey:
{ {
NSMenuView *menuView; NSMenuView *menuView;
int selectedIndex, numberOfItems; NSInteger selectedIndex, numberOfItems;
menuView = [[_cell menu] menuRepresentation]; menuView = [[_cell menu] menuRepresentation];
selectedIndex = [menuView highlightedItemIndex]; selectedIndex = [menuView highlightedItemIndex];
@ -542,7 +542,7 @@ this to return nil to indicate that we have no context menu.
case NSDownArrowFunctionKey: case NSDownArrowFunctionKey:
{ {
NSMenuView *menuView; NSMenuView *menuView;
int selectedIndex, numberOfItems; NSInteger selectedIndex, numberOfItems;
menuView = [[_cell menu] menuRepresentation]; menuView = [[_cell menu] menuRepresentation];
selectedIndex = [menuView highlightedItemIndex]; selectedIndex = [menuView highlightedItemIndex];

View file

@ -393,10 +393,10 @@ static NSImage *_pbc_image[5];
* index, it, and all items after it are advanced one position. Index needs * index, it, and all items after it are advanced one position. Index needs
* to be within the valid range for the array of items in the popup button. * to be within the valid range for the array of items in the popup button.
*/ */
- (void) insertItemWithTitle: (NSString *)title atIndex: (int)index - (void) insertItemWithTitle: (NSString *)title atIndex: (NSInteger)index
{ {
id <NSMenuItem> anItem; id <NSMenuItem> anItem;
int i, count; NSInteger i, count;
i = [self indexOfItemWithTitle: title]; i = [self indexOfItemWithTitle: title];
@ -448,7 +448,7 @@ static NSImage *_pbc_image[5];
* Remove a given item based on its index, must be a valid index within the * Remove a given item based on its index, must be a valid index within the
* range for the item array of this popup. * range for the item array of this popup.
*/ */
- (void) removeItemAtIndex: (int)index - (void) removeItemAtIndex: (NSInteger)index
{ {
if (index == [self indexOfSelectedItem]) if (index == [self indexOfSelectedItem])
{ {
@ -483,7 +483,7 @@ static NSImage *_pbc_image[5];
/** /**
* Number of items in the reciever. * Number of items in the reciever.
*/ */
- (int) numberOfItems - (NSInteger) numberOfItems
{ {
return [_menu numberOfItems]; return [_menu numberOfItems];
} }
@ -491,7 +491,7 @@ static NSImage *_pbc_image[5];
/** /**
* Return the index of item in the item array of the reciever. * Return the index of item in the item array of the reciever.
*/ */
- (int) indexOfItem: (id <NSMenuItem>)item - (NSInteger) indexOfItem: (id <NSMenuItem>)item
{ {
return [_menu indexOfItem: item]; return [_menu indexOfItem: item];
} }
@ -499,7 +499,7 @@ static NSImage *_pbc_image[5];
/** /**
* Return index of the item with the given title. * Return index of the item with the given title.
*/ */
- (int) indexOfItemWithTitle: (NSString *)title - (NSInteger) indexOfItemWithTitle: (NSString *)title
{ {
return [_menu indexOfItemWithTitle: title]; return [_menu indexOfItemWithTitle: title];
} }
@ -507,7 +507,7 @@ static NSImage *_pbc_image[5];
/** /**
* Return index of the item with a tag equal to aTag. * Return index of the item with a tag equal to aTag.
*/ */
- (int) indexOfItemWithTag: (int)tag - (NSInteger) indexOfItemWithTag: (NSInteger)tag
{ {
return [_menu indexOfItemWithTag: tag]; return [_menu indexOfItemWithTag: tag];
} }
@ -515,7 +515,7 @@ static NSImage *_pbc_image[5];
/** /**
* Index of the item whose menu item's representedObject is equal to obj. * Index of the item whose menu item's representedObject is equal to obj.
*/ */
- (int) indexOfItemWithRepresentedObject: (id)obj - (NSInteger) indexOfItemWithRepresentedObject: (id)obj
{ {
return [_menu indexOfItemWithRepresentedObject: obj]; return [_menu indexOfItemWithRepresentedObject: obj];
} }
@ -524,7 +524,7 @@ static NSImage *_pbc_image[5];
* Index of the item in the reciever whose target and action * Index of the item in the reciever whose target and action
* are equal to aTarget and actionSelector. * are equal to aTarget and actionSelector.
*/ */
- (int) indexOfItemWithTarget: (id)aTarget andAction: (SEL)actionSelector - (NSInteger) indexOfItemWithTarget: (id)aTarget andAction: (SEL)actionSelector
{ {
return [_menu indexOfItemWithTarget: aTarget andAction: actionSelector]; return [_menu indexOfItemWithTarget: aTarget andAction: actionSelector];
} }
@ -532,7 +532,7 @@ static NSImage *_pbc_image[5];
/** /**
* Return the item at index. * Return the item at index.
*/ */
- (id <NSMenuItem>) itemAtIndex: (int)index - (id <NSMenuItem>) itemAtIndex: (NSInteger)index
{ {
if ((index >= 0) && (index < [_menu numberOfItems])) if ((index >= 0) && (index < [_menu numberOfItems]))
{ {
@ -557,7 +557,7 @@ static NSImage *_pbc_image[5];
*/ */
- (id <NSMenuItem>) lastItem - (id <NSMenuItem>) lastItem
{ {
int end = [_menu numberOfItems] - 1; NSInteger end = [_menu numberOfItems] - 1;
if (end < 0) if (end < 0)
return nil; return nil;
@ -697,7 +697,7 @@ static NSImage *_pbc_image[5];
} }
} }
- (void) selectItemAtIndex: (int)index - (void) selectItemAtIndex: (NSInteger)index
{ {
id <NSMenuItem> anItem; id <NSMenuItem> anItem;
@ -796,14 +796,14 @@ static NSImage *_pbc_image[5];
[[self selectedItem] setRepresentedObject: object]; [[self selectedItem] setRepresentedObject: object];
} }
- (int) indexOfSelectedItem - (NSInteger) indexOfSelectedItem
{ {
return [_menu indexOfItem: [self selectedItem]]; return [_menu indexOfItem: [self selectedItem]];
} }
- (void) synchronizeTitleAndSelectedItem - (void) synchronizeTitleAndSelectedItem
{ {
int index; NSInteger index;
if (!_pbcFlags.usesItemFromMenu) if (!_pbcFlags.usesItemFromMenu)
return; return;
@ -855,7 +855,7 @@ static NSImage *_pbc_image[5];
/** /**
* Set item title at the given index in the reciever. * Set item title at the given index in the reciever.
*/ */
- (NSString *) itemTitleAtIndex: (int)index - (NSString *) itemTitleAtIndex: (NSInteger)index
{ {
return [[self itemAtIndex: index] title]; return [[self itemAtIndex: index] title];
} }
@ -901,7 +901,7 @@ static NSImage *_pbc_image[5];
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
NSWindow *cvWin = [controlView window]; NSWindow *cvWin = [controlView window];
NSMenuView *mr = [_menu menuRepresentation]; NSMenuView *mr = [_menu menuRepresentation];
int selectedItem; NSInteger selectedItem;
[nc postNotificationName: NSPopUpButtonCellWillPopUpNotification [nc postNotificationName: NSPopUpButtonCellWillPopUpNotification
object: self]; object: self];
@ -1104,7 +1104,7 @@ static NSImage *_pbc_image[5];
NSSize s; NSSize s;
NSSize imageSize; NSSize imageSize;
NSSize titleSize; NSSize titleSize;
int i, count; NSInteger i, count;
NSString *title; NSString *title;
NSImage *image; NSImage *image;