mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
* NSScroller.m in trackScrollButtons method added code to highlight cell
prior to calling trackMouse. In keeping with new behaviour of NSCell. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2867 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b8c99d7204
commit
b2a8e958e6
4 changed files with 17 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
Tues July 28 1998 Felipe A. Rodriguez <far@ix.netcom.com>
|
||||
|
||||
* NSScroller.m in trackScrollButtons method added code to highlight cell
|
||||
prior to calling trackMouse. In keeping with new behaviour of NSCell.
|
||||
|
||||
Sat July 25 1998 Felipe A. Rodriguez <far@ix.netcom.com>
|
||||
|
||||
* NSCell.m removed highlight/unhighlight behaviour from trackMouse method
|
||||
|
|
|
@ -141,8 +141,7 @@
|
|||
|
||||
rect.origin = documentFrame.origin;
|
||||
rect.size.width = MAX(documentFrame.size.width, clipViewBounds.size.width);
|
||||
rect.size.height = MAX(documentFrame.size.height,
|
||||
clipViewBounds.size.height);
|
||||
rect.size.height = MAX(documentFrame.size.height,clipViewBounds.size.height);
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
|
|
@ -1181,13 +1181,14 @@ static MPoint anchor = {0, 0};
|
|||
selectedColumn = column; // until the cursor
|
||||
// either leaves
|
||||
if([aCell trackMouse:lastEvent // the cellframe or
|
||||
inRect:rect // mouse goes up
|
||||
inRect:rect // NSLeftMouseUp
|
||||
ofView:self
|
||||
untilMouseUp:YES]) // YES if mouse
|
||||
done = YES; // went up in cell
|
||||
break;
|
||||
|
||||
case NSHighlightModeMatrix:
|
||||
[aCell setState:1];
|
||||
[aCell highlight: YES withFrame: rect inView: self];
|
||||
[self setNeedsDisplayInRect:rect]; // Highlight mode
|
||||
ASSIGN(selectedCell, aCell); // is like Track
|
||||
|
@ -1199,6 +1200,7 @@ static MPoint anchor = {0, 0};
|
|||
ofView:self
|
||||
untilMouseUp:YES]) // YES if mouse
|
||||
done = YES; // went up in cell
|
||||
[aCell setState:0];
|
||||
[aCell highlight: NO withFrame: rect inView: self];
|
||||
[self setNeedsDisplayInRect:rect];
|
||||
break;
|
||||
|
@ -1226,9 +1228,9 @@ static MPoint anchor = {0, 0};
|
|||
((tMatrix)selectedCells)->matrix[row][column] = YES;
|
||||
[self setNeedsDisplayInRect:rect];
|
||||
break;
|
||||
|
||||
case NSListModeMatrix: // List mode allows
|
||||
{ // multiple selection
|
||||
// List mode allows
|
||||
case NSListModeMatrix: // multiple cells to be
|
||||
{ // selected
|
||||
unsigned modifiers = [lastEvent modifierFlags];
|
||||
|
||||
if (previousCell == aCell)
|
||||
|
@ -1329,9 +1331,9 @@ static MPoint anchor = {0, 0};
|
|||
anchor = MakePoint (column, row); // mouse up as new anchor
|
||||
break; // point in List mode
|
||||
}
|
||||
// in Track or Highlight modes the single click
|
||||
// action has already been sent by the cell to
|
||||
// it's target (if it has one)
|
||||
// in Track and Highlight modes the single
|
||||
// click action has already been sent by the
|
||||
// cell to it's target (if it has one)
|
||||
if ((mode != NSTrackModeMatrix) && (mode != NSHighlightModeMatrix) &&
|
||||
(selectedCellTarget = [selectedCell target]))
|
||||
[selectedCellTarget performSelector:[selectedCell action]
|
||||
|
|
|
@ -463,6 +463,8 @@ static NSButtonCell* knobCell = nil;
|
|||
}
|
||||
|
||||
if (theCell) {
|
||||
[theCell highlight:YES withFrame:rect inView:self]; // highlight cell
|
||||
[self setNeedsDisplayInRect:rect];
|
||||
NSDebugLog (@"tracking cell %x", theCell);
|
||||
/* Track the mouse until mouse goes up */
|
||||
shouldReturn = [theCell trackMouse:theEvent
|
||||
|
|
Loading…
Reference in a new issue