Kaydet (Commit) cf5ce3d5 authored tarafından gt's avatar gt

#98354# Ctrl for up/down and Space

üst acf8ab1d
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: svimpbox.cxx,v $ * $RCSfile: svimpbox.cxx,v $
* *
* $Revision: 1.14 $ * $Revision: 1.15 $
* *
* last change: $Author: gt $ $Date: 2002-03-13 14:28:49 $ * last change: $Author: gt $ $Date: 2002-04-04 09:11:44 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -95,6 +95,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n ...@@ -95,6 +95,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
pTree = pLBTree; pTree = pLBTree;
aSelEng.SetFunctionSet( (FunctionSet*)&aFctSet ); aSelEng.SetFunctionSet( (FunctionSet*)&aFctSet );
aSelEng.ExpandSelectionOnMouseMove( FALSE ); aSelEng.ExpandSelectionOnMouseMove( FALSE );
aSelEng.EnableListBoxMode();
SetWindowBits( nWinStyle ); SetWindowBits( nWinStyle );
SetSelectionMode( SINGLE_SELECTION ); SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( 0 ); SetDragDropMode( 0 );
...@@ -2162,13 +2163,9 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) ...@@ -2162,13 +2163,9 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( pNewCursor ) if( pNewCursor )
{ {
aSelEng.CursorPosChanging( bShift, bMod1 ); aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) ) SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
SetCursor( pNewCursor ); if( !IsEntryInView( pNewCursor ) )
else
{
SetCursor( pNewCursor );
KeyUp( FALSE ); KeyUp( FALSE );
}
} }
break; break;
...@@ -2188,13 +2185,13 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) ...@@ -2188,13 +2185,13 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
{ {
aSelEng.CursorPosChanging( bShift, bMod1 ); aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) ) if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor ); SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
else else
{ {
if( pCursor ) if( pCursor )
pView->Select( pCursor, FALSE ); pView->Select( pCursor, FALSE );
KeyDown( FALSE ); KeyDown( FALSE );
SetCursor( pNewCursor ); SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
} }
} }
else else
...@@ -2301,16 +2298,17 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt) ...@@ -2301,16 +2298,17 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
break; break;
case KEY_SPACE: case KEY_SPACE:
if ( !bShift && !bMod1 ) if ( bMod1 )
{
if ( pView->GetSelectionMode() == MULTIPLE_SELECTION && !bShift )
// toggle selection
pView->Select( pCursor, !pView->IsSelected( pCursor ) );
}
else if ( !bShift /*&& !bMod1*/ )
{ {
if ( aSelEng.IsAddMode() ) if ( aSelEng.IsAddMode() )
{
// toggle selection // toggle selection
BOOL bSel = TRUE; pView->Select( pCursor, !pView->IsSelected( pCursor ) );
if ( pView->IsSelected( pCursor ) )
bSel = FALSE;
pView->Select( pCursor, bSel );
}
else else
{ {
SelAllDestrAnch( FALSE ); SelAllDestrAnch( FALSE );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment