ilstbox.cxx (9f62ea84) | ilstbox.cxx (ad3a95a3) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 902 unchanged lines hidden (view full) --- 911 { 912 if ( !mbMulti && GetEntryList()->GetSelectEntryCount() ) 913 mnTrackingSaveSelection = GetEntryList()->GetSelectEntryPos( 0 ); 914 else 915 mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND; 916 917 mnCurrentPos = nSelect; 918 mbTrackingSelect = sal_True; | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 902 unchanged lines hidden (view full) --- 911 { 912 if ( !mbMulti && GetEntryList()->GetSelectEntryCount() ) 913 mnTrackingSaveSelection = GetEntryList()->GetSelectEntryPos( 0 ); 914 else 915 mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND; 916 917 mnCurrentPos = nSelect; 918 mbTrackingSelect = sal_True; |
919 SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() ); | 919 //IAccessibility2 Impplementaton 2009----- 920 sal_Bool bCurPosChange = (mnCurrentPos != nSelect); 921 //SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() ); 922 SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() ,bCurPosChange); 923 //-----IAccessibility2 Impplementaton 2009 |
920 mbTrackingSelect = sal_False; 921 if ( mbGrabFocus ) 922 GrabFocus(); 923 924 StartTracking( STARTTRACK_SCROLLREPEAT ); 925 } 926 } 927 if( rMEvt.GetClicks() == 2 ) --- 54 unchanged lines hidden (view full) --- 982 { 983 if ( mbStackMode ) // #87072# 984 { 985 mbTravelSelect = sal_True; 986 mnSelectModifier = rMEvt.GetModifier(); 987 ImplCallSelect(); 988 mbTravelSelect = sal_False; 989 } | 924 mbTrackingSelect = sal_False; 925 if ( mbGrabFocus ) 926 GrabFocus(); 927 928 StartTracking( STARTTRACK_SCROLLREPEAT ); 929 } 930 } 931 if( rMEvt.GetClicks() == 2 ) --- 54 unchanged lines hidden (view full) --- 986 { 987 if ( mbStackMode ) // #87072# 988 { 989 mbTravelSelect = sal_True; 990 mnSelectModifier = rMEvt.GetModifier(); 991 ImplCallSelect(); 992 mbTravelSelect = sal_False; 993 } |
994//IAccessibility2 Implementation 2009---- 995 // When list box selection change by mouse move, notity 996 // VCLEVENT_LISTBOX_SELECT vcl event. 997 else 998 { 999 maListItemSelectHdl.Call(NULL); 1000 } 1001//----IAccessibility2 Implementation 2009 |
|
990 } 991 mbTrackingSelect = sal_False; 992 } 993 } 994 995 // Falls der DD-Button gedrueckt wurde und jemand mit gedrueckter 996 // Maustaste in die ListBox faehrt... 997 if ( rMEvt.IsLeft() && !rMEvt.IsSynthetic() ) --- 71 unchanged lines hidden (view full) --- 1069 ImplPaint( nPos, sal_True ); 1070 } 1071 mbSelectionChanged = sal_True; 1072 } 1073} 1074 1075// ----------------------------------------------------------------------- 1076 | 1002 } 1003 mbTrackingSelect = sal_False; 1004 } 1005 } 1006 1007 // Falls der DD-Button gedrueckt wurde und jemand mit gedrueckter 1008 // Maustaste in die ListBox faehrt... 1009 if ( rMEvt.IsLeft() && !rMEvt.IsSynthetic() ) --- 71 unchanged lines hidden (view full) --- 1081 ImplPaint( nPos, sal_True ); 1082 } 1083 mbSelectionChanged = sal_True; 1084 } 1085} 1086 1087// ----------------------------------------------------------------------- 1088 |
1077sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl ) | 1089sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl, sal_Bool bSelectPosChange /*=FALSE*/ ) |
1078{ 1079 sal_Bool bFocusChanged = sal_False; 1080 sal_Bool bSelectionChanged = sal_False; 1081 1082 if( IsEnabled() && mpEntryList->IsEntrySelectable( nSelect ) ) 1083 { 1084 // Hier (Single-ListBox) kann nur ein Eintrag deselektiert werden 1085 if( !mbMulti ) --- 128 unchanged lines hidden (view full) --- 1214 { 1215 long nHeightDiff = mpEntryList->GetAddedHeight( nSelect, mnTop, 0 ); 1216 maFocusRect.SetPos( Point( 0, nHeightDiff ) ); 1217 Size aSz( maFocusRect.GetWidth(), 1218 mpEntryList->GetEntryHeight( nSelect ) ); 1219 maFocusRect.SetSize( aSz ); 1220 if( HasFocus() ) 1221 ImplShowFocusRect(); | 1090{ 1091 sal_Bool bFocusChanged = sal_False; 1092 sal_Bool bSelectionChanged = sal_False; 1093 1094 if( IsEnabled() && mpEntryList->IsEntrySelectable( nSelect ) ) 1095 { 1096 // Hier (Single-ListBox) kann nur ein Eintrag deselektiert werden 1097 if( !mbMulti ) --- 128 unchanged lines hidden (view full) --- 1226 { 1227 long nHeightDiff = mpEntryList->GetAddedHeight( nSelect, mnTop, 0 ); 1228 maFocusRect.SetPos( Point( 0, nHeightDiff ) ); 1229 Size aSz( maFocusRect.GetWidth(), 1230 mpEntryList->GetEntryHeight( nSelect ) ); 1231 maFocusRect.SetSize( aSz ); 1232 if( HasFocus() ) 1233 ImplShowFocusRect(); |
1234//IAccessibility2 Implementation 2009---- 1235 if (bSelectPosChange) 1236 { 1237 maFocusHdl.Call(reinterpret_cast<void*>(nSelect)); 1238 } 1239//----IAccessibility2 Implementation 2009 |
|
1222 } 1223 ImplClearLayoutData(); 1224 } 1225 return bSelectionChanged; 1226} 1227 1228// ----------------------------------------------------------------------- 1229 --- 446 unchanged lines hidden (view full) --- 1676 && ( ( !mpEntryList->IsEntryPosSelected( nSelect ) ) 1677 || ( eLET == LET_KEYSPACE ) 1678 ) 1679 ) 1680 { 1681 DBG_ASSERT( !mpEntryList->IsEntryPosSelected( nSelect ) || mbMulti, "ImplListBox: Selecting same Entry" ); 1682 if( nSelect >= mpEntryList->GetEntryCount() ) 1683 nSelect = mpEntryList->GetEntryCount()-1; | 1240 } 1241 ImplClearLayoutData(); 1242 } 1243 return bSelectionChanged; 1244} 1245 1246// ----------------------------------------------------------------------- 1247 --- 446 unchanged lines hidden (view full) --- 1694 && ( ( !mpEntryList->IsEntryPosSelected( nSelect ) ) 1695 || ( eLET == LET_KEYSPACE ) 1696 ) 1697 ) 1698 { 1699 DBG_ASSERT( !mpEntryList->IsEntryPosSelected( nSelect ) || mbMulti, "ImplListBox: Selecting same Entry" ); 1700 if( nSelect >= mpEntryList->GetEntryCount() ) 1701 nSelect = mpEntryList->GetEntryCount()-1; |
1702//IAccessibility2 Implementation 2009----- 1703 sal_Bool bCurPosChange = (mnCurrentPos != nSelect); |
|
1684 mnCurrentPos = nSelect; | 1704 mnCurrentPos = nSelect; |
1685 if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) ) | 1705 //if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) ) 1706 if(SelectEntries( nSelect, eLET, bShift, bCtrl ,bCurPosChange)) 1707//-----IAccessibility2 Implementation 2009 |
1686 { 1687 mbTravelSelect = sal_True; 1688 mnSelectModifier = rKEvt.GetKeyCode().GetModifier(); 1689 ImplCallSelect(); 1690 mbTravelSelect = sal_False; 1691 } 1692 } 1693 --- 442 unchanged lines hidden (view full) --- 2136} 2137 2138// ----------------------------------------------------------------------- 2139 2140Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_uInt16 nItem ) const 2141{ 2142 const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem ); 2143 Size aSz( GetSizePixel().Width(), pEntry ? pEntry->mnHeight : GetEntryHeight() ); | 1708 { 1709 mbTravelSelect = sal_True; 1710 mnSelectModifier = rKEvt.GetKeyCode().GetModifier(); 1711 ImplCallSelect(); 1712 mbTravelSelect = sal_False; 1713 } 1714 } 1715 --- 442 unchanged lines hidden (view full) --- 2158} 2159 2160// ----------------------------------------------------------------------- 2161 2162Rectangle ImplListBoxWindow::GetBoundingRectangle( sal_uInt16 nItem ) const 2163{ 2164 const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem ); 2165 Size aSz( GetSizePixel().Width(), pEntry ? pEntry->mnHeight : GetEntryHeight() ); |
2144 long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) - mpEntryList->GetAddedHeight( GetTopEntry() ); | 2166 //long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) - mpEntryList->GetAddedHeight( GetTopEntry() ); 2167 //IAccessibility2 Impplementaton 2009----- 2168 long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) + GetEntryList()->GetMRUCount()*GetEntryHeight(); 2169 //-----IAccessibility2 Impplementaton 2009 |
2145 Rectangle aRect( Point( 0, nY ), aSz ); 2146 return aRect; 2147} 2148 2149 2150// ----------------------------------------------------------------------- 2151 2152void ImplListBoxWindow::StateChanged( StateChangedType nType ) --- 1108 unchanged lines hidden --- | 2170 Rectangle aRect( Point( 0, nY ), aSz ); 2171 return aRect; 2172} 2173 2174 2175// ----------------------------------------------------------------------- 2176 2177void ImplListBoxWindow::StateChanged( StateChangedType nType ) --- 1108 unchanged lines hidden --- |