22#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS)
23#error "don't use this in new code"
79#define SV_TAB_BORDER 8
81#define SV_ENTRYHEIGHTOFFS_PIXEL 2
128 static int GetHeight(
const SvViewDataEntry* pData, sal_uInt16 nItemPos);
129 void Enable(
bool bEnabled) { mbDisabled = !bEnabled; }
173typedef std::tuple<vcl::RenderContext&, const tools::Rectangle&, const SvTreeListEntry&>
svtree_render_args;
178 ,
public DropTargetHelper
179 ,
public DragSourceHelper
190 std::unique_ptr<SvTreeListBoxImpl>
mpImpl;
248 std::vector<std::unique_ptr<SvLBoxTab>>
aTabs;
286 void UnsetDropTarget();
292 void EnableSelectionAsDropTarget(
bool bEnable =
true );
294 using Window::GetDropTarget;
306 void CancelTextEditing();
312 void RecalcViewData();
325 void OnCurrentEntryChanged();
336 virtual void dispose()
override;
345 return pModel ? pModel->GetEntryCount() : 0;
349 return pModel ? pModel->First() :
nullptr;
353 return pModel->Next(pEntry);
357 return pModel->Prev(pEntry);
361 return pModel ? pModel->Last() :
nullptr;
368 void RemoveSelection();
381 SvTreeListEntry* GetEntryFromPath( const ::std::deque< sal_Int32 >& _rPath )
const;
382 void FillEntryPath(
SvTreeListEntry* pEntry, ::std::deque< sal_Int32 >& _rPath )
const;
384 using Window::GetParent;
387 using Window::GetChildCount;
400 void EndEditing(
bool bCancel =
false );
420 bool DoubleClickHdl();
433 virtual void DragFinished(
sal_Int8 nDropAction );
442 sal_uInt32& rNewChildPos);
449 sal_uInt32& rNewChildPos);
454 virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
override;
457 void FillAccessibleEntryStateSet(
SvTreeListEntry* pEntry, sal_Int64& rStateSet )
const;
459 virtual OUString GetEntryAccessibleDescription(
SvTreeListEntry* pEntry)
const;
471 void set_min_width_in_chars(sal_Int32 nChars);
473 virtual bool set_property(
const OString &rKey,
const OUString &rValue)
override;
482 void AdjustEntryHeight(
const Image& rBmp );
492 void SetupDragOrigin();
495 void EditedText(
const OUString&);
499 virtual void SetTabs();
501 sal_uInt16
TabCount()
const {
return aTabs.size(); }
503 SvLBoxTab* GetFirstDynamicTab( sal_uInt16& rTabPos )
const;
511 void NotifyScrolled();
517 virtual void RequestHelp(
const HelpEvent& rHEvt )
override;
524 void CallImplEventListeners(
VclEventId nEvent,
void* pData);
528 void AdjustEntryHeightAndRecalc();
535 void SetNoAutoCurEntry(
bool b );
543 static const Image& GetDefaultExpandedNodeImage( );
548 static const Image& GetDefaultCollapsedNodeImage( );
552 void SetNodeDefaultImages();
555 bool bChildrenOnDemand =
false,
556 sal_uInt32 nPos=TREELIST_APPEND,
void* pUserData =
nullptr);
558 const Image& GetDefaultExpandedEntryBmp( )
const;
559 const Image& GetDefaultCollapsedEntryBmp( )
const;
561 void SetDefaultExpandedEntryBmp(
const Image& rBmp );
562 void SetDefaultCollapsedEntryBmp(
const Image& rBmp );
575 void CheckButtonHdl();
577 void SetSublistOpenWithLeftRight();
579 void EnableInplaceEditing(
bool bEnable );
583 virtual bool EditedEntry(
SvTreeListEntry* pEntry,
const OUString& rNewText );
590 virtual void Resize()
override;
593 void SetUpdateMode(
bool );
595 virtual void ModelHasCleared()
override;
604 void ScrollOutputArea(
short nDeltaEntries );
608 void SetEntryHeight(
short nHeight );
610 void SetEntryWidth(
short nWidth );
611 Size GetOutputSizePixel()
const;
613 void SetSpaceBetweenEntries(
short nSpace );
620 SvTreeListEntry* GetEntry(
const Point& rPos,
bool bHit =
false )
const;
628 std::pair<tools::Long, tools::Long> GetItemPos(
SvTreeListEntry* pEntry, sal_uInt16 nTabIdx);
637 void SelectAll(
bool bSelect );
642 using Window::Invalidate;
646 void SetHighlightRange(sal_uInt16 nFirstTab=0, sal_uInt16 nLastTab=0xffff);
658 tools::Long getPreferredDimensions(std::vector<tools::Long> &rWidths)
const;
660 virtual Size GetOptimalSize()
const override;
662 void SetAlternatingRowColors(
const bool bEnable );
681 void SetForceMakeVisible(
bool bEnable);
687 virtual void EnableRTL(
bool bEnable =
true)
override;
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual void InitViewData(SvTreeListBox *pView, SvTreeListEntry *pEntry, SvViewDataItem *pViewData=nullptr)=0
virtual std::unique_ptr< SvLBoxItem > Clone(SvLBoxItem const *pSource) const =0
virtual SvLBoxItemType GetType() const =0
virtual void Paint(const Point &rPos, SvTreeListBox &rOutDev, vcl::RenderContext &rRenderContext, const SvViewDataEntry *pView, const SvTreeListEntry &rEntry)=0
void Enable(bool bEnabled)
tools::Long GetPos() const
tools::Long CalcOffset(tools::Long nItemLength, tools::Long nTabWidth)
void SetPos(tools::Long nNewPos)
sal_uInt16 nCurEntrySelPos
SvTreeListEntry * Prev(SvTreeListEntry *pEntry) const
SvTreeListEntry * pTargetEntry
SvTreeFlags GetTreeFlags() const
sal_Int8 mnClicksToToggle
Link< const CommandEvent &, bool > aPopupMenuHdl
void SetDeselectHdl(const Link< SvTreeListBox *, void > &rNewHdl)
void SetScrolledHdl(const Link< SvTreeListBox *, void > &rLink)
sal_uInt32 GetEntryCount() const
bool GetActivateOnSingleClick() const
Link< SvTreeListBox *, void > aDeselectHdl
void SetDoubleClickHdl(const Link< SvTreeListBox *, bool > &rNewHdl)
bool mbAlternatingRowColors
OUString GetEntryTooltip(SvTreeListEntry *pEntry) const
void SetClicksToToggle(sal_Int8 nCount)
SvTreeListEntry * GetHdlEntry() const
void SetActivateOnSingleClick(bool bEnable)
void SetExpandedHdl(const Link< SvTreeListBox *, void > &rNewHdl)
Image aPrevInsertedColBmp
bool TextCenterAndClipEnabled() const
void SetHoverSelection(bool bEnable)
std::unique_ptr< SvTreeListBoxImpl > mpImpl
bool IsSelectDueToHover() const
void SetTooltipHdl(const Link< SvTreeListEntry *, OUString > &rLink)
Link< SvTreeListBox *, void > aExpandedHdl
DragDropMode nDragDropMode
SvTreeListEntry * Next(SvTreeListEntry *pEntry) const
Link< svtree_measure_args, Size > aCustomMeasureHdl
DECL_DLLPRIVATE_LINK(DragFinishHdl_Impl, sal_Int8, void)
DECL_DLLPRIVATE_LINK(CloneHdl_Impl, SvTreeListEntry *, SvTreeListEntry *)
SvTreeListEntry * pHdlEntry
bool IsInplaceEditingEnabled() const
SvTreeListEntry * pEdEntry
Image aPrevInsertedExpBmp
bool GetHoverSelection() const
bool mbContextBmpExpanded
SvTreeListEntry * Last() const
void SetCustomRenderHdl(const Link< svtree_render_args, void > &rLink)
bool mbActivateOnSingleClick
tools::Long GetXOffset() const
SvLBoxButtonData * pCheckButtonData
sal_uInt16 TabCount() const
bool IsEditingActive() const
sal_Int32 nMinWidthInChars
short GetEntryHeight() const
rtl::Reference< TransferDataContainer > m_xTransferHelper
tools::Long mnCheckboxItemWidth
std::vector< std::unique_ptr< SvLBoxTab > > aTabs
short nContextBmpWidthMax
Link< SvTreeListBox *, bool > aExpandingHdl
void SetCustomMeasureHdl(const Link< svtree_measure_args, Size > &rLink)
SvTreeListEntry * First() const
DragDropMode GetDragDropMode() const
std::unique_ptr< SvInplaceEdit2 > pEdCtrl
Link< SvTreeListEntry *, OUString > aTooltipHdl
DECL_DLLPRIVATE_LINK(DefaultCompare, const SvSortData &, sal_Int32)
DECL_DLLPRIVATE_LINK(TextEditEndedHdl_Impl, SvInplaceEdit2 &, void)
void SetSelectHdl(const Link< SvTreeListBox *, void > &rNewHdl)
short GetColumnsCount() const
Link< SvTreeListBox *, void > aScrolledHdl
void SetQuickSearch(bool bEnable)
SelectionMode GetSelectionMode() const
std::unique_ptr< SvImpLBox > pImpl
Link< SvTreeListBox *, bool > aDoubleClickHdl
DragDropMode nOldDragMode
DECL_DLLPRIVATE_LINK(CheckButtonClick, SvLBoxButtonData *, void)
Link< svtree_render_args, void > aCustomRenderHdl
void SetPopupMenuHdl(const Link< const CommandEvent &, bool > &rLink)
short GetEntryWidth() const
void SetExpandingHdl(const Link< SvTreeListBox *, bool > &rNewHdl)
SvTreeListBoxFlags nImpFlags
bool mbUpdateAlternatingRows
SvTreeList * GetModel() const
Link< SvTreeListBox *, void > aSelectHdl
View-dependent data for a tree list entry created in the virtual function SvTreeListBox::CreateViewDa...
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
void Clear(EHistoryType eHistory)
const void * StringEntryIdentifier
std::tuple< vcl::RenderContext &, const tools::Rectangle &, const SvTreeListEntry & > svtree_render_args
std::pair< vcl::RenderContext &, const SvTreeListEntry & > svtree_measure_args