gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMatrix keyboard stuff


From: Fred Kiefer
Subject: Re: NSMatrix keyboard stuff
Date: Wed, 10 Jan 2007 16:59:16 +0100
User-agent: Thunderbird 1.5.0.8 (X11/20060911)

HI Matt,

could you please explain this patch a bit? Only the last bit is about
selecting the right cell in NSTrackModeMatrix. Are the other change a
result of this?
It looks like you intent to prevent the setting of the cell state for
this mode. Is this correct? In the documentation I only find that this
matrix mode wont do any highlighting. The documentation for NSControl
states clearly that cells get selected by setting their states. Is this
no longer true for NSMatrix? And why is this specific for the track mode?

Cheers,
Fred


Matt Rice schrieb:
> noticed in a matrix of switch buttons in NSTrackModeMatrix mode
> selectedRow isn't updated when doing keyboard arrow key stuff
> the state changes when deselecting/selecting rows
> 
> there still seems to be some drawing artifacts with this patch,
> dotted frame rects being left dotted...
> 
> this doesn't fix the selectedRow thing for NSHighlightModeMatrix
> and i'm not sure the correct thing to do with those on the rest...
> 
> if someone knows of any other code using NSTrackModeMatrix,
> not sure if this is something which should wait until after the upcoming
> release
> <matrix-kbd.diff>
> 
> 
> ------------------------------------------------------------------------
> 
> Index: NSMatrix.m
> ===================================================================
> --- NSMatrix.m        (revision 24288)
> +++ NSMatrix.m        (working copy)
> @@ -1098,7 +1098,8 @@
>  
>             if ([aCell state] || isHighlighted)
>               {
> -               [aCell setState: NSOffState];
> +               if (_mode != NSTrackModeMatrix) 
> +                 [aCell setState: NSOffState];
>  
>                 if (isHighlighted)
>                   {
> @@ -1135,7 +1136,9 @@
>       {
>         if (_selectedCells[i][j])
>           {
> -           [_cells[i][j] setState: NSOffState];
> +           if (_mode != NSTrackModeMatrix) 
> +             [_cells[i][j] setState: NSOffState];
> +
>             _selectedCells[i][j] = NO;
>           }
>       }
> @@ -1172,7 +1175,10 @@
>           && [_cells[i][j] isEditable] == NO)
>           {
>             _selectedCell = _cells[i][j];
> -           [_selectedCell setState: NSOnState];
> +
> +           if (_mode != NSTrackModeMatrix) 
> +             [_selectedCell setState: NSOnState];
> +
>             _selectedCells[i][j] = YES;
>  
>             _selectedRow = i;
> @@ -1211,7 +1217,8 @@
>        _selectedColumn = column;
>        _selectedCells[row][column] = YES;
>  
> -      [_selectedCell setState: NSOnState];
> +      if (_mode != NSTrackModeMatrix) 
> +        [_selectedCell setState: NSOnState];
>  
>        if (_mode == NSListModeMatrix)
>       [aCell setHighlighted: YES];
> @@ -3356,7 +3363,8 @@
>    BOOL selectCell = NO;
>    int h, i, lastDottedRow, lastDottedColumn;
>  
> -  if (_mode == NSRadioModeMatrix || _mode == NSListModeMatrix)
> +  if (_mode == NSRadioModeMatrix || _mode == NSListModeMatrix
> +      || _mode == NSTrackModeMatrix)
>      selectCell = YES;
>  
>    if (_dottedRow == -1 || _dottedColumn == -1)
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnustep-dev





reply via email to

[Prev in Thread] Current Thread [Next in Thread]