57 , maBackColor(
Application::GetSettings().GetStyleSettings().GetWindowColor())
97 for (
auto const& it : pSource->
m_Items)
100 std::unique_ptr<SvLBoxItem> pNewItem(pItem->
Clone(pItem));
101 m_Items.push_back(std::move(pNewItem));
115 m_Items.push_back(std::move(pItem));
157 bool operator() (
const std::unique_ptr<SvLBoxItem>& rpItem)
const
159 return rpItem->GetType() ==
meType;
167 explicit FindByPointer(
const SvLBoxItem* p) : mpItem(
p) {}
168 bool operator() (
const std::unique_ptr<SvLBoxItem>& rpItem)
const
170 return rpItem.get() == mpItem;
178 ItemsType::const_iterator it = std::find_if(
m_Items.begin(),
m_Items.end(), FindByType(
eType));
179 return (it ==
m_Items.end()) ? nullptr : (*it).get();
185 return (it ==
m_Items.end()) ? nullptr : (*it).get();
190 ItemsType::const_iterator it = std::find_if(
m_Items.begin(),
m_Items.end(), FindByPointer(pItem));
215 return (
nPos < rList.size()) ? rList[
nPos].get() :
nullptr;
225 return rList[
nPos].get();
232 return (rChildren.empty()) ? nullptr : rChildren.back().get();
Base class used mainly for the LibreOffice Desktop class.
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const =0
void InvalidateChildrensListPositions()
SvTreeListEntry * PrevSibling() const
SvTreeListEntry * NextSibling() const
SvTreeListEntries m_Children
void Clone(SvTreeListEntry *pSource)
const SvLBoxItem * GetFirstItem(SvLBoxItemType eType) const
void * GetUserData() const
size_t GetPos(const SvLBoxItem *pItem) const
virtual ~SvTreeListEntry()
bool HasChildrenOnDemand() const
bool HasChildListPos() const
const SvLBoxItem & GetItem(size_t nPos) const
void ReplaceItem(std::unique_ptr< SvLBoxItem > pNewItem, size_t nPos)
static const size_t ITEM_NOT_FOUND
void EnableChildrenOnDemand(bool bEnable=true)
void SetFlags(SvTLEntryFlags nFlags)
SvTreeListEntry * pParent
void AddItem(std::unique_ptr< SvLBoxItem > pItem)
sal_uInt32 GetChildListPos() const
SvTLEntryFlags nEntryFlags
SvTreeListEntry * LastSibling() const
void SetUserData(void *pPtr)
#define DBG_ASSERT(sCon, aError)
std::vector< std::unique_ptr< SvTreeListEntry > > SvTreeListEntries