Lines Matching refs:pEntry

63 					SvxIconChoiceCtrlEntry_Impl( SvxIconChoiceCtrlEntry* pEntry, const Rectangle& rBoundRect )  in SvxIconChoiceCtrlEntry_Impl()
64 : _pEntry( pEntry), _aPos( rBoundRect.TopLeft()) {} in SvxIconChoiceCtrlEntry_Impl()
296 void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos, in InsertEntry() argument
300 aEntries.Insert( pEntry, nPos ); in InsertEntry()
302 pEntry->nPos = aEntries.Count() - 1; in InsertEntry()
306 pZOrderList->Insert( (void*)pEntry, LIST_APPEND ); //pZOrderList->Count() ); in InsertEntry()
311 Size aSize( CalcBoundingSize( pEntry ) ); in InsertEntry()
312 SetBoundingRect_Impl( pEntry, *pPos, aSize ); in InsertEntry()
313 SetEntryPos( pEntry, *pPos, sal_False, sal_True, sal_True /*keep grid map*/ ); in InsertEntry()
314 pEntry->nFlags |= ICNVIEW_FLAG_POS_MOVED; in InsertEntry()
322 pEntry->aRect.Right() = LONG_MAX; in InsertEntry()
325 FindBoundingRect( pEntry ); in InsertEntry()
327 pGridMap->OccupyGrids( pEntry ); in InsertEntry()
328 if( !aOutputArea.IsOver( pEntry->aRect ) ) in InsertEntry()
330 pView->Invalidate( pEntry->aRect ); in InsertEntry()
333 InvalidateBoundingRect( pEntry->aRect ); in InsertEntry()
360 SvxIconChoiceCtrlEntry* pEntry = GetEntry( i ); in CreateAutoMnemonics() local
361 String aTxt = pEntry->GetText(); in CreateAutoMnemonics()
364 pEntry->SetText( aTxt ); in CreateAutoMnemonics()
383 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in SetListPositions() local
384 pEntry->nPos = nCur; in SetListPositions()
389 void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry ) in RemoveEntry() argument
400 if( pEntry == pCurHighlightFrame ) in RemoveEntry()
409 if( pEntry->IsSelected() ) in RemoveEntry()
412 if( aEntries.Count() == 1 && aEntries.GetObject(0) == pEntry ) in RemoveEntry()
419 if( pEntry == pAnchor ) in RemoveEntry()
421 if( pEntry->IsSelected() ) in RemoveEntry()
423 sal_Bool bEntryBoundValid = IsBoundingRectValid( pEntry->aRect ); in RemoveEntry()
425 pView->Invalidate( pEntry->aRect ); in RemoveEntry()
430 if( pEntry == pCursor ) in RemoveEntry()
439 if( bCurEntryPosValid && aEntries.GetObject(aEntries.Count()-1) != pEntry ) in RemoveEntry()
441 sal_uLong nPos = pZOrderList->GetPos( (void*)pEntry ); in RemoveEntry()
445 DBG_ASSERT(aEntries.GetObject(pEntry->nPos)==pEntry,"RemoveEntry: Wrong nPos in entry"); in RemoveEntry()
446 aEntries.Remove( pEntry->nPos ); in RemoveEntry()
449 aEntries.Remove( pEntry ); in RemoveEntry()
452 delete pEntry; in RemoveEntry()
463 void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect, in SelectEntry() argument
474 DeselectAllBut( pEntry, sal_True ); in SelectEntry()
478 if( pEntry->IsSelected() != bSelect ) in SelectEntry()
480 pHdlEntry = pEntry; in SelectEntry()
481 sal_uInt16 nEntryFlags = pEntry->GetFlags(); in SelectEntry()
485 pEntry->AssignFlags( nEntryFlags ); in SelectEntry()
488 CallSelectHandler( pEntry ); in SelectEntry()
493 pEntry->AssignFlags( nEntryFlags ); in SelectEntry()
498 EntrySelected( pEntry, bSelect, bSyncPaint ); in SelectEntry()
502 void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect, in EntrySelected() argument
510 pEntry != pCursor ) in EntrySelected()
512 SetCursor( pEntry ); in EntrySelected()
519 ToTop( pEntry ); in EntrySelected()
522 if( pEntry == pCursor ) in EntrySelected()
525 PaintEntry( pEntry ); in EntrySelected()
527 PaintEntryVirtOutDev( pEntry ); in EntrySelected()
530 pView->Invalidate( CalcFocusRect( pEntry ) ); in EntrySelected()
532 if( pEntry == pCursor ) in EntrySelected()
540 CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry ); in EntrySelected()
766 SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry ( i ); in Paint() local
767 if( pEntry->IsFocused() ) in Paint()
769 pCursor = pEntry; in Paint()
802 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nPos )); in Paint() local
803 const Rectangle& rBoundRect = GetEntryBoundRect( pEntry ); in Paint()
806 PaintEntry( pEntry, rBoundRect.TopLeft(), pView, sal_True ); in Paint()
808 pPaintedEntries->Insert( pEntry, LIST_APPEND ); in Paint()
811 pNewZOrderList->Insert( pEntry, LIST_APPEND ); in Paint()
845 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCur)); in RepaintEntries() local
846 if( pEntry->GetFlags() & nEntryFlagsMask ) in RepaintEntries()
848 const Rectangle& rBoundRect = GetEntryBoundRect( pEntry ); in RepaintEntries()
850 PaintEntry( pEntry, rBoundRect.TopLeft() ); in RepaintEntries()
865 IcnViewFieldType SvxIconChoiceCtrl_Impl::GetItem( SvxIconChoiceCtrlEntry* pEntry, in GetItem() argument
868 Rectangle aRect( CalcTextRect( pEntry ) ); in GetItem()
872 aRect = CalcBmpRect( pEntry ); in GetItem()
892 SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True ); in MouseButtonDown() local
893 if( pEntry ) in MouseButtonDown()
894 MakeEntryVisible( pEntry, sal_False ); in MouseButtonDown()
898 if( pEntry ) in MouseButtonDown()
899 SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), sal_True); in MouseButtonDown()
912 if( pEntry ) in MouseButtonDown()
913 aRect.Union( GetEntryBoundRect( pEntry ) ); in MouseButtonDown()
929 if( !pEntry && !(nWinBits & WB_NODRAGSELECTION)) in MouseButtonDown()
935 if( !pEntry ) in MouseButtonDown()
957 sal_Bool bSelected = pEntry->IsSelected(); in MouseButtonDown()
962 DeselectAllBut( pEntry ); in MouseButtonDown()
963 SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True ); in MouseButtonDown()
964 pHdlEntry = pEntry; in MouseButtonDown()
972 if( bEntryEditingEnabled && pEntry && in MouseButtonDown()
973 pEntry->IsSelected()) in MouseButtonDown()
975 if( pView->EditingEntry( pEntry )) in MouseButtonDown()
976 EditEntry( pEntry ); in MouseButtonDown()
981 DeselectAllBut( pEntry ); in MouseButtonDown()
982 SetCursor( pEntry ); in MouseButtonDown()
984 rMEvt.IsLeft() && IsTextHit( pEntry, aDocPos ) ) in MouseButtonDown()
995 SetEntryHighlightFrame( pEntry, sal_True ); in MouseButtonDown()
1004 DeselectAllBut( pEntry, sal_True /* Synchron painten */ ); in MouseButtonDown()
1005 SetCursor( pEntry ); in MouseButtonDown()
1006 SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True ); in MouseButtonDown()
1012 if( bEditingEnabled && IsTextHit( pEntry, aDocPos ) && in MouseButtonDown()
1067 SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame; in MouseButtonUp() local
1070 SetEntryHighlightFrame( pEntry, sal_True ); in MouseButtonUp()
1094 SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True ); in MouseMove() local
1095 SetEntryHighlightFrame( pEntry ); in MouseMove()
1638 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pZOrderList->GetObject(nCur); in CheckHorScrollBar() local
1639 long nRight = GetEntryBoundRect(pEntry).Right(); in CheckHorScrollBar()
1676 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pZOrderList->GetObject(nCur); in CheckVerScrollBar() local
1677 long nBottom = GetEntryBoundRect(pEntry).Bottom(); in CheckVerScrollBar()
1753 void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bIsBackgroundPain… in PaintEntry() argument
1755 Point aPos( GetEntryPos( pEntry ) ); in PaintEntry()
1756 PaintEntry( pEntry, aPos, 0, bIsBackgroundPainted ); in PaintEntry()
1843 IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, in PaintItem() argument
1850 aText = pView->GetEntryText( pEntry, sal_False ); in PaintItem()
1879 if( pEntry->IsFocused() ) in PaintItem()
1881 Rectangle aRect ( CalcFocusRect( (SvxIconChoiceCtrlEntry*)pEntry ) ); in PaintItem()
1894 pView->DrawEntryImage( pEntry, aPos, *pOut ); in PaintItem()
1898 void SvxIconChoiceCtrl_Impl::PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* pEntry ) in PaintEntryVirtOutDev() argument
1901 PaintEntry( pEntry ); in PaintEntryVirtOutDev()
1910 const Rectangle& rRect = GetEntryBoundRect( pEntry ); in PaintEntryVirtOutDev()
1931 PaintEntry( pEntry, Point(), pEntryPaintDev ); in PaintEntryVirtOutDev()
1943 void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, in PaintEntry() argument
1952 bSelected = pEntry->IsSelected(); in PaintEntry()
1954 sal_Bool bCursored = pEntry->IsCursored(); in PaintEntry()
1955 sal_Bool bDropTarget = pEntry->IsDropTarget(); in PaintEntry()
1956 sal_Bool bNoEmphasis = pEntry->IsBlockingEmphasis(); in PaintEntry()
1968 String aEntryText( pView->GetEntryText( pEntry, sal_False ) ); in PaintEntry()
1969 Rectangle aTextRect( CalcTextRect(pEntry,&rPos,sal_False,&aEntryText)); in PaintEntry()
1970 Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos ) ); in PaintEntry()
2005 pOut->DrawRect( CalcFocusRect( pEntry ) ); in PaintEntry()
2024 Rectangle aXRect( pEntry->aRect ); in PaintEntry()
2041 pView->DrawSelectionBackground( CalcFocusRect( pEntry ), in PaintEntry()
2044 PaintItem( aBmpRect, IcnViewFieldTypeImage, pEntry, nBmpPaintFlags, pOut ); in PaintEntry()
2046 PaintItem( aTextRect, IcnViewFieldTypeText, pEntry, in PaintEntry()
2050 if( pEntry == pCurHighlightFrame && !bNoEmphasis ) in PaintEntry()
2051 DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), sal_False ); in PaintEntry()
2058 void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, in SetEntryPos() argument
2062 Rectangle aBoundRect( GetEntryBoundRect( pEntry )); in SetEntryPos()
2064 ToTop( pEntry ); in SetEntryPos()
2071 pEntry->aGridRect.TopLeft() - pEntry->aRect.TopLeft() ); in SetEntryPos()
2076 pEntry->aRect = aBoundRect; in SetEntryPos()
2077 pEntry->aGridRect.SetPos( rPos + aGridOffs ); in SetEntryPos()
2092 const Rectangle& rBoundRect = GetEntryBoundRect( pEntry ); in SetEntryPos()
2093 Rectangle aCenterRect( CalcBmpRect( pEntry, 0 )); in SetEntryPos()
2095 Rectangle aNewBoundRect( aNewPos, pEntry->aRect.GetSize()); in SetEntryPos()
2099 AdjustEntryAtGrid( pEntry ); in SetEntryPos()
2100 ToTop( pEntry ); in SetEntryPos()
2103 AdjustVirtSize( pEntry->aRect ); in SetEntryPos()
2108 pView->Invalidate( pEntry->aRect ); in SetEntryPos()
2109 pGridMap->OccupyGrids( pEntry ); in SetEntryPos()
2113 SvxIconChoiceCtrlEntry* pPrev = FindEntryPredecessor( pEntry, rPos ); in SetEntryPos()
2114 SetEntryPredecessor( pEntry, pPrev ); in SetEntryPos()
2139 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCount)); in GetEntry() local
2140 if( pEntry->aRect.IsInside( rDocPos ) ) in GetEntry()
2144 Rectangle aRect = CalcBmpRect( pEntry ); in GetEntry()
2150 return pEntry; in GetEntry()
2151 aRect = CalcTextRect( pEntry ); in GetEntry()
2153 return pEntry; in GetEntry()
2156 return pEntry; in GetEntry()
2172 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCur)); in GetNextEntry() local
2173 if( pEntry->aRect.IsInside( rDocPos ) ) in GetNextEntry()
2175 pTarget = pEntry; in GetNextEntry()
2193 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nStartPos)); in GetPrevEntry() local
2194 if( pEntry->aRect.IsInside( rDocPos ) ) in GetPrevEntry()
2196 pTarget = pEntry; in GetPrevEntry()
2204 Point SvxIconChoiceCtrl_Impl::GetEntryPos( SvxIconChoiceCtrlEntry* pEntry ) in GetEntryPos() argument
2206 return pEntry->aRect.TopLeft(); in GetEntryPos()
2209 void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound ) in MakeEntryVisible() argument
2213 const Rectangle& rRect = GetEntryBoundRect( pEntry ); in MakeEntryVisible()
2218 Rectangle aRect = CalcBmpRect( pEntry ); in MakeEntryVisible()
2219 aRect.Union( CalcTextRect( pEntry ) ); in MakeEntryVisible()
2228 const Rectangle& SvxIconChoiceCtrl_Impl::GetEntryBoundRect( SvxIconChoiceCtrlEntry* pEntry ) in GetEntryBoundRect() argument
2230 if( !IsBoundingRectValid( pEntry->aRect )) in GetEntryBoundRect()
2231 FindBoundingRect( pEntry ); in GetEntryBoundRect()
2232 return pEntry->aRect; in GetEntryBoundRect()
2235 Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, const Point* pPos ) in CalcBmpRect() argument
2237 Rectangle aBound = GetEntryBoundRect( pEntry ); in CalcBmpRect()
2262 Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, in CalcTextRect() argument
2267 aEntryText = pView->GetEntryText( pEntry, bEdit ); in CalcTextRect()
2271 const Rectangle aMaxTextRect( CalcMaxTextRect( pEntry ) ); in CalcTextRect()
2272 Rectangle aBound( GetEntryBoundRect( pEntry ) ); in CalcTextRect()
2322 long SvxIconChoiceCtrl_Impl::CalcBoundingWidth( SvxIconChoiceCtrlEntry* pEntry ) const in CalcBoundingWidth()
2324 long nStringWidth = GetItemSize( pEntry, IcnViewFieldTypeText ).Width(); in CalcBoundingWidth()
2344 long SvxIconChoiceCtrl_Impl::CalcBoundingHeight( SvxIconChoiceCtrlEntry* pEntry ) const in CalcBoundingHeight()
2346 long nStringHeight = GetItemSize( pEntry, IcnViewFieldTypeText).Height(); in CalcBoundingHeight()
2371 Size SvxIconChoiceCtrl_Impl::CalcBoundingSize( SvxIconChoiceCtrlEntry* pEntry ) const in CalcBoundingSize()
2373 return Size( CalcBoundingWidth( pEntry ), in CalcBoundingSize()
2374 CalcBoundingHeight( pEntry ) ); in CalcBoundingSize()
2383 SvxIconChoiceCtrlEntry* pEntry; in RecalcAllBoundingRects() local
2389 pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in RecalcAllBoundingRects()
2390 FindBoundingRect( pEntry ); in RecalcAllBoundingRects()
2391 pZOrderList->Insert( pEntry, LIST_APPEND ); in RecalcAllBoundingRects()
2397 pEntry = pHead; in RecalcAllBoundingRects()
2400 …DBG_ASSERT(pEntry->pflink&&pEntry->pblink,"SvxIconChoiceCtrl_Impl::RecalcAllBoundingRect > Bad lin… in RecalcAllBoundingRects()
2401 FindBoundingRect( pEntry ); in RecalcAllBoundingRects()
2402 pZOrderList->Insert( pEntry, pZOrderList->Count() ); in RecalcAllBoundingRects()
2403 pEntry = pEntry->pflink; in RecalcAllBoundingRects()
2416 SvxIconChoiceCtrlEntry* pEntry; in RecalcAllBoundingRectsSmart() local
2423 pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in RecalcAllBoundingRectsSmart()
2424 if( IsBoundingRectValid( pEntry->aRect )) in RecalcAllBoundingRectsSmart()
2426 Size aBoundSize( pEntry->aRect.GetSize() ); in RecalcAllBoundingRectsSmart()
2431 FindBoundingRect( pEntry ); in RecalcAllBoundingRectsSmart()
2432 pZOrderList->Insert( pEntry, LIST_APPEND ); in RecalcAllBoundingRectsSmart()
2438 pEntry = pHead; in RecalcAllBoundingRectsSmart()
2441 …DBG_ASSERT(pEntry->pflink&&pEntry->pblink,"SvxIconChoiceCtrl_Impl::RecalcAllBoundingRect > Bad lin… in RecalcAllBoundingRectsSmart()
2442 if( IsBoundingRectValid( pEntry->aRect )) in RecalcAllBoundingRectsSmart()
2444 Size aBoundSize( pEntry->aRect.GetSize() ); in RecalcAllBoundingRectsSmart()
2449 FindBoundingRect( pEntry ); in RecalcAllBoundingRectsSmart()
2450 pZOrderList->Insert( pEntry, LIST_APPEND ); in RecalcAllBoundingRectsSmart()
2451 pEntry = pEntry->pflink; in RecalcAllBoundingRectsSmart()
2463 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in UpdateBoundingRects() local
2464 GetEntryBoundRect( pEntry ); in UpdateBoundingRects()
2468 void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry ) in FindBoundingRect() argument
2470 DBG_ASSERT(!pEntry->IsPosLocked(),"Locked entry pos in FindBoundingRect"); in FindBoundingRect()
2471 if( pEntry->IsPosLocked() && IsBoundingRectValid( pEntry->aRect) ) in FindBoundingRect()
2473 AdjustVirtSize( pEntry->aRect ); in FindBoundingRect()
2476 Size aSize( CalcBoundingSize( pEntry ) ); in FindBoundingRect()
2478 SetBoundingRect_Impl( pEntry, aPos, aSize ); in FindBoundingRect()
2481 void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntry, const Point& rPo… in SetBoundingRect_Impl() argument
2485 pEntry->aGridRect = aGridRect; in SetBoundingRect_Impl()
2486 Center( pEntry ); in SetBoundingRect_Impl()
2487 AdjustVirtSize( pEntry->aRect ); in SetBoundingRect_Impl()
2488 pGridMap->OccupyGrids( pEntry ); in SetBoundingRect_Impl()
2492 void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSyncSingleSelecti… in SetCursor() argument
2495 if( pEntry == pCursor ) in SetCursor()
2504 pCursor = pEntry; in SetCursor()
2700 void SvxIconChoiceCtrl_Impl::InvalidateBoundingRect( SvxIconChoiceCtrlEntry* pEntry ) in InvalidateBoundingRect() argument
2702 InvalidateBoundingRect( pEntry->aRect ); in InvalidateBoundingRect()
2802 void SvxIconChoiceCtrl_Impl::ToTop( SvxIconChoiceCtrlEntry* pEntry ) in ToTop() argument
2804 if( pZOrderList->GetObject( pZOrderList->Count() - 1 ) != pEntry ) in ToTop()
2806 sal_uLong nPos = pZOrderList->GetPos( (void*)pEntry ); in ToTop()
2808 pZOrderList->Insert( pEntry, LIST_APPEND ); in ToTop()
2961 void SvxIconChoiceCtrl_Impl::ToggleSelection( SvxIconChoiceCtrlEntry* pEntry ) in ToggleSelection() argument
2964 if( pEntry->IsSelected() ) in ToggleSelection()
2968 SelectEntry( pEntry, bSel, sal_True, sal_True ); in ToggleSelection()
2981 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in DeselectAllBut() local
2982 if( pEntry != pThisEntryNot && pEntry->IsSelected() ) in DeselectAllBut()
2983 SelectEntry( pEntry, sal_False, sal_True, sal_True, bPaintSync ); in DeselectAllBut()
3035 Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const in CalcMaxTextRect()
3039 if( IsBoundingRectValid( pEntry->aRect ) ) in CalcMaxTextRect()
3040 aBoundRect = pEntry->aRect; in CalcMaxTextRect()
3042 aBoundRect = pEntry->aGridRect; in CalcMaxTextRect()
3045 (SvxIconChoiceCtrlEntry*)pEntry ) ); in CalcMaxTextRect()
3058 if( GetEntryTextModeSmart( pEntry ) == IcnShowTextFull ) in CalcMaxTextRect()
3100 void SvxIconChoiceCtrl_Impl::Center( SvxIconChoiceCtrlEntry* pEntry ) const in Center()
3102 pEntry->aRect = pEntry->aGridRect; in Center()
3103 Size aSize( CalcBoundingSize( pEntry ) ); in Center()
3107 long nBorder = pEntry->aGridRect.GetWidth() - aSize.Width(); in Center()
3108 pEntry->aRect.Left() += nBorder / 2; in Center()
3109 pEntry->aRect.Right() -= nBorder / 2; in Center()
3112 pEntry->aRect.Bottom() = pEntry->aRect.Top() + aSize.Height(); in Center()
3140 Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry ) in CalcFocusRect() argument
3142 Rectangle aBmpRect( CalcBmpRect( pEntry ) ); in CalcFocusRect()
3143 Rectangle aTextRect( CalcTextRect( pEntry ) ); in CalcFocusRect()
3144 Rectangle aBoundRect( GetEntryBoundRect( pEntry ) ); in CalcFocusRect()
3148 if( aFocusRect.Left() - 1 >= pEntry->aRect.Left() ) in CalcFocusRect()
3150 if( aFocusRect.Right() + 1 <= pEntry->aRect.Right() ) in CalcFocusRect()
3208 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nPos )); in SelectRect() local
3210 if( !IsBoundingRectValid( pEntry->aRect )) in SelectRect()
3211 FindBoundingRect( pEntry ); in SelectRect()
3212 Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) ); in SelectRect()
3213 sal_Bool bSelected = pEntry->IsSelected(); in SelectRect()
3227 SelectEntry( pEntry, sal_True, sal_True, sal_True ); in SelectRect()
3234 SelectEntry( pEntry, sal_False, sal_True, sal_True ); in SelectRect()
3254 SelectEntry( pEntry, sal_False, sal_True, sal_True ); in SelectRect()
3260 SelectEntry( pEntry, sal_True, sal_True, sal_True ); in SelectRect()
3266 SelectEntry( pEntry, sal_False, sal_True, sal_True ); in SelectRect()
3288 SvxIconChoiceCtrlEntry* pEntry; in SelectRange() local
3296 pEntry = GetEntry( i ); in SelectRange()
3297 if( pEntry->IsSelected() ) in SelectRange()
3298 SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True ); in SelectRange()
3305 pEntry = GetEntry( i ); in SelectRange()
3306 if( ! pEntry->IsSelected() ) in SelectRange()
3307 SelectEntry( pEntry, sal_True, sal_True, sal_True, sal_True ); in SelectRange()
3317 pEntry = GetEntry( i ); in SelectRange()
3318 if( pEntry->IsSelected() ) in SelectRange()
3319 SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True ); in SelectRange()
3432 SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry( rCEvt.GetMousePosPixel() ); in PrepareCommandEvent() local
3433 if( (nFlags & F_DOWN_CTRL) && pEntry && !pEntry->IsSelected() ) in PrepareCommandEvent()
3434 SelectEntry( pEntry, sal_True, sal_True ); in PrepareCommandEvent()
3438 sal_Bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) in IsTextHit() argument
3440 Rectangle aRect( CalcTextRect( pEntry )); in IsTextHit()
3448 SvxIconChoiceCtrlEntry* pEntry = GetCurEntry(); in IMPL_LINK() local
3449 if( bEntryEditingEnabled && pEntry && in IMPL_LINK()
3450 pEntry->IsSelected()) in IMPL_LINK()
3452 if( pView->EditingEntry( pEntry )) in IMPL_LINK()
3453 EditEntry( pEntry ); in IMPL_LINK()
3548 …hoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry ) in SetEntryTextMode() argument
3550 if( !pEntry ) in SetEntryTextMode()
3562 if( pEntry->eTextMode != eMode ) in SetEntryTextMode()
3564 pEntry->eTextMode = eMode; in SetEntryTextMode()
3565 InvalidateEntry( pEntry ); in SetEntryTextMode()
3566 pView->Invalidate( GetEntryBoundRect( pEntry ) ); in SetEntryTextMode()
3567 AdjustVirtSize( pEntry->aRect ); in SetEntryTextMode()
3572 SvxIconChoiceCtrlTextMode SvxIconChoiceCtrl_Impl::GetTextMode( const SvxIconChoiceCtrlEntry* pEntry in GetTextMode()
3574 if( !pEntry ) in GetTextMode()
3576 return pEntry->GetTextMode(); in GetTextMode()
3579 …extMode SvxIconChoiceCtrl_Impl::GetEntryTextModeSmart( const SvxIconChoiceCtrlEntry* pEntry ) const in GetEntryTextModeSmart()
3581 DBG_ASSERT(pEntry,"GetEntryTextModeSmart: Entry not set"); in GetEntryTextModeSmart()
3582 SvxIconChoiceCtrlTextMode eMode = pEntry->GetTextMode(); in GetEntryTextModeSmart()
3588 void SvxIconChoiceCtrl_Impl::ShowEntryFocusRect( const SvxIconChoiceCtrlEntry* pEntry ) in ShowEntryFocusRect() argument
3590 if( !pEntry ) in ShowEntryFocusRect()
3596 Rectangle aRect ( CalcFocusRect( (SvxIconChoiceCtrlEntry*)pEntry ) ); in ShowEntryFocusRect()
3694 void SvxIconChoiceCtrl_Impl::InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry ) in InvalidateEntry() argument
3696 if( pEntry == pCursor ) in InvalidateEntry()
3698 pView->Invalidate( pEntry->aRect ); in InvalidateEntry()
3699 Center( pEntry ); in InvalidateEntry()
3700 pView->Invalidate( pEntry->aRect ); in InvalidateEntry()
3701 if( pEntry == pCursor ) in InvalidateEntry()
3705 void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) in EditEntry() argument
3707 DBG_ASSERT(pEntry,"EditEntry: Entry not set"); in EditEntry()
3708 if( !pEntry ) in EditEntry()
3715 pCurEditedEntry = pEntry; in EditEntry()
3716 String aEntryText( pView->GetEntryText( pEntry, sal_True ) ); in EditEntry()
3717 Rectangle aRect( CalcTextRect( pEntry, 0, sal_True, &aEntryText ) ); in EditEntry()
3775 void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bLock ) in LockEntryPos() argument
3778 pEntry->SetFlags( ICNVIEW_FLAG_POS_LOCKED ); in LockEntryPos()
3780 pEntry->ClearFlags( ICNVIEW_FLAG_POS_LOCKED ); in LockEntryPos()
3799 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in GetFirstSelectedEntry() local
3800 if( pEntry->IsSelected() ) in GetFirstSelectedEntry()
3803 return pEntry; in GetFirstSelectedEntry()
3809 SvxIconChoiceCtrlEntry* pEntry = pHead; in GetFirstSelectedEntry() local
3812 if( pEntry->IsSelected() ) in GetFirstSelectedEntry()
3814 rPos = GetEntryListPos( pEntry ); in GetFirstSelectedEntry()
3815 return pEntry; in GetFirstSelectedEntry()
3817 pEntry = pEntry->pflink; in GetFirstSelectedEntry()
3818 if( nCount && pEntry == pHead ) in GetFirstSelectedEntry()
3838 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in GetNextSelectedEntry() local
3839 if( pEntry->IsSelected() ) in GetNextSelectedEntry()
3842 return pEntry; in GetNextSelectedEntry()
3848 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( rStartPos ); in GetNextSelectedEntry() local
3849 pEntry = pEntry->pflink; in GetNextSelectedEntry()
3850 while( pEntry != pHead ) in GetNextSelectedEntry()
3852 if( pEntry->IsSelected() ) in GetNextSelectedEntry()
3854 rStartPos = GetEntryListPos( pEntry ); in GetNextSelectedEntry()
3855 return pEntry; in GetNextSelectedEntry()
3857 pEntry = pEntry->pflink; in GetNextSelectedEntry()
3872 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in SelectAll() local
3873 SelectEntry( pEntry, bSelect, sal_True, sal_True, bPaint ); in SelectAll()
3884 SvxIconChoiceCtrlEntry* pEntry = GetFirstSelectedEntry( nPos ); in SaveSelection() local
3885 while( pEntry && GetSelectionCount() != (*ppList)->Count() ) in SaveSelection()
3887 (*ppList)->Insert( pEntry, LIST_APPEND ); in SaveSelection()
3888 pEntry = GetNextSelectedEntry( nPos ); in SaveSelection()
4020 sal_uLong SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const in GetEntryListPos()
4024 return pEntry->nPos; in GetEntryListPos()
4048 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nStart ); in SetEntryListPos() local
4049 pEntry->nPos = nStart; in SetEntryListPos()
4053 void SvxIconChoiceCtrl_Impl::SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nEntryFlags ) in SetEntryFlags() argument
4055 pEntry->nFlags = nEntryFlags; in SetEntryFlags()
4141 void EntryList_Impl::Insert( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos ) in Insert() argument
4143 List::Insert( pEntry, nPos ); in Insert()
4145 pEntry->SetBacklink( _pOwner->pHead->pblink ); in Insert()
4150 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)List::Remove( nPos ); in Remove() local
4151 DBG_ASSERT(pEntry,"EntryList_Impl::Remove > Entry not found"); in Remove()
4152 Removed_Impl( pEntry ); in Remove()
4153 return pEntry; in Remove()
4156 void EntryList_Impl::Remove( SvxIconChoiceCtrlEntry* pEntry ) in Remove() argument
4158 List::Remove( (void*)pEntry ); in Remove()
4159 Removed_Impl( pEntry ); in Remove()
4162 void EntryList_Impl::Removed_Impl( SvxIconChoiceCtrlEntry* pEntry ) in Removed_Impl() argument
4166 if( _pOwner->pHead == pEntry ) in Removed_Impl()
4168 if( _pOwner->pHead != pEntry->pflink ) in Removed_Impl()
4169 _pOwner->pHead = pEntry->pflink; in Removed_Impl()
4176 pEntry->Unlink(); in Removed_Impl()
4204 SvxIconChoiceCtrlEntry* pEntry = pHead; in SetPositionMode()
4208 if( GetEntryPredecessor( pEntry, &pPred )) in SetPositionMode()
4209 SetEntryFlags( pEntry, ICNVIEW_FLAG_POS_MOVED ); in SetPositionMode()
4210 pEntry = pEntry->pflink; in SetPositionMode()
4224 SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur ); in SetPositionMode() local
4225 if( pEntry->GetFlags() & (ICNVIEW_FLAG_POS_LOCKED | ICNVIEW_FLAG_POS_MOVED)) in SetPositionMode()
4228 pEntry, GetEntryBoundRect( pEntry )); in SetPositionMode()
4249 void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry, in SetEntryPredecessor() argument
4255 if( pEntry == pPredecessor ) in SetEntryPredecessor()
4258 sal_uLong nPos1 = GetEntryListPos( pEntry ); in SetEntryPredecessor()
4274 if( !pPredecessor && pHead == pEntry ) in SetEntryPredecessor()
4283 if( pEntry == pHead ) in SetEntryPredecessor()
4288 if( pEntry != pPredecessor ) in SetEntryPredecessor()
4290 pEntry->Unlink(); in SetEntryPredecessor()
4291 pEntry->SetBacklink( pPredecessor ); in SetEntryPredecessor()
4294 pHead = pEntry; in SetEntryPredecessor()
4295 pEntry->SetFlags( ICNVIEW_FLAG_PRED_SET ); in SetEntryPredecessor()
4299 sal_Bool SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry, in GetEntryPredecessor() argument
4305 DBG_ASSERT(pEntry->pblink,"GetEntryPredecessor: Backward link not set"); in GetEntryPredecessor()
4306 DBG_ASSERT(pEntry->pflink,"GetEntryPredecessor: Forward link not set"); in GetEntryPredecessor()
4308 if( pEntry == pHead ) in GetEntryPredecessor()
4311 if( pFirst != pEntry ) in GetEntryPredecessor()
4315 *ppPredecessor = pEntry->pblink; in GetEntryPredecessor()
4316 if( !(pEntry->nFlags & ICNVIEW_FLAG_PRED_SET) && in GetEntryPredecessor()
4317 (GetEntryListPos( *ppPredecessor ) + 1) == GetEntryListPos( pEntry )) in GetEntryPredecessor()
4322 …xIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry, in FindEntryPredecessor() argument
4326 Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos )); in FindEntryPredecessor()
4385 SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, sal_True ); in RequestHelp() local
4387 if ( !pEntry ) in RequestHelp()
4390 String sQuickHelpText = pEntry->GetQuickHelpText(); in RequestHelp()
4391 String aEntryText( pView->GetEntryText( pEntry, sal_False ) ); in RequestHelp()
4392 Rectangle aTextRect( CalcTextRect( pEntry, 0, sal_False, &aEntryText ) ); in RequestHelp()
4518 void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry, in SetEntryHighlightFrame() argument
4521 if( pEntry == pCurHighlightFrame ) in SetEntryHighlightFrame()
4528 pCurHighlightFrame = pEntry; in SetEntryHighlightFrame()
4529 if( pEntry ) in SetEntryHighlightFrame()
4531 Rectangle aBmpRect( CalcFocusRect(pEntry) ); in SetEntryHighlightFrame()
4541 SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame; in HideEntryHighlightFrame() local
4543 Rectangle aBmpRect( CalcFocusRect(pEntry) ); in HideEntryHighlightFrame()
4582 SvxIconChoiceCtrlEntry* pEntry = GetCurEntry(); in GetPopupMenuPosPixel() local
4583 if( !pEntry || !pEntry->IsSelected() ) in GetPopupMenuPosPixel()
4586 pEntry = GetFirstSelectedEntry( nNext ); in GetPopupMenuPosPixel()
4588 if( pEntry ) in GetPopupMenuPosPixel()
4590 Rectangle aRect( ((SvxIconChoiceCtrl_Impl*)this)->CalcBmpRect( pEntry ) ); in GetPopupMenuPosPixel()