LibreOffice Module vcl (master)
1
|
#include <treelist.hxx>
Static Public Member Functions | |
static sal_uLong | GetRelPos (const SvTreeListEntry *pChild) |
Static Private Member Functions | |
static VCL_DLLPRIVATE void | SetListPositions (SvTreeListEntries &rEntries) |
Invalidate the cached position data to have them re-generated before the next access. More... | |
Private Attributes | |
SvListView & | mrOwnerListView |
sal_uLong | nEntryCount |
Link< SvTreeListEntry *, SvTreeListEntry * > | aCloneLink |
Link< const SvSortData &, sal_Int32 > | aCompareLink |
SvSortMode | eSortMode |
bool | bAbsPositionsValid |
bool | mbEnableInvalidate |
std::unique_ptr< SvTreeListEntry > | pRootItem |
Friends | |
class | SvListView |
Definition at line 65 of file treelist.hxx.
|
privatedelete |
|
delete |
SvTreeList::SvTreeList | ( | SvListView & | listView | ) |
Definition at line 61 of file treelist.cxx.
References bAbsPositionsValid, eSortMode, nEntryCount, pRootItem, and SortNone.
SvTreeList::~SvTreeList | ( | ) |
Definition at line 71 of file treelist.cxx.
void SvTreeList::Broadcast | ( | SvListAction | nActionId, |
SvTreeListEntry * | pEntry1 = nullptr , |
||
SvTreeListEntry * | pEntry2 = nullptr , |
||
sal_uLong | nPos = 0 |
||
) |
Definition at line 75 of file treelist.cxx.
References SvListView::ModelNotification(), and mrOwnerListView.
Referenced by Clear(), Copy(), Insert(), InsertTree(), InvalidateEntry(), Move(), and Remove().
void SvTreeList::Clear | ( | ) |
Definition at line 119 of file treelist.cxx.
References Broadcast(), CLEARED, CLEARING, nEntryCount, and pRootItem.
SvTreeListEntry * SvTreeList::Clone | ( | SvTreeListEntry * | pEntry, |
sal_uLong & | nCloneCount | ||
) | const |
Definition at line 365 of file treelist.cxx.
References CloneChildren(), CloneEntry(), and SvTreeListEntry::m_Children.
Referenced by Copy().
|
private |
Definition at line 376 of file treelist.cxx.
References CloneEntry(), and SvTreeListEntry::m_Children.
Referenced by Clone().
SvTreeListEntry * SvTreeList::CloneEntry | ( | SvTreeListEntry * | pSource | ) | const |
Definition at line 356 of file treelist.cxx.
References aCloneLink, Link< class, class >::Call(), SvTreeListEntry::Clone(), and Link< class, class >::IsSet().
Referenced by Clone(), and CloneChildren().
sal_Int32 SvTreeList::Compare | ( | const SvTreeListEntry * | pLeft, |
const SvTreeListEntry * | pRight | ||
) | const |
Definition at line 1361 of file treelist.cxx.
References SvSortData::pLeft, and SvSortData::pRight.
sal_uLong SvTreeList::Copy | ( | SvTreeListEntry * | pSource, |
SvTreeListEntry * | pTargetParent, | ||
sal_uLong | nListPos | ||
) |
Definition at line 270 of file treelist.cxx.
References bAbsPositionsValid, Broadcast(), Clone(), DBG_ASSERT, INSERTED_TREE, SvTreeListEntry::m_Children, nEntryCount, SvTreeListEntry::pParent, pRootItem, and SetListPositions().
void SvTreeList::EnableInvalidate | ( | bool | bEnable | ) |
Definition at line 1002 of file treelist.cxx.
References mbEnableInvalidate.
Referenced by SalInstanceTreeView::freeze(), and SalInstanceTreeView::thaw().
SvTreeListEntry * SvTreeList::First | ( | ) | const |
Definition at line 459 of file treelist.cxx.
References nEntryCount, and pRootItem.
Referenced by SvImpLBox::EntryRemoved(), FirstSelected(), GetEntryAtAbsPos(), GetEntryAtVisPos(), GetVisibleCount(), SvImpLBox::KeyInput(), SvImpLBox::SelAllDestrAnch(), and SetAbsolutePositions().
SvTreeListEntry * SvTreeList::FirstChild | ( | SvTreeListEntry * | pParent | ) | const |
Definition at line 769 of file treelist.cxx.
References SvTreeListEntry::m_Children, and pRootItem.
|
private |
Definition at line 757 of file treelist.cxx.
References DBG_ASSERT, First(), SvListView::IsSelected(), and NextVisible().
|
inlineprivate |
Definition at line 80 of file treelist.hxx.
References First.
sal_uLong SvTreeList::GetAbsPos | ( | const SvTreeListEntry * | pEntry | ) | const |
Definition at line 824 of file treelist.cxx.
References bAbsPositionsValid, SvTreeListEntry::nAbsPos, and SetAbsolutePositions().
Referenced by SvImpLBox::EntryMoved(), IconViewUIObject::get_state(), SalInstanceTreeView::iter_compare(), and lcl_DumpEntryAndSiblings().
sal_uLong SvTreeList::GetChildCount | ( | const SvTreeListEntry * | pParent | ) | const |
Definition at line 396 of file treelist.cxx.
References GetDepth(), GetEntryCount(), SvTreeListEntry::m_Children, nCount, and Next().
Referenced by InsertTree(), and Remove().
const SvTreeListEntries & SvTreeList::GetChildList | ( | SvTreeListEntry * | pParent | ) | const |
Definition at line 1492 of file treelist.cxx.
References SvTreeListEntry::m_Children.
Referenced by SvImpLBox::CollapseTo(), SvImpLBox::EntryInserted(), SvImpLBox::FindMostRight_Impl(), SalInstanceTreeView::iter_n_children(), SalInstanceTreeView::n_children(), SalInstanceIconView::n_children(), and SvImpLBox::RemovingEntry().
SvTreeListEntries & SvTreeList::GetChildList | ( | SvTreeListEntry * | pParent | ) |
Definition at line 1499 of file treelist.cxx.
References SvTreeListEntry::m_Children.
|
private |
Definition at line 437 of file treelist.cxx.
References DBG_ASSERT, GetDepth(), SvListView::IsSelected(), SvTreeListEntry::m_Children, nCount, Next(), and pRootItem.
|
inline |
Definition at line 192 of file treelist.hxx.
sal_uInt16 SvTreeList::GetDepth | ( | const SvTreeListEntry * | pEntry | ) | const |
Definition at line 102 of file treelist.cxx.
References DBG_ASSERT, SvTreeListEntry::pParent, and pRootItem.
Referenced by SvImpLBox::CollapseTo(), SvImpLBox::DrawNet(), SvImpLBox::ExpandAll(), SalInstanceTreeView::get_iter_depth(), GetChildCount(), GetChildSelectionCount(), and GetVisibleChildCount().
SvTreeListEntry * SvTreeList::GetEntry | ( | SvTreeListEntry * | pParent, |
sal_uLong | nPos | ||
) | const |
Definition at line 1475 of file treelist.cxx.
References SvTreeListEntry::m_Children.
Referenced by SalInstanceTreeView::swap().
SvTreeListEntry * SvTreeList::GetEntry | ( | sal_uLong | nRootPos | ) | const |
Definition at line 1484 of file treelist.cxx.
References SvTreeListEntry::m_Children.
SvTreeListEntry * SvTreeList::GetEntryAtAbsPos | ( | sal_uLong | nAbsPos | ) | const |
Definition at line 969 of file treelist.cxx.
|
private |
Definition at line 980 of file treelist.cxx.
References DBG_ASSERT, First(), and NextVisible().
|
inline |
Definition at line 142 of file treelist.hxx.
Referenced by GetChildCount().
|
private |
Definition at line 1427 of file treelist.cxx.
References DBG_ASSERT, i, SortDescending, SortNone, and TREELIST_ENTRY_NOTFOUND.
Referenced by Insert(), and InsertTree().
const SvTreeListEntry * SvTreeList::GetParent | ( | const SvTreeListEntry * | pEntry | ) | const |
Definition at line 1506 of file treelist.cxx.
References SvTreeListEntry::pParent.
Referenced by SvImpLBox::CollapseTo(), SvImpLBox::EntryInserted(), SvImpLBox::EntryMoved(), and SvImpLBox::RemovingEntry().
SvTreeListEntry * SvTreeList::GetParent | ( | SvTreeListEntry * | pEntry | ) |
Definition at line 1514 of file treelist.cxx.
References SvTreeListEntry::pParent.
|
static |
Definition at line 831 of file treelist.cxx.
References SvTreeListEntry::GetChildListPos().
Referenced by SalInstanceTreeView::find_id(), SalInstanceTreeView::find_text(), SalInstanceTreeView::get_cursor_index(), SalInstanceTreeView::get_iter_index_in_parent(), SalInstanceTreeView::get_selected_index(), SalInstanceTreeView::get_selected_rows(), and SvTreeListBox::NotifyMoving().
SvTreeListEntry * SvTreeList::GetRootLevelParent | ( | SvTreeListEntry * | pEntry | ) | const |
Definition at line 1015 of file treelist.cxx.
References DBG_ASSERT, SvTreeListEntry::pParent, and pRootItem.
Referenced by SvImpLBox::KeyInput().
|
inline |
Definition at line 198 of file treelist.hxx.
Referenced by SalInstanceTreeView::get_sort_order().
|
private |
Definition at line 416 of file treelist.cxx.
References DBG_ASSERT, GetDepth(), SvListView::IsExpanded(), SvTreeListEntry::m_Children, nCount, NextVisible(), and pRootItem.
|
private |
Definition at line 580 of file treelist.cxx.
References assert(), First(), SvListView::GetViewData(), SvListView::HasViewData(), SvListView::m_pImpl, NextVisible(), nPos, and SvViewDataEntry::nVisPos.
Referenced by GetVisiblePos().
|
private |
Definition at line 566 of file treelist.cxx.
References DBG_ASSERT, SvListView::GetViewData(), GetVisibleCount(), m_pImpl, SvListView::m_pImpl, and SvViewDataEntry::nVisPos.
Referenced by NextVisible(), and PrevVisible().
sal_uLong SvTreeList::Insert | ( | SvTreeListEntry * | pEntry, |
SvTreeListEntry * | pPar, | ||
sal_uLong | nPos = TREELIST_APPEND |
||
) |
Definition at line 790 of file treelist.cxx.
References bAbsPositionsValid, Broadcast(), DBG_ASSERT, GetInsertionPos(), INSERTED, SvTreeListEntry::m_Children, nEntryCount, SvTreeListEntry::nListPos, SvTreeListEntry::pParent, pRootItem, SetListPositions(), and TREELIST_APPEND.
|
inline |
Definition at line 151 of file treelist.hxx.
References Insert.
void SvTreeList::InsertTree | ( | SvTreeListEntry * | pTree, |
SvTreeListEntry * | pTargetParent, | ||
sal_uLong | nListPos | ||
) |
Definition at line 322 of file treelist.cxx.
References bAbsPositionsValid, Broadcast(), DBG_ASSERT, GetChildCount(), GetInsertionPos(), INSERTED_TREE, SvTreeListEntry::m_Children, nEntryCount, SvTreeListEntry::pParent, pRootItem, and SetListPositions().
void SvTreeList::InvalidateEntry | ( | SvTreeListEntry * | pEntry | ) |
Definition at line 1007 of file treelist.cxx.
References Broadcast(), INVALIDATE_ENTRY, and mbEnableInvalidate.
Referenced by SvImpLBox::EntryInserted(), SvTreeListBox::Expand(), SvTreeListBox::InvalidateEntry(), SalInstanceTreeView::queue_draw(), and SvTreeListBox::SetEntryText().
bool SvTreeList::IsAtRootDepth | ( | const SvTreeListEntry * | pEntry | ) | const |
Definition at line 114 of file treelist.cxx.
References SvTreeListEntry::pParent, and pRootItem.
Referenced by SvImpLBox::DrawNet().
bool SvTreeList::IsChild | ( | const SvTreeListEntry * | pParent, |
const SvTreeListEntry * | pChild | ||
) | const |
Definition at line 127 of file treelist.cxx.
References SvTreeListEntry::m_Children, and pRootItem.
Referenced by SvImpLBox::CollapsingEntry(), SvImpLBox::EntryCollapsed(), and SvImpLBox::RemovingEntry().
|
inline |
Definition at line 137 of file treelist.hxx.
Referenced by SalInstanceTreeView::InvalidateModelEntry().
|
private |
Definition at line 86 of file treelist.cxx.
References DBG_ASSERT, SvListView::IsExpanded(), SvTreeListEntry::pParent, and pRootItem.
Referenced by LastVisible(), NextVisible(), and PrevVisible().
SvTreeListEntry * SvTreeList::Last | ( | ) | const |
Definition at line 554 of file treelist.cxx.
References SvTreeListEntry::m_Children, and pRootItem.
Referenced by IconViewImpl::KeyInput(), SvImpLBox::KeyInput(), LastVisible(), and SvImpLBox::RemovingEntry().
|
private |
Definition at line 705 of file treelist.cxx.
References DBG_ASSERT, IsEntryVisible(), Last(), and PrevVisible().
void SvTreeList::Move | ( | SvTreeListEntry * | pSource, |
SvTreeListEntry * | pTarget | ||
) |
Definition at line 303 of file treelist.cxx.
References SvTreeListEntry::GetChildListPos(), nPos, SvTreeListEntry::pParent, and pRootItem.
Referenced by SalInstanceTreeView::move_subtree(), and SalInstanceTreeView::swap().
sal_uLong SvTreeList::Move | ( | SvTreeListEntry * | pSource, |
SvTreeListEntry * | pTargetParent, | ||
sal_uLong | nListPos | ||
) |
Definition at line 175 of file treelist.cxx.
References assert(), bAbsPositionsValid, Broadcast(), DBG_ASSERT, SvTreeListEntry::GetChildListPos(), SvTreeListEntry::m_Children, MOVED, MOVING, p, SvTreeListEntry::pParent, pRootItem, and SetListPositions().
SvTreeListEntry * SvTreeList::Next | ( | SvTreeListEntry * | pEntry, |
sal_uInt16 * | pDepth = nullptr |
||
) | const |
Definition at line 467 of file treelist.cxx.
References DBG_ASSERT, SvTreeListEntry::GetChildListPos(), SvTreeListEntry::m_Children, SvTreeListEntry::pParent, and pRootItem.
Referenced by SvImpLBox::CollapseTo(), SvImpLBox::ExpandAll(), GetChildCount(), GetChildSelectionCount(), GetEntryAtAbsPos(), NextSelected(), SvImpLBox::SelAllDestrAnch(), and SetAbsolutePositions().
|
private |
Definition at line 781 of file treelist.cxx.
References DBG_ASSERT, SvListView::IsSelected(), and Next().
|
private |
Definition at line 611 of file treelist.cxx.
References DBG_ASSERT, SvTreeListEntry::GetChildListPos(), SvListView::IsExpanded(), SvTreeListEntry::m_Children, SvTreeListEntry::pParent, and pRootItem.
Referenced by FirstSelected(), GetEntryAtVisPos(), GetVisibleChildCount(), GetVisibleCount(), and NextVisible().
|
private |
Definition at line 714 of file treelist.cxx.
References DBG_ASSERT, GetVisiblePos(), IsEntryVisible(), SvListView::m_pImpl, and NextVisible().
|
privatedelete |
SvTreeListEntry * SvTreeList::Prev | ( | SvTreeListEntry * | pEntry | ) | const |
Definition at line 525 of file treelist.cxx.
References DBG_ASSERT, SvTreeListEntry::GetChildListPos(), SvTreeListEntry::m_Children, SvTreeListEntry::pParent, and pRootItem.
|
private |
Definition at line 672 of file treelist.cxx.
References DBG_ASSERT, SvTreeListEntry::GetChildListPos(), SvListView::IsExpanded(), SvTreeListEntry::m_Children, SvTreeListEntry::pParent, and pRootItem.
Referenced by LastVisible(), and PrevVisible().
|
private |
Definition at line 737 of file treelist.cxx.
References DBG_ASSERT, GetVisiblePos(), IsEntryVisible(), and PrevVisible().
bool SvTreeList::Remove | ( | const SvTreeListEntry * | pEntry | ) |
Definition at line 914 of file treelist.cxx.
References bAbsPositionsValid, Broadcast(), DBG_ASSERT, GetChildCount(), SvTreeListEntry::GetChildListPos(), SvTreeListEntry::HasChildListPos(), SvTreeListEntry::m_Children, nEntryCount, SvTreeListEntry::pParent, REMOVED, REMOVING, and SetListPositions().
void SvTreeList::Resort | ( | ) |
Definition at line 1373 of file treelist.cxx.
References RESORTED, and RESORTING.
Referenced by SalInstanceTreeView::set_sort_column(), SalInstanceTreeView::set_sort_func(), and SalInstanceTreeView::set_sort_order().
|
private |
Definition at line 1407 of file treelist.cxx.
References DBG_ASSERT, and SvTreeListEntry::m_Children.
|
private |
Definition at line 836 of file treelist.cxx.
References bAbsPositionsValid, First(), SvTreeListEntry::nAbsPos, Next(), and nPos.
Referenced by GetAbsPos().
|
inline |
Definition at line 189 of file treelist.hxx.
|
inline |
Definition at line 200 of file treelist.hxx.
Referenced by SvTreeListBox::ImplInitStyle(), and SalInstanceTreeView::make_sorted().
|
staticprivate |
Invalidate the cached position data to have them re-generated before the next access.
Definition at line 992 of file treelist.cxx.
References SvTreeListEntry::InvalidateChildrensListPositions(), and SvTreeListEntry::pParent.
Referenced by Copy(), Insert(), InsertTree(), Move(), and Remove().
|
inline |
Definition at line 197 of file treelist.hxx.
Referenced by SvTreeListBox::ImplInitStyle(), and SalInstanceTreeView::set_sort_order().
|
friend |
Definition at line 67 of file treelist.hxx.
|
private |
Definition at line 72 of file treelist.hxx.
Referenced by CloneEntry().
|
private |
Definition at line 73 of file treelist.hxx.
|
private |
Definition at line 76 of file treelist.hxx.
Referenced by Copy(), GetAbsPos(), Insert(), InsertTree(), Move(), Remove(), SetAbsolutePositions(), and SvTreeList().
|
private |
Definition at line 74 of file treelist.hxx.
Referenced by SvTreeList().
|
private |
Definition at line 78 of file treelist.hxx.
Referenced by EnableInvalidate(), and InvalidateEntry().
|
private |
Definition at line 69 of file treelist.hxx.
Referenced by Broadcast().
|
private |
Definition at line 70 of file treelist.hxx.
Referenced by Clear(), Copy(), First(), Insert(), InsertTree(), Remove(), and SvTreeList().
|
private |
Definition at line 121 of file treelist.hxx.
Referenced by Clear(), Copy(), First(), FirstChild(), GetChildSelectionCount(), GetDepth(), GetRootLevelParent(), GetVisibleChildCount(), Insert(), InsertTree(), IsAtRootDepth(), IsChild(), IsEntryVisible(), Last(), Move(), Next(), NextVisible(), Prev(), PrevVisible(), and SvTreeList().