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;
246 std::vector<std::unique_ptr<SvLBoxTab>>
aTabs;
284 void UnsetDropTarget();
290 void EnableSelectionAsDropTarget(
bool bEnable =
true );
292 using Window::GetDropTarget;
304 void CancelTextEditing();
310 void RecalcViewData();
323 void OnCurrentEntryChanged();
334 virtual void dispose()
override;
343 return pModel ? pModel->GetEntryCount() : 0;
347 return pModel ? pModel->First() :
nullptr;
351 return pModel->Next(pEntry);
355 return pModel->Prev(pEntry);
359 return pModel ? pModel->Last() :
nullptr;
366 void RemoveSelection();
379 SvTreeListEntry* GetEntryFromPath( const ::std::deque< sal_Int32 >& _rPath )
const;
380 void FillEntryPath(
SvTreeListEntry* pEntry, ::std::deque< sal_Int32 >& _rPath )
const;
382 using Window::GetParent;
385 using Window::GetChildCount;
398 void EndEditing(
bool bCancel =
false );
418 bool DoubleClickHdl();
431 virtual void DragFinished(
sal_Int8 nDropAction );
440 sal_uInt32& rNewChildPos);
447 sal_uInt32& rNewChildPos);
452 virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
override;
455 void FillAccessibleEntryStateSet(
SvTreeListEntry* pEntry, sal_Int64& rStateSet )
const;
457 virtual OUString GetEntryAccessibleDescription(
SvTreeListEntry* pEntry)
const;
469 void set_min_width_in_chars(sal_Int32 nChars);
471 virtual bool set_property(
const OUString &rKey,
const OUString &rValue)
override;
480 void AdjustEntryHeight(
const Image& rBmp );
490 void SetupDragOrigin();
493 void EditedText(
const OUString&);
497 virtual void SetTabs();
499 sal_uInt16
TabCount()
const {
return aTabs.size(); }
501 SvLBoxTab* GetFirstDynamicTab( sal_uInt16& rTabPos )
const;
509 void NotifyScrolled();
515 virtual void RequestHelp(
const HelpEvent& rHEvt )
override;
522 void CallImplEventListeners(
VclEventId nEvent,
void* pData);
526 void AdjustEntryHeightAndRecalc();
533 void SetNoAutoCurEntry(
bool b );
541 static const Image& GetDefaultExpandedNodeImage( );
546 static const Image& GetDefaultCollapsedNodeImage( );
550 void SetNodeDefaultImages();
553 bool bChildrenOnDemand =
false,
554 sal_uInt32 nPos=TREELIST_APPEND,
void* pUserData =
nullptr);
556 const Image& GetDefaultExpandedEntryBmp( )
const;
557 const Image& GetDefaultCollapsedEntryBmp( )
const;
559 void SetDefaultExpandedEntryBmp(
const Image& rBmp );
560 void SetDefaultCollapsedEntryBmp(
const Image& rBmp );
573 void CheckButtonHdl();
575 void SetSublistOpenWithLeftRight();
577 void EnableInplaceEditing(
bool bEnable );
581 virtual bool EditedEntry(
SvTreeListEntry* pEntry,
const OUString& rNewText );
588 virtual void Resize()
override;
591 void SetUpdateMode(
bool );
593 virtual void ModelHasCleared()
override;
602 void ScrollOutputArea(
short nDeltaEntries );
606 void SetEntryHeight(
short nHeight );
608 void SetEntryWidth(
short nWidth );
609 Size GetOutputSizePixel()
const;
611 void SetSpaceBetweenEntries(
short nSpace );
626 std::pair<tools::Long, tools::Long> GetItemPos(
SvTreeListEntry* pEntry, sal_uInt16 nTabIdx);
635 void SelectAll(
bool bSelect );
642 void SetHighlightRange(sal_uInt16 nFirstTab=0, sal_uInt16 nLastTab=0xffff);
654 tools::Long getPreferredDimensions(std::vector<tools::Long> &rWidths)
const;
656 virtual Size GetOptimalSize()
const override;
675 void SetForceMakeVisible(
bool bEnable);
681 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)
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
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