28 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
58 #define SVLBOX_ACC_RETURN 1
59 #define SVLBOX_ACC_ESCAPE 2
66 Idle aIdle {
"svtools::SvInplaceEdit2 aIdle" };
71 void CallCallBackHdl_Impl();
84 OUString GetText()
const;
85 OUString
const & GetSavedValue()
const;
86 void StopEditing(
bool bCancel );
94 class MyEdit_Impl :
public Edit
99 virtual ~MyEdit_Impl()
override { disposeOnce(); }
116 void MyEdit_Impl::KeyInput(
const KeyEvent& rKEvt )
118 if( !
pOwner->KeyInput( rKEvt ))
122 void MyEdit_Impl::LoseFocus()
132 const OUString& rData,
137 aCallBackHdl ( rNotifyEditEnd ),
139 bAlreadyInCallBack (
false )
148 aFont.SetFillColor(aColor );
149 pEdit->SetFont( aFont );
151 pEdit->SetPosPixel( rPos );
152 pEdit->SetSizePixel( rSize );
153 pEdit->SetText( rData );
154 pEdit->SetSelection( rSelection );
193 CallCallBackHdl_Impl();
199 CallCallBackHdl_Impl();
246 CallCallBackHdl_Impl();
295 nOffset = nTabWidth - nItemWidth;
304 nOffset = ( nTabWidth - nItemWidth ) / 2;
313 nOffset = -( nItemWidth / 2 );
336 int nWidth = pViewData->
mnWidth;
382 m_aQuickSelectionEngine(_rBox) {}
390 mbContextBmpExpanded(
false),
391 mbAlternatingRowColors(
false),
392 mbUpdateAlternatingRows(
false),
393 mbQuickSearch(
false),
394 mbActivateOnSingleClick(
false),
395 mbHoverSelection(
false),
396 mbSelectingByHover(
false),
401 mbCenterAndClipText(
false)
410 SetType(WindowType::TREELISTBOX);
426 return CloneEntry(pEntry);
431 sal_uInt32 nInsPos =
pModel->Insert( pEntry, pParent, nPos );
439 sal_uInt32 nInsPos =
pModel->Insert( pEntry, nRootPos );
472 if ( pSource !=
this )
509 sal_uInt32& rNewChildPos)
511 DBG_ASSERT(pEntry,
"NotifyMoving:SourceEntry?");
514 rpNewParent =
nullptr;
529 rpNewParent = pTarget;
543 sal_uInt32& rNewChildPos)
545 return NotifyMoving(pTarget,pEntry,rpNewParent,rNewChildPos);
550 return pModel->FirstChild(pParent);
557 bool bSuccess =
true;
558 std::vector<SvTreeListEntry*> aList;
566 while ( pSourceEntry )
570 aList.push_back( pSourceEntry );
574 for (
auto const& elem : aList)
584 sal_uInt32 nCloneCount = 0;
585 pSourceEntry =
pModel->Clone(pSourceEntry, nCloneCount);
586 pModel->InsertTree(pSourceEntry, pNewParent, nInsertionPos);
590 sal_uInt32 nListPos =
pModel->Copy(pSourceEntry, pNewParent, nInsertionPos);
591 pSourceEntry =
GetEntry( pNewParent, nListPos );
600 pModel->SetCloneLink( aCloneLink );
608 bool bSuccess =
true;
609 std::vector<SvTreeListEntry*> aList;
616 while ( pSourceEntry )
620 aList.push_back( pSourceEntry );
624 for (
auto const& elem : aList)
631 if ( !nOk && bAllowCopyFallback )
634 nCopyOk =
NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
637 if ( nOk || nCopyOk )
641 sal_uInt32 nCloneCount = 0;
642 pSourceEntry =
pModel->Clone(pSourceEntry, nCloneCount);
643 pModel->InsertTree(pSourceEntry, pNewParent, nInsertionPos);
648 pModel->Move(pSourceEntry, pNewParent, nInsertionPos);
650 pModel->Copy(pSourceEntry, pNewParent, nInsertionPos);
659 pModel->SetCloneLink( aCloneLink );
665 std::vector<const SvTreeListEntry*> aList;
671 aList.push_back( pEntry );
678 for (
auto const& elem : aList)
693 sal_uInt16 nCurPos = 0;
694 while ( nCurPos < nCount )
700 pEntry =
Next( pEntry );
708 if ( !bShow && !(
nImpFlags & SvTreeListBoxFlags::TARGEMPH_VIS) )
710 pImpl->PaintDDCursor( pEntry, bShow);
719 if ( !
mpImpl->m_bDoingQuickSelection )
720 mpImpl->m_aQuickSelectionEngine.Reset();
725 return pModel->GetEntry(pParent, nPos);
730 return pModel->GetEntry(nRootPos);
738 for (
auto const& elem : _rPath)
759 for ( i = 0; i < nCount; ++i )
763 if ( pEntry == pTemp )
765 _rPath.push_front( static_cast<sal_Int32>(i) );
772 pEntry = pParentEntry;
773 pParentEntry =
GetParent( pParentEntry );
782 return pModel->GetParent(pEntry);
787 return pModel->GetChildCount(pParent);
818 assert(pEntryData &&
"Entry not in View");
819 sal_uInt16 nItemPos = pEntry->
GetPos(pItem);
820 return &pEntryData->
GetItem(nItemPos);
830 sal_uInt16 nCurPos = 0;
831 while( nCurPos < nCount )
842 sal_uInt16 nRefDepth;
851 nRefDepth =
pModel->GetDepth( pSelEntry );
852 pTemp =
Next( pSelEntry );
853 while( pTemp &&
pModel->GetDepth( pTemp ) > nRefDepth )
856 pTemp =
Next( pTemp );
862 nRefDepth =
pModel->GetDepth( pSelEntry );
863 pTemp =
Next( pSelEntry );
864 while( pTemp &&
pModel->GetDepth( pTemp ) > nRefDepth )
867 pTemp =
Next( pTemp );
897 if ( !pEdCtrl->EditingCanceled() )
898 aStr = pEdCtrl->GetText();
900 aStr = pEdCtrl->GetSavedValue();
920 pEdCtrl->StopEditing( bCancel );
955 if ( !pNextSiblingEntry )
956 pEntry =
Next( pEntry );
958 pEntry = pNextSiblingEntry;
962 pEntry =
Next( pEntry );
977 DBG_ASSERT( pEntry,
"SvTreeListBox::SelectSearchEntry: invalid entry!" );
993 mpImpl->m_bDoingQuickSelection =
true;
994 const bool bHandled =
mpImpl->m_aQuickSelectionEngine.HandleKeyEvent( _rKEvt );
995 mpImpl->m_bDoingQuickSelection =
false;
1015 SAL_WARN(
"svtools.contnr",
"SvTreeListBox::QueryDrop(): no target" );
1022 SAL_WARN(
"svtools.contnr",
"SvTreeListBox::QueryDrop(): no format" );
1026 DBG_ASSERT(g_pDDSource,
"SvTreeListBox::QueryDrop(): SourceBox == 0");
1050 assert(pSourceView);
1059 if( aData.
HasFormat( SotClipboardFormatId::TREELISTBOX ))
1101 g_pDDTarget =
nullptr;
1110 if(
pImpl->IsCaptureOnButtonActive())
1133 xContainer->CopyAnyData( SotClipboardFormatId::TREELISTBOX,
1185 g_pDDSource =
nullptr;
1186 g_pDDTarget =
nullptr;
1214 std::set<const void*> gSortLBoxes;
1219 gSortLBoxes.insert( &rB );
1224 gSortLBoxes.erase( &rB );
1229 auto &rSortLBoxes = gSortLBoxes;
1230 auto it = rSortLBoxes.find(
this);
1231 if( it != rSortLBoxes.end() )
1233 DragFinished( nAction );
1234 rSortLBoxes.erase( it );
1241 return LINK( const_cast<SvTreeListBox*>(
this),
SvTreeListBox, DragFinishHdl_Impl );
1251 #define SV_LBOX_DEFAULT_INDENT_PIXEL 20
1286 OUStringBuffer sRet;
1289 sal_uInt16 nCur = 0;
1290 while( nCur < nCount )
1294 !static_cast<SvLBoxString&>( rItem ).GetText().isEmpty() )
1296 sRet.append(static_cast<SvLBoxString&>( rItem ).
GetText() +
",");
1301 if (!sRet.isEmpty())
1302 sRet.remove(sRet.getLength() - 1, 1);
1303 return sRet.makeStringAndClear();
1331 if (
this == g_pDDSource)
1332 g_pDDSource =
nullptr;
1333 if (
this == g_pDDTarget)
1334 g_pDDTarget =
nullptr;
1345 pImpl->SetNoAutoCurEntry( b );
1350 pImpl->m_bSubLstOpLR =
true;
1362 pImpl->ShowCursor(
false );
1363 pImpl->ShowCursor(
true );
1380 #define NO_BUTTONS 0
1381 #define NODE_BUTTONS 1
1382 #define NODE_AND_CHECK_BUTTONS 2
1383 #define CHECK_BUTTONS 3
1385 #define TABFLAGS_TEXT (SvLBoxTabFlags::DYNAMIC | \
1386 SvLBoxTabFlags::ADJUST_LEFT | \
1387 SvLBoxTabFlags::EDITABLE | \
1388 SvLBoxTabFlags::SHOW_SELECTION)
1390 #define TABFLAGS_CONTEXTBMP (SvLBoxTabFlags::DYNAMIC | SvLBoxTabFlags::ADJUST_CENTER)
1392 #define TABFLAGS_CHECKBTN (SvLBoxTabFlags::DYNAMIC | \
1393 SvLBoxTabFlags::ADJUST_CENTER)
1395 #define TAB_STARTPOS 2
1419 tools::Long nContextWidthDIV2 = nContextWidth / 2;
1440 nStartPos += nContextWidthDIV2;
1442 nStartPos += nContextWidthDIV2;
1450 if( bHasButtonsAtRoot )
1451 nStartPos += (
nIndent + (nNodeWidthPixel/2) );
1453 nStartPos += nContextWidthDIV2;
1455 nStartPos += nContextWidthDIV2;
1463 if( bHasButtonsAtRoot )
1464 nStartPos += (
nIndent + nNodeWidthPixel );
1466 nStartPos += nCheckWidthDIV2;
1468 nStartPos += nCheckWidthDIV2;
1470 nStartPos += nContextWidthDIV2;
1472 nStartPos += nContextWidthDIV2;
1480 nStartPos += nCheckWidthDIV2;
1482 nStartPos += nCheckWidthDIV2;
1484 nStartPos += nContextWidthDIV2;
1486 nStartPos += nContextWidthDIV2;
1493 pImpl->NotifyTabsChanged();
1497 const OUString& aStr,
const Image& aCollEntryBmp,
const Image& aExpEntryBmp)
1506 pEntry->
AddItem(std::make_unique<SvLBoxString>(aStr));
1535 pHdlEntry =
pData->GetActEntry();
1540 const OUString& rText,
1542 bool bChildrenOnDemand, sal_uInt32 nPos,
1548 const Image& rDefExpBmp =
pImpl->GetDefaultEntryExpBmp( );
1549 const Image& rDefColBmp =
pImpl->GetDefaultEntryColBmp( );
1556 InitEntry( pEntry, rText, rDefColBmp, rDefExpBmp );
1562 Insert( pEntry, pParent, nPos );
1598 short nWidth =
pImpl->UpdateContextBmpWidthVector( pEntry, static_cast<short>(aSize.
Width()) );
1616 short nWidth =
pImpl->UpdateContextBmpWidthVector( pEntry, static_cast<short>(aSize.
Width()) );
1629 auto nWidth = pItem->
GetWidth(
this, pEntry);
1729 Image aCollEntryBmp;
1734 aStr = pStringItem->
GetText();
1742 InitEntry( pClone, aStr, aCollEntryBmp, aExpEntryBmp );
1743 pClone->SvTreeListEntry::Clone( pSource );
1752 return pImpl->GetDefaultEntryExpBmp( );
1757 return pImpl->GetDefaultEntryColBmp( );
1767 pImpl->SetDefaultEntryExpBmp( aBmp );
1777 pImpl->SetDefaultEntryColBmp( aBmp );
1843 if( !
pImpl->KeyInput( rKEvt ) )
1870 pEntry =
pImpl->GetCurEntry();
1872 if (
pImpl->m_pCursor)
1874 if (pEntry !=
pImpl->m_pCursor)
1875 pEntry =
pImpl->m_pCursor;
1894 pImpl->m_pCursor =
nullptr;
1915 if (rPos.X() < 0 || rPos.Y() < 0)
1918 if (rPos.X() > aSize.
Width() || rPos.Y() > aSize.
Height())
1920 if (
pImpl->m_aVerSBar->IsVisible())
1923 if (aRect.Contains(rPos))
1926 if (
pImpl->m_aHorSBar->IsVisible())
1929 if (aRect.Contains(rPos))
1937 if( !nDeltaEntries || !
pImpl->m_aVerSBar->IsVisible() )
1943 if( nDeltaEntries < 0 )
1946 nDeltaEntries *= -1;
1949 if( nDeltaEntries > (nMax - nTemp) )
1950 nDeltaEntries =
static_cast<short>(nMax - nTemp);
1951 pImpl->PageDown( static_cast<sal_uInt16>(nDeltaEntries) );
1955 if( nDeltaEntries > nThumb )
1956 nDeltaEntries =
static_cast<short>(nThumb);
1957 pImpl->PageUp( static_cast<sal_uInt16>(nDeltaEntries) );
1959 pImpl->SyncVerThumb();
1964 pImpl->ScrollToAbsPos( nPos );
1970 pImpl->SetSelectionMode( eSelectMode );
1976 pImpl->SetDragDropMode( nDDMode );
1983 sal_uInt16 nCur = 0;
1985 while( nCur < nCount )
1988 if( nHeight > nHeightMax )
1989 nHeightMax = nHeight;
1997 pImpl->SetEntryHeight();
2011 pImpl->SetEntryHeight();
2026 pImpl->SetEntryHeight();
2036 pImpl->SetEntryHeight();
2043 bool bExpanded =
false;
2056 pImpl->EntryExpanded( pParent );
2086 bool bCollapsed =
false;
2091 pImpl->CollapsingEntry( pParent );
2093 pImpl->EntryCollapsed( pParent );
2115 pImpl->EntrySelected( pEntry, bSelect );
2130 pImpl->DestroyAnchor();
2131 sal_uInt32 nRet = 0;
2134 sal_uInt16 nRefDepth =
pModel->GetDepth( pParent );
2138 Select( pChild, bSelect );
2139 pChild =
Next( pChild );
2140 }
while( pChild &&
pModel->GetDepth( pChild ) > nRefDepth );
2146 pImpl->SelAllDestrAnch(
2154 sal_uInt16 nRefDepth =
pModel->GetDepth( pEntry );
2159 pTmp =
Next( pTmp );
2160 }
while( pTmp && nRefDepth < pModel->GetDepth( pTmp ) );
2161 pImpl->TreeInserted( pEntry );
2167 pImpl->EntryInserted( pEntry );
2172 pImpl->MovingEntry( pSource );
2177 pImpl->EntryMoved( pSource );
2185 pImpl->RemovingEntry( pEntry );
2196 pImpl->EntryRemoved();
2202 pImpl->SetCollapsedNodeBmp( rBmp );
2208 pImpl->SetExpandedNodeBmp( rBmp );
2217 if (aTempFont == aOrigFont)
2225 if (aTempFont == aOrigFont)
2243 pImpl->Paint(rRenderContext, rRect);
2268 pImpl->MouseButtonDown( rMEvt );
2275 if (
nullptr !=
pImpl->m_pCursorOld)
2300 pImpl->MouseButtonUp( rMEvt );
2305 pImpl->MouseMove( rMEvt );
2310 pImpl->SetUpdateMode( bUpdate );
2320 nEntryHeightOffs = nOffsLogic;
2323 pImpl->SetEntryHeight();
2329 pImpl->SetCurEntry( pEntry );
2334 return pImpl->GetExpandedNodeBmp( );
2339 return pImpl->GetEntryPosition( pEntry );
2344 pImpl->MakeVisible(pEntry);
2349 pImpl->MakeVisible( pEntry, bMoveToTop );
2357 for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ )
2364 pImpl->InvalidateEntry( pEntry );
2369 assert(pEntry && pItem);
2372 pImpl->ShowCursor(
false );
2374 pImpl->InvalidateEntry(pEntry);
2376 pImpl->ShowCursor(
true );
2381 DBG_ASSERT(pTab,
"EditItemText:Tab not found");
2383 auto nItemHeight( pItem->
GetHeight(
this, pEntry) );
2388 Size aSize( nOutputWidth - aPos.X(), nItemHeight );
2390 [pTab](
const std::unique_ptr<SvLBoxTab>&
p) {
return p.get() == pTab; })
2392 if( nPos+1 < static_cast<sal_uInt16>(
aTabs.size()) )
2396 if( nRight <= nOutputWidth )
2397 aSize.setWidth( nRight - aPos.X() );
2401 aSize.AdjustWidth( -(aOrigin.X()) );
2422 bool bIsMouseTriggered = nClickX >= 0;
2427 for( sal_uInt16
i = 0 ;
i < nCount ;
i++ )
2435 if(
i < nCount - 1 )
2439 nNextTabPos = pNextTab->
GetPos();
2444 nTabPos = pTab->
GetPos();
2445 if( !bIsMouseTriggered || (nClickX > nTabPos && (nNextTabPos == -1 || nClickX < nNextTabPos ) ) )
2490 if( rPos.Y() > aSize.Height() - 12 )
2502 pTarget ==
First() && rPos.Y() < 6 )
2512 if( pEntry && bHit )
2515 if( !(
pImpl->EntryReallyHit( pEntry, rPos, nLine)) )
2523 return pImpl ?
pImpl->GetCurEntry() :
nullptr;
2541 pImpl->SetStyle(nWindowStyle);
2548 DBG_ASSERT(pEntry,
"InvalidateEntry:No Entry");
2559 bool bHorSBar =
pImpl->HasHorScrollBar();
2561 pImpl->UpdateContextBmpWidthMax(&rEntry);
2571 if (!bHorSBar &&
pImpl->HasHorScrollBar())
2575 aEntryPos.setX( aEntryPos.X() * -1 );
2576 tools::Long nMaxRight = nWidth + aEntryPos.X() - 1;
2582 bool bCurFontIsSel =
false;
2590 aHighlightFont.SetColor(aHighlightTextColor);
2592 Size aRectSize(0, nTempEntryHeight);
2597 const size_t nTabCount =
aTabs.size();
2598 const size_t nItemCount = rEntry.
ItemCount();
2600 size_t nCurItem = 0;
2602 while (nCurTab < nTabCount && nCurItem < nItemCount)
2605 const size_t nNextTab = nCurTab + 1;
2606 SvLBoxTab* pNextTab = nNextTab < nTabCount ?
aTabs[nNextTab].get() :
nullptr;
2610 Size aSize(rItem.
GetWidth(
this, pViewDataEntry, nCurItem),
2616 nNextTabPos =
GetTabPos(&rEntry, pNextTab);
2619 nNextTabPos = nMaxRight;
2620 if (nTabPos > nMaxRight)
2629 nX = nTabPos + pTab->
CalcOffset(aSize.Width(), nNextTabPos - nTabPos);
2631 aEntryPos.setX( nX );
2632 aEntryPos.setY( nLine );
2654 rRenderContext.
SetFont(aHighlightFont);
2655 bCurFontIsSel =
true;
2657 aWallpaper.
SetColor(aNewWallColor);
2663 bCurFontIsSel =
false;
2664 if (
const auto & xCustomTextColor = rEntry.
GetTextColor())
2668 rRenderContext.
SetFont(aBackupFont);
2680 aRectSize.
setWidth( aSize.Width() );
2694 aRect.
SetBottom( nLine + nTempEntryHeight - 1 );
2698 nRight =
GetTabPos(&rEntry, pNextTab) - 1;
2699 if (nRight > nMaxRight)
2724 aEntryPos.AdjustY((nTempEntryHeight - aSize.Height()) / 2 );
2726 rItem.
Paint(aEntryPos, *
this, rRenderContext, pViewDataEntry, rEntry);
2731 aRect.
Right() < nMaxRight)
2745 rRenderContext.
Push();
2760 rRenderContext.
Pop();
2766 rRenderContext.
SetFont(aBackupFont);
2769 sal_uInt16 nFirstDynTabPos(0);
2772 nDynTabPos +=
pImpl->m_nNodeBmpTabDistance;
2773 nDynTabPos +=
pImpl->m_nNodeBmpWidth / 2;
2783 sal_uInt16 nNextTab = nFirstDynTabPos;
2788 pNextTab = nNextTab < nTabCount ?
aTabs[nNextTab].get() :
nullptr;
2789 }
while (pNextTab && pNextTab->
IsDynamic());
2791 if (pNextTab && (
GetTabPos( &rEntry, pNextTab ) <= nDynTabPos))
2798 aPos.AdjustX(
pImpl->m_nNodeBmpTabDistance );
2800 const Image* pImg =
nullptr;
2804 pImg = &
pImpl->GetExpandedNodeBmp();
2806 pImg = &
pImpl->GetCollapsedNodeBmp();
2809 aPos.AdjustY((nTempEntryHeight - pImg->GetSizePixel().Height()) / 2 );
2817 rRenderContext.
DrawImage(aPos, *pImg, nStyle);
2821 bool bNativeOK =
false;
2856 Color aCol = aBackupTextColor;
2858 aCol = aHighlightTextColor;
2868 aCustomRenderHdl.
Call(std::tuple<vcl::RenderContext&, const tools::Rectangle&, const SvTreeListEntry&>(rRenderContext, rRect, rEntry));
2873 return aCustomMeasureHdl.
Call(std::pair<vcl::RenderContext&, const SvTreeListEntry&>(rRenderContext, rEntry));
2878 pImpl->UpdateContextBmpWidthMax( pEntry );
2894 if( pTab && nCurTab <
aTabs.size() - 1 )
2897 nNextTabPos =
GetTabPos( pEntry, pNextTab );
2901 nNextTabPos = nRealWidth;
2902 if( nTabPos > nRealWidth )
2907 if( !bUserSelection )
2909 if( pTab && nCurTab < pEntry->ItemCount() )
2913 if( !aSize.
Width() )
2921 if( aRect.
Left() > 0 )
2933 sal_uInt16 nLastTab;
2936 if( nLastTab <
aTabs.size() )
2937 pLastTab =
aTabs[ nLastTab ].
get();
2964 if( aRect.
Right() >= nRealWidth )
2978 sal_uInt16 nDepth =
pModel->GetDepth( pEntry );
2979 nDepth = nDepth *
static_cast<sal_uInt16
>(
nIndent);
2980 nPos +=
static_cast<sal_IntPtr
>(nDepth);
2989 sal_uInt16 nTabCount =
aTabs.size();
2990 sal_uInt16 nItemCount = pEntry->
ItemCount();
2993 sal_uInt16 nNextItem = 1;
3000 SvLBoxTab* pNextTab=nNextItem<nTabCount ?
aTabs[nNextItem].get() :
nullptr;
3005 nNextTabPos =
GetTabPos( pEntry, pNextTab );
3008 nNextTabPos = nRealWidth;
3009 if( nStart > nRealWidth )
3013 auto nItemWidth(pItem->
GetWidth(
this, pEntry));
3014 nStart += pTab->
CalcOffset(nItemWidth, nNextTabPos - nStart);
3015 auto nLen = nItemWidth;
3019 if( nTabWidth < nLen )
3023 if( nX >= nStart && nX < (nStart+nLen ) )
3025 pItemClicked = pItem;
3032 if( nNextItem >= nItemCount || nNextItem >= nTabCount)
3034 pTab =
aTabs[ nNextItem ].get();
3035 pItem = &pEntry->
GetItem( nNextItem );
3038 return pItemClicked;
3043 sal_uInt16 nTabCount =
aTabs.size();
3044 sal_uInt16 nItemCount = pEntry->
ItemCount();
3045 if (nTabIdx >= nItemCount || nTabIdx >= nTabCount)
3046 return std::make_pair(-1, -1);
3050 sal_uInt16 nNextItem = nTabIdx + 1;
3055 SvLBoxTab* pNextTab = nNextItem < nTabCount ?
aTabs[nNextItem].get() :
nullptr;
3060 nNextTabPos =
GetTabPos(pEntry, pNextTab);
3063 nNextTabPos = nRealWidth;
3064 if (nStart > nRealWidth)
3068 auto nItemWidth(pItem->
GetWidth(
this, pEntry));
3069 nStart += pTab->
CalcOffset(nItemWidth, nNextTabPos - nStart);
3070 auto nLen = nItemWidth;
3074 if (nTabWidth < nLen)
3077 return std::make_pair(nStart, nLen);
3088 sal_uInt16 nCurPos = 0;
3089 if (nCount > rWidths.size())
3090 rWidths.resize(nCount);
3091 while (nCurPos < nCount)
3094 auto nWidth = rItem.
GetWidth(
this, pEntry);
3098 if (nWidth > rWidths[nCurPos])
3099 rWidths[nCurPos] = nWidth;
3103 pEntry =
Next( pEntry );
3111 std::vector<tools::Long> aWidths;
3116 sal_Int32 nLeftBorder(0), nTopBorder(0), nRightBorder(0), nBottomBorder(0);
3117 GetBorder(nLeftBorder, nTopBorder, nRightBorder, nBottomBorder);
3141 for(
size_t i = 0; pEntry; ++
i)
3146 pNextEntry =
pModel->FirstChild( pEntry );
3151 pEntry =
pModel->Next( pEntry );
3153 pEntry = pNextEntry;
3161 pImpl->UpdateAll(
true);
3166 pImpl->SetForceMakeVisible(bEnable);
3184 aTabs.emplace_back( pTab );
3200 sal_uInt16 nCurTab = 0;
3201 sal_uInt16 nTabCount =
aTabs.size();
3202 while( nCurTab < nTabCount )
3224 return aTabs[ nPos ].get();
3251 pImpl->RecalcFocusRect();
3253 pImpl->Invalidate();
3261 pImpl->RecalcFocusRect();
3271 std::swap(nStart, nEnd);
3276 pImpl->RecalcFocusRect();
3282 pImpl->Command(rCEvt);
3290 sal_uInt16 nTabCount =
aTabs.size();
3294 if( pTab->
nFlags & nFlagMask )
3306 sal_uInt16
nPos =
static_cast<sal_uInt16
>(
aTabs.size());
3311 if( pTab->
nFlags & nFlagMask )
3325 if( !
pImpl->RequestHelp( rHEvt ) )
3331 OUString aLeft = pLeftText ? pLeftText->
GetText() : OUString();
3332 OUString aRight = pRightText ? pRightText->
GetText() : OUString();
3333 pImpl->UpdateStringSorter();
3334 return pImpl->m_pStringSorter->compare(aLeft, aRight);
3343 return DefaultCompare(pLeftText, pRightText);
3364 short nMaxWidth = short( std::max( rBitmap1.GetSizePixel().Width(), rBitmap2.GetSizePixel().Width() ) );
3365 nMaxWidth =
pImpl->UpdateContextBmpWidthVector( pEntry1, nMaxWidth );
3406 const Size& rSize =
pImpl->GetOutputSize();
3407 if( aPos.Y() < 0 || aPos.Y() >= rSize.
Height() )
3472 DBG_ASSERT( pParent,
"SvTreeListBox::CreateAccessible - accessible parent not found" );
3474 css::uno::Reference< XAccessible > xAccessible;
3477 css::uno::Reference< XAccessible > xAccParent = pParent->
GetAccessible();
3478 if ( xAccParent.is() )
3482 xAccessible =
pImpl->m_aFactoryAccess.getFactory().createAccessibleTreeListBox( *
this, xAccParent );
3490 assert(pEntry &&
"SvTreeListBox::FillAccessibleEntryStateSet: invalid entry");
3494 rStateSet.
AddState( AccessibleStateType::EXPANDABLE );
3496 rStateSet.
AddState( sal_Int16(AccessibleStateType::EXPANDED) );
3500 rStateSet.
AddState( AccessibleStateType::CHECKED );
3502 rStateSet.
AddState( AccessibleStateType::VISIBLE );
3504 rStateSet.
AddState( AccessibleStateType::SELECTED );
3507 rStateSet.
AddState( AccessibleStateType::ENABLED );
3508 rStateSet.
AddState( AccessibleStateType::FOCUSABLE );
3509 rStateSet.
AddState( AccessibleStateType::SELECTABLE );
3511 if (pViewDataNewCur && pViewDataNewCur->
HasFocus())
3512 rStateSet.
AddState( AccessibleStateType::FOCUSED );
3536 if (rKey ==
"min-width-chars")
3540 else if (rKey ==
"enable-tree-lines")
3548 else if (rKey ==
"show-expanders")
3556 else if (rKey ==
"enable-search")
3560 else if (rKey ==
"activate-on-single-click")
3564 else if (rKey ==
"hover-selection")
3568 else if (rKey ==
"reorderable")
3581 pImpl->m_aHorSBar->EnableRTL(bEnable);
3582 pImpl->m_aVerSBar->EnableRTL(bEnable);
3583 pImpl->m_aScrBarBox->EnableRTL(bEnable);
static bool toBool(std::string_view rValue)
virtual void ModelHasInserted(SvTreeListEntry *pEntry) override
void AddItem(std::unique_ptr< SvLBoxItem > pItem)
#define LINK(Instance, Class, Member)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Size GetSizePixel() const
const Color & GetTextColor() const
bool CheckDragAndDropMode(SvTreeListBox const *pSource, sal_Int8)
The child windows are invalidated, too.
Link< svtree_measure_args, Size > aCustomMeasureHdl
virtual void EnableRTL(bool bEnable=true) override
virtual void ModelIsMoving(SvTreeListEntry *pSource) override
VCL_DLLPRIVATE Image const & GetExpandedNodeBmp() const
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
void SetFillColor(const Color &)
SvTreeListEntry * NextVisible(SvTreeListEntry *pEntry) const
void EditedText(const OUString &)
VCL_DLLPRIVATE void ImpEntryInserted(SvTreeListEntry *pEntry)
virtual ~SvTreeListBox() override
const Wallpaper & GetBackground() const
SvTreeListEntry * NextSelected(SvTreeListEntry *pEntry) const
const css::datatransfer::dnd::DropTargetDropEvent maDropEvent
const Color & GetDeactiveColor() const
const Color & GetBackColor() const
tools::Rectangle GetBoundingRect(const SvTreeListEntry *pEntry)
Calculate and return the bounding rectangle of an entry.
void InvalidateEntry(SvTreeListEntry *)
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void ModelNotification(SvListAction nActionId, SvTreeListEntry *pEntry1, SvTreeListEntry *pEntry2, sal_uInt32 nPos) override
void SetUserData(void *pPtr)
void SetNoAutoCurEntry(bool b)
void setWidth(tools::Long nWidth)
virtual void DragFinished(sal_Int8 nDropAction)
const Color & GetHighlightTextColor() const
virtual void ModelHasInsertedTree(SvTreeListEntry *pEntry) override
bool KeyInput(const KeyEvent &rKEvt)
virtual void Command(const CommandEvent &rCEvt) override
void CallCallBackHdl_Impl()
bool IsEntryVisible(SvTreeListEntry *pEntry) const
void SetExpandedEntryBmp(SvTreeListEntry *_pEntry, const Image &_rImage)
Link< const HelpEvent &, bool > aTooltipHdl
bool IsHighlighted() const
SvTreeList * GetModel() const
SAL_DLLPRIVATE float approximate_char_width() const
bool IsEditingActive() const
SvTLEntryFlags GetFlags() const
WinBits const WB_HASBUTTONSATROOT
std::unique_ptr< sal_Int32[]> pData
vcl::Window * GetAccessibleParentWindow() const
void SetSortMode(SvSortMode eMode)
OUString const & GetSavedValue() const
VCL_DLLPRIVATE void AdjustEntryHeight()
#define SVLBOX_ACC_RETURN
void AdjustEntryHeightAndRecalc()
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
virtual void StateChanged(StateChangedType eType) override
const StyleSettings & GetStyleSettings() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
const Color & GetFaceColor() const
virtual tools::Rectangle GetFocusRect(const SvTreeListEntry *, tools::Long nLine)
VCL_DLLPRIVATE void ImplInitStyle()
virtual void StateChanged(StateChangedType nStateChange) override
SvTreeListEntry * GetFirstEntryInView() const
const Image & GetDefaultExpandedEntryBmp() const
void SetFlags(SvTLEntryFlags nFlags)
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
void EditItemText(SvTreeListEntry *pEntry, SvLBoxString *pItem, const Selection &)
void SetColor(const Color &rColor)
SvLBoxTab * GetFirstDynamicTab() const
virtual DragDropMode NotifyStartDrag()
SvLBoxTab * GetFirstTab(SvLBoxTabFlags nFlagMask, sal_uInt16 &rTabPos)
tools::Long mnCheckboxItemWidth
SvTreeListBoxImpl(SvTreeListBox &_rBox)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void FillAccessibleEntryStateSet(SvTreeListEntry *pEntry,::utl::AccessibleStateSetHelper &rStateSet) const
Fills the StateSet of one entry.
static const Image & GetDefaultCollapsedNodeImage()
SvInplaceEdit2(vcl::Window *pParent, const Point &rPos, const Size &rSize, const OUString &rData, const Link< SvInplaceEdit2 &, void > &rNotifyEditEnd, const Selection &)
const MapMode & GetMapMode() const
#define DND_ACTION_COPYMOVE
virtual void StartDrag(sal_Int8 nAction, const Point &rPosPixel) override
sal_uInt16 GetCode() const
VCL_DLLPRIVATE void InitTreeView()
void setTristateVal(ButtonValue nTristate)
DataChangedEventType GetType() const
void SetEntryText(SvTreeListEntry *, const OUString &)
void SetCurEntry(SvTreeListEntry *_pEntry)
Link< const CommandEvent &, bool > aPopupMenuHdl
short nContextBmpWidthMax
bool mbUpdateAlternatingRows
const OUString & GetText() const
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr)=0
virtual void ModelNotification(SvListAction nActionId, SvTreeListEntry *pEntry1, SvTreeListEntry *pEntry2, sal_uInt32 nPos)
SelectionMode GetSelectionMode() const
virtual void RequestHelp(const HelpEvent &rHEvt) override
virtual int CalcWidth(const SvTreeListBox *pView) const
static const Image & GetExpandedEntryBmp(const SvTreeListEntry *_pEntry)
void SetBitmap2(const Image &rImage)
IMPL_LINK_NOARG(SvInplaceEdit2, ReturnHdl_Impl, Accelerator &, void)
void SetType(WindowType nType)
View-dependent data for a tree list entry created in the virtual function SvTreeListBox::CreateViewDa...
SvTreeListEntry * GetCurEntry() const
bool HasFormat(SotClipboardFormatId nFormat) const
SvTreeListBoxFlags nImpFlags
sal_Int32 DefaultCompare(const SvLBoxString *pLeftText, const SvLBoxString *pRightText)
static VclPtr< SvTreeListBox > g_pDDTarget
SvTreeListBox(vcl::Window *pParent, WinBits nWinStyle=0)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
const vcl::Font & GetFieldFont() const
static VCL_DLLPRIVATE void RemoveBoxFromDDList_Impl(const SvTreeListBox &rB)
const Color & GetFieldTextColor() const
void SetTextColor(const Color &rColor)
static const Image & GetDefaultExpandedNodeImage()
const Color & GetHighlightColor() const
void SetBitmap1(const Image &rImage)
virtual bool set_property(const OString &rKey, const OUString &rValue) override
VCL_DLLPRIVATE bool HandleKeyInput(const KeyEvent &rKEvt)
Handles the given key event.
#define SV_ENTRYHEIGHTOFFS_PIXEL
const Image & GetBitmap2() const
bool mbAlternatingRowColors
SvTreeListEntry * GetEntryFromPath(const ::std::deque< sal_Int32 > &_rPath) const
void MakeVisible(SvTreeListEntry *pEntry)
constexpr tools::Long Width() const
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
sal_uInt32 GetExtraIndent() const
void SetCompareHdl(const Link< const SvSortData &, sal_Int32 > &rLink)
int GetHeight(const SvTreeListBox *pView, const SvTreeListEntry *pEntry) const
void SetDragHelper(const rtl::Reference< TransferDataContainer > &rHelper, sal_uInt8 eDNDConstants)
#define NODE_AND_CHECK_BUTTONS
rtl::Reference< TransferDataContainer > m_xTransferHelper
virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface(bool bCreate=true)
SvViewDataItem * GetViewDataItem(SvTreeListEntry const *, SvLBoxItem const *)
virtual Size GetOptimalSize() const override
void ScrollOutputArea(short nDeltaEntries)
virtual void GetFocus() override
VCL_DLLPRIVATE Size MeasureCustomEntry(vcl::RenderContext &rRenderContext, const SvTreeListEntry &rEntry) const
void SetForceMakeVisible(bool bEnable)
virtual void ModelIsRemoving(SvTreeListEntry *pEntry) override
SvLBoxButtonData * pCheckButtonData
bool mbContextBmpExpanded
css::uno::Reference< css::accessibility::XAccessible > GetAccessible(bool bCreate=true)
virtual bool EditingEntry(SvTreeListEntry *pEntry)
virtual void InitViewData(SvViewDataEntry *, SvTreeListEntry *pEntry) override
SvTreeListEntry * FirstSelected() const
const vcl::Font & GetFont() const
sal_Int32 nMinWidthInChars
TriState NotifyMoving(SvTreeListEntry *pTarget, const SvTreeListEntry *pEntry, SvTreeListEntry *&rpNewParent, sal_uInt32 &rNewChildPos)
void SetDragDropMode(DragDropMode)
SvTreeListEntries m_Children
virtual void KeyInput(const KeyEvent &rKEvt) override
void GetLastTab(SvLBoxTabFlags nFlagMask, sal_uInt16 &rTabPos)
#define TABFLAGS_CONTEXTBMP
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
AllSettingsFlags GetFlags() const
sal_IntPtr GetTabPos(const SvTreeListEntry *, const SvLBoxTab *) const
SvTreeListEntry * NextSibling() const
virtual FactoryFunction GetUITestFactory() const override
Link< SvTreeListBox *, bool > aDoubleClickHdl
void SetCollapsedEntryBmp(SvTreeListEntry *_pEntry, const Image &_rImage)
void SetBackColor(const Color &rColor)
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
void EndEditing(bool bCancel=false)
void EnableSelectionAsDropTarget(bool bEnable=true)
static const Image & GetDefaultExpandedNodeImage()
Returns the default image which clients should use for expanded nodes, to have a consistent user inte...
virtual void SelectEntry(vcl::StringEntryIdentifier _entry) override
selects a given entry
virtual OUString GetText() const
const void * StringEntryIdentifier
sal_uInt32 SelectChildren(SvTreeListEntry *pParent, bool bSelect)
void SetCheckButtonData(SvLBoxButtonData *)
WinBits const WB_HASLINESATROOT
VCL_DLLPRIVATE void SetExpandedNodeBmp(const Image &)
Idle aIdle svtools::SvInplaceEdit2 aIdle
void CallImplEventListeners(VclEventId nEvent, void *pData)
void SetAlternatingRowColors(const bool bEnable)
vcl::QuickSelectionEngine m_aQuickSelectionEngine
short GetEntryHeight() const
Link< SvTreeListBox *, void > aDeselectHdl
VCL_DLLPRIVATE bool PosOverBody(const Point &rPos) const
void EnableInplaceEditing(bool bEnable)
void DrawRect(const tools::Rectangle &rRect)
DragDropMode nOldDragMode
void SetHoverSelection(bool bEnable)
constexpr OUStringLiteral aData
SvTreeListEntry * pHdlEntry
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry)=0
#define SAL_N_ELEMENTS(arr)
virtual void RequestingChildren(SvTreeListEntry *pParent)
bool IsDragTarget() const
bool CopySelection(SvTreeListBox *pSource, SvTreeListEntry *pTarget)
sal_uInt16 nCurEntrySelPos
void SetHighlightRange(sal_uInt16 nFirstTab=0, sal_uInt16 nLastTab=0xffff)
SvTreeListEntry * pTargetEntry
std::optional< Color > const & GetTextColor() const
Image aPrevInsertedExpBmp
void StopEditing(bool bCancel)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
void OnCurrentEntryChanged()
tools::Long getPreferredDimensions(std::vector< tools::Long > &rWidths) const
bool IsChild(const vcl::Window *pWindow) const
SvTreeListEntry * CloneEntry(SvTreeListEntry *pSource)
static VCL_DLLPRIVATE void AddBoxToDDList_Impl(const SvTreeListBox &rB)
sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt, SvTreeListBox *pSourceView)
#define DBG_ASSERT(sCon, aError)
void SetEntryWidth(short nWidth)
DragDropMode nDragDropMode
std::pair< tools::Long, tools::Long > GetItemPos(SvTreeListEntry *pEntry, sal_uInt16 nTabIdx)
static OUString SearchEntryTextWithHeadTitle(SvTreeListEntry *pEntry)
void SetSublistOpenWithLeftRight()
static bool InsertAccel(Accelerator *pAccel)
Insert accelerator.
Link< SvInplaceEdit2 &, void > aCallBackHdl
#define SVLBOX_ACC_ESCAPE
void ImplEditEntry(SvTreeListEntry *pEntry)
const MapMode & GetMapMode() const
void SetCheckButtonState(SvTreeListEntry *, SvButtonState)
virtual void SetText(const OUString &rStr) override
sal_uInt32 GetSelectionCount() const
virtual void Resize() override
virtual vcl::StringEntryIdentifier NextEntry(vcl::StringEntryIdentifier _currentEntry, OUString &_out_entryText) const override
returns the next entry in the list.
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget()
void SetUpdateMode(bool bUpdate)
SvTreeListEntry * GetNextEntryInView(SvTreeListEntry *) const
Link< SvTreeListBox *, void > aExpandedHdl
const Color & GetColor() const
virtual OUString GetText() const override
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
bool IsSelected(const SvTreeListEntry *pEntry) const
std::unique_ptr< SvTreeList > pModel
bool IsUpdateMode() const
SvTreeListEntry * FirstChild(SvTreeListEntry *pParent) const
void * GetUserData() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const AllSettings & GetSettings() const
const Color & GetFieldColor() const
CommandEventId GetCommand() const
std::unique_ptr< SvImpLBox > pImpl
static const Image & GetDefaultCollapsedNodeImage()
Returns the default image which clients should use for expanded nodes, to have a consistent user inte...
void SetTextColor(const Color &rColor)
SvViewDataEntry * GetViewDataEntry(SvTreeListEntry const *pEntry) const
bool Collapse(SvTreeListEntry *pParent)
SvLBoxItem * GetItem(SvTreeListEntry *, tools::Long nX, SvLBoxTab **ppTab)
Link< SvTreeListBox *, void > aSelectHdl
Link< sal_Int8, void > GetDragFinishedHdl() const
bool MoveSelectionCopyFallbackPossible(SvTreeListBox *pSource, SvTreeListEntry *pTarget, bool bAllowCopyFallback)
SvTLEntryFlags nEntryFlags
All repaint events should go in here.
virtual void ModelHasMoved(SvTreeListEntry *pSource) override
bool IsMouseCaptured() const
#define TABFLAGS_CHECKBTN
const Image & GetBitmap1() const
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor=COL_AUTO)
Request rendering of a particular control and/or part.
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
TriState NotifyCopying(SvTreeListEntry *pTarget, const SvTreeListEntry *pEntry, SvTreeListEntry *&rpNewParent, sal_uInt32 &rNewChildPos)
size_t GetPos(const SvLBoxItem *pItem) const
const AllSettings & GetSettings() const
void SetNodeDefaultImages()
Sets default bitmaps for collapsed and expanded nodes.
Image aPrevInsertedColBmp
IMPL_LINK(SvTreeListBox, CloneHdl_Impl, SvTreeListEntry *, pEntry, SvTreeListEntry *)
virtual void InitEntry(SvTreeListEntry *, const OUString &, const Image &, const Image &)
virtual bool set_property(const OString &rKey, const OUString &rValue)
virtual OUString GetEntryText(SvTreeListEntry *pEntry) const
void ModelHasEntryInvalidated(SvTreeListEntry *pEntry) override
DragDropMode GetDragDropMode() const
const SvLBoxItem & GetItem(size_t nPos) const
const Color & GetFillColor() const
bool Expand(SvTreeListEntry *pParent)
void SelectAll(bool bSelect)
static VclPtr< SvTreeListBox > g_pDDSource
Point GetEntryPosition(const SvTreeListEntry *) const
virtual void KeyInput(const KeyEvent &rKEvt) override
virtual void ShowFocus(const tools::Rectangle &rRect)
vcl::Window * GetParent() const
void SetStyle(WinBits nStyle)
sal_Int8 mnClicksToToggle
bool HasChildrenOnDemand() const
static const Image & GetCollapsedEntryBmp(const SvTreeListEntry *_pEntry)
constexpr sal_uInt16 KEY_RETURN
void SetColor(const Color &)
virtual SvLBoxItemType GetType() const =0
void EnableCheckButton(SvLBoxButtonData *)
void SetPointFont(vcl::RenderContext &rRenderContext, const vcl::Font &rFont)
static sal_uInt32 GetRelPos(const SvTreeListEntry *pChild)
bool SelectListEntry(SvTreeListEntry *pEntry, bool bSelect)
std::vector< std::unique_ptr< SvLBoxTab > > aTabs
SvTreeListEntry * Next(SvTreeListEntry *pEntry) const
void SetSpaceBetweenEntries(short nSpace)
std::unique_ptr< SvTreeListBoxImpl > mpImpl
WinBits const WB_HASLINES
virtual void KeyInput(const KeyEvent &rKEvt)
virtual bool EditedEntry(SvTreeListEntry *pEntry, const OUString &rNewText)
SvTreeListEntry * LastVisible() const
bool IsExpanded(SvTreeListEntry *pEntry) const
const SvViewDataEntry * GetViewData(const SvTreeListEntry *pEntry) const
int GetWidth(const SvTreeListBox *pView, const SvTreeListEntry *pEntry) const
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
SvTreeListEntry * First() const
virtual void LoseFocus() override
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE) override
sal_uInt32 GetLevelChildCount(SvTreeListEntry *pParent) const
WinBits const WB_HIDESELECTION
sal_uInt16 GetChildCount() const
const vcl::KeyCode & GetKeyCode() const
static vcl::Window * GetFocusWindow()
Get the currently focused window.
Link< SvTreeListBox *, bool > aExpandingHdl
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Creates and returns the accessible object of the Box.
void SetSelectionMode(SelectionMode)
const Color & GetColor() const
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
virtual void ModelHasCleared() override
virtual void Resize() override
Size GetOutputSizePixel() const
void SetActivateOnSingleClick(bool bEnable)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
SvTreeListEntry * pEdEntry
SvLBoxTab * GetTab(SvTreeListEntry const *, SvLBoxItem const *) const
#define SV_LBOX_DEFAULT_INDENT_PIXEL
virtual SvTreeListEntry * InsertEntry(const OUString &rText, SvTreeListEntry *pParent=nullptr, bool bChildrenOnDemand=false, sal_uInt32 nPos=TREELIST_APPEND, void *pUserData=nullptr)
void set_min_width_in_chars(sal_Int32 nChars)
constexpr tools::Long Height() const
void ExpandListEntry(SvTreeListEntry *pParent)
void CollapseListEntry(SvTreeListEntry *pParent)
constexpr sal_uInt16 KEY_ESCAPE
void SetFont(const vcl::Font &rNewFont)
SvTreeListEntry * GetEntry(SvTreeListEntry *pParent, sal_uInt32 nPos) const
void SetFont(const vcl::Font &rFont)
void SetTransparent(bool bTransparent)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
sal_Int32 get_width_request() const
const OUString & GetSavedValue() const
VCL_DLLPRIVATE void SetEntryHeight(SvTreeListEntry const *pEntry)
::OutputDevice const * GetOutDev() const
bool IsTransparent() const
tools::Long AdjustWidth(tools::Long n)
VCL_DLLPRIVATE void CheckBoxInserted(SvTreeListEntry *pEntry)
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
bool m_bDoingQuickSelection
void InvalidateEntry(SvTreeListEntry *)
SvButtonState GetCheckButtonState(SvTreeListEntry *) const
static bool HasEntryText(const SvTreeListEntry *pEntry)
const SvViewDataItem & GetItem(size_t nPos) const
const SvLBoxItem * GetFirstItem(SvLBoxItemType eType) const
void RemoveEntry(SvTreeListEntry const *pEntry)
Removes the entry along with all of its descendants.
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
VCL_DLLPRIVATE SvLBoxItem * GetItem_Impl(SvTreeListEntry *, tools::Long nX, SvLBoxTab **ppTab)
const vcl::Font & GetFont() const
const Point & GetPosPixel() const
const Point & GetOrigin() const
void FillEntryPath(SvTreeListEntry *pEntry,::std::deque< sal_Int32 > &_rPath) const
void EditEntry(SvTreeListEntry *pEntry)
tools::Long AdjustHeight(tools::Long n)
bool IsDropFormatSupported(SotClipboardFormatId nFormat) const
VCL_DLLPRIVATE void DrawCustomEntry(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect, const SvTreeListEntry &rEntry)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void setHeight(tools::Long nHeight)
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
bool EditingCanceled() const
WinBits const WB_HASBUTTONS
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
virtual void EnableRTL(bool bEnable=true) override
#define SAL_WARN(area, stream)
virtual void ModelHasRemoved(SvTreeListEntry *pEntry) override
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
Link< svtree_render_args, void > aCustomRenderHdl
const Image & GetDefaultCollapsedEntryBmp() const
tools::Long GetPos() const
void SetPriority(TaskPriority ePriority)
void SetFont(const vcl::Font &rNewFont)
void ImplShowTargetEmphasis(SvTreeListEntry *pEntry, bool bShow)
bool Select(SvTreeListEntry *pEntry, bool bSelect=true)
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
VCL_DLLPRIVATE void PaintEntry1(SvTreeListEntry &, tools::Long nLine, vcl::RenderContext &rRenderContext)
virtual void ModelHasCleared()
void EditText(const OUString &, const tools::Rectangle &, const Selection &)
virtual vcl::StringEntryIdentifier CurrentEntry(OUString &_out_entryText) const override
returns the current entry in the list of searchable strings.
virtual sal_uInt32 Insert(SvTreeListEntry *pEnt, SvTreeListEntry *pPar, sal_uInt32 nPos=TREELIST_APPEND)
virtual void Command(const CommandEvent &rCEvt)
vcl::Font GetPointFont(vcl::RenderContext const &rRenderContext) const
virtual void MouseMove(const MouseEvent &rMEvt) override
tools::Long CalcOffset(tools::Long nItemLength, tools::Long nTabWidth)
const Wallpaper & GetBackground() const
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr) override
void AddState(sal_Int16 aState)
virtual void RequestHelp(const HelpEvent &rHEvt)
void ScrollToAbsPos(tools::Long nPos)
void SetupDragOrigin()
This sets the global variables used to determine the in-process drag source.
WinBits const WB_CLIPCHILDREN
VCL_DLLPRIVATE void SetCollapsedNodeBmp(const Image &)
static void RemoveAccel(Accelerator const *pAccel)
Remove accelerator.
void SetDefaultExpandedEntryBmp(const Image &rBmp)
void SetQuickSearch(bool bEnable)
Link< SvTreeListBox *, void > aScrolledHdl
SvTreeListEntry * pParent
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
std::unique_ptr< SvInplaceEdit2 > pEdCtrl
An idle is a timer to be scheduled immediately.
const Color & GetFillColor() const
virtual void DataChanged(const DataChangedEvent &rDCEvt)
void SetText(const OUString &rText)
void EnableChildrenOnDemand(bool bEnable=true)
void SetDefaultCollapsedEntryBmp(const Image &rBmp)
void AddTab(tools::Long nPos, SvLBoxTabFlags nFlags)
bool m_bDetectedRangeSegmentation false