22 #if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS)
23 #error "don't use this in new code"
53 class AccessibleStateSetHelper;
83 #define SV_TAB_BORDER 8
85 #define SV_ENTRYHEIGHTOFFS_PIXEL 2
133 static int GetHeight(
const SvViewDataEntry* pData, sal_uInt16 nItemPos);
134 void Enable(
bool bEnabled) { mbDisabled = !bEnabled; }
143 virtual std::unique_ptr<SvLBoxItem>
Clone(
SvLBoxItem const * pSource)
const = 0;
177 typedef std::tuple<vcl::RenderContext&, const tools::Rectangle&, const SvTreeListEntry&>
svtree_render_args;
194 std::unique_ptr<SvTreeListBoxImpl>
mpImpl;
251 std::vector<std::unique_ptr<SvLBoxTab>>
aTabs;
289 void UnsetDropTarget();
295 void EnableSelectionAsDropTarget(
bool bEnable =
true );
309 void CancelTextEditing();
315 void RecalcViewData();
328 void OnCurrentEntryChanged();
339 virtual void dispose()
override;
348 return pModel ? pModel->GetEntryCount() : 0;
352 return pModel ? pModel->First() :
nullptr;
356 return pModel->Next(pEntry);
360 return pModel->Prev(pEntry);
364 return pModel ? pModel->Last() :
nullptr;
371 void RemoveSelection();
384 SvTreeListEntry* GetEntryFromPath( const ::std::deque< sal_Int32 >& _rPath )
const;
385 void FillEntryPath(
SvTreeListEntry* pEntry, ::std::deque< sal_Int32 >& _rPath )
const;
400 void EndEditing(
bool bCancel =
false );
420 bool DoubleClickHdl();
433 virtual void DragFinished(
sal_Int8 nDropAction );
454 virtual css::uno::Reference< css::accessibility::XAccessible >
CreateAccessible()
override;
469 void set_min_width_in_chars(sal_Int32 nChars);
471 virtual bool set_property(
const OString &rKey,
const OUString &rValue)
override;
476 void AdjustEntryHeight(
const Image& rBmp );
486 void SetupDragOrigin();
489 void EditedText(
const OUString&);
493 virtual void SetTabs();
495 sal_uInt16
TabCount()
const {
return aTabs.size(); }
497 SvLBoxTab* GetFirstDynamicTab( sal_uInt16& rTabPos )
const;
505 void NotifyScrolled();
518 void CallImplEventListeners(
VclEventId nEvent,
void* pData);
522 void AdjustEntryHeightAndRecalc();
529 void SetNoAutoCurEntry(
bool b );
533 void SetNodeBitmaps(
const Image& rCollapsedNodeBmp,
const Image& rExpandedNodeBmp );
538 static const Image& GetDefaultExpandedNodeImage( );
543 static const Image& GetDefaultCollapsedNodeImage( );
550 GetDefaultCollapsedNodeImage( ),
551 GetDefaultExpandedNodeImage( )
556 bool bChildrenOnDemand =
false,
557 sal_uLong nPos=TREELIST_APPEND,
void* pUserData =
nullptr);
560 const Image& rExpandedEntryBmp,
561 const Image& rCollapsedEntryBmp,
563 bool bChildrenOnDemand =
false,
564 sal_uLong nPos = TREELIST_APPEND,
void* pUserData =
nullptr );
566 const Image& GetDefaultExpandedEntryBmp( )
const;
567 const Image& GetDefaultCollapsedEntryBmp( )
const;
569 void SetDefaultExpandedEntryBmp(
const Image& rBmp );
570 void SetDefaultCollapsedEntryBmp(
const Image& rBmp );
583 void CheckButtonHdl();
585 void SetSublistOpenWithLeftRight();
587 void EnableInplaceEditing(
bool bEnable );
591 virtual bool EditedEntry(
SvTreeListEntry* pEntry,
const OUString& rNewText );
598 virtual void Resize()
override;
612 void ScrollOutputArea(
short nDeltaEntries );
616 void SetEntryHeight(
short nHeight );
618 void SetEntryWidth(
short nWidth );
621 void SetSpaceBetweenEntries(
short nSpace );
626 void SetCollapsedNodeBmp(
const Image& );
627 void SetExpandedNodeBmp(
const Image& );
628 Image const & GetExpandedNodeBmp( )
const;
632 SvTreeListEntry* GetEntry(
const Point& rPos,
bool bHit =
false )
const;
648 void SelectAll(
bool bSelect );
657 void SetHighlightRange(sal_uInt16 nFirstTab=0, sal_uInt16 nLastTab=0xffff);
669 tools::Long getPreferredDimensions(std::vector<tools::Long> &rWidths)
const;
673 void SetAlternatingRowColors(
const bool bEnable );
688 void SetForceMakeVisible(
bool bEnable);
Link< svtree_measure_args, Size > aCustomMeasureHdl
virtual void ModelHasEntryInvalidated(SvTreeListEntry *pEntry)
virtual FactoryFunction GetUITestFactory() const
void SetDeselectHdl(const Link< SvTreeListBox *, void > &rNewHdl)
sal_uInt16 TabCount() const
DECL_DLLPRIVATE_LINK(ImplHandlePaintHdl, Timer *, void)
virtual void MouseButtonDown(const MouseEvent &rMEvt)
Link< const HelpEvent &, bool > aTooltipHdl
void SetExpandingHdl(const Link< SvTreeListBox *, bool > &rNewHdl)
SvTreeList * GetModel() const
bool IsEditingActive() const
void SetDoubleClickHdl(const Link< SvTreeListBox *, bool > &rNewHdl)
sal_uLong GetEntryCount() const
virtual StringEntryIdentifier CurrentEntry(OUString &_out_entryText) const =0
returns the current entry in the list of searchable strings.
virtual void StateChanged(StateChangedType nStateChange) override
void SetScrolledHdl(const Link< SvTreeListBox *, void > &rLink)
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
tools::Long mnCheckboxItemWidth
const MapMode & GetMapMode() const
Link< const CommandEvent &, bool > aPopupMenuHdl
short nContextBmpWidthMax
bool mbUpdateAlternatingRows
void SetCustomMeasureHdl(const Link< svtree_measure_args, Size > &rLink)
SelectionMode GetSelectionMode() const
short GetColumnsCount() const
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
View-dependent data for a tree list entry created in the virtual function SvTreeListBox::CreateViewDa...
virtual void MouseButtonUp(const MouseEvent &rMEvt)
SvTreeListBoxFlags nImpFlags
bool mbAlternatingRowColors
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
rtl::Reference< TransferDataContainer > m_xTransferHelper
std::pair< vcl::RenderContext &, const SvTreeListEntry & > svtree_measure_args
SvLBoxButtonData * pCheckButtonData
virtual void SelectEntry(StringEntryIdentifier _entry)=0
selects a given entry
bool mbContextBmpExpanded
sal_Int32 nMinWidthInChars
virtual void ModelHasInsertedTree(SvTreeListEntry *pEntry)
Link< SvTreeListBox *, bool > aDoubleClickHdl
const void * StringEntryIdentifier
void SetSelectHdl(const Link< SvTreeListBox *, void > &rNewHdl)
void Enable(bool bEnabled)
bool GetHoverSelection() const
short GetEntryHeight() const
Link< SvTreeListBox *, void > aDeselectHdl
SvTreeListEntry * GetHdlEntry() const
DragDropMode nOldDragMode
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt)
void SetHoverSelection(bool bEnable)
SvTreeListEntry * pHdlEntry
sal_uInt16 nCurEntrySelPos
SvTreeListEntry * pTargetEntry
Image aPrevInsertedExpBmp
short GetEntryWidth() const
virtual void InitViewData(SvViewDataEntry *, SvTreeListEntry *pEntry)
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
DragDropMode nDragDropMode
DECL_LINK(AutocompleteHdl, Edit &, void)
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt)
tools::Long GetXOffset() const
bool mbActivateOnSingleClick
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget()
void SetUpdateMode(bool bUpdate)
Link< SvTreeListBox *, void > aExpandedHdl
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
std::unique_ptr< SvImpLBox > pImpl
virtual void ModelHasRemoved(SvTreeListEntry *pEntry)
void SetPopupMenuHdl(const Link< const CommandEvent &, bool > &rLink)
Link< SvTreeListBox *, void > aSelectHdl
bool TextCenterAndClipEnabled() const
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Size GetOutputSizePixel() const
void SetNodeDefaultImages()
Sets default bitmaps for collapsed and expanded nodes.
Image aPrevInsertedColBmp
void SetCustomRenderHdl(const Link< svtree_render_args, void > &rLink)
virtual bool set_property(const OString &rKey, const OUString &rValue)
DragDropMode GetDragDropMode() const
void SetTooltipHdl(const Link< const HelpEvent &, bool > &rLink)
vcl::Window * GetParent() const
void SetExpandedHdl(const Link< SvTreeListBox *, void > &rNewHdl)
sal_Int8 mnClicksToToggle
SvTreeListEntry * Next(SvTreeListEntry *pEntry) const
std::vector< std::unique_ptr< SvLBoxTab > > aTabs
std::unique_ptr< SvTreeListBoxImpl > mpImpl
virtual void KeyInput(const KeyEvent &rKEvt)
void SetClicksToToggle(sal_Int8 nCount)
virtual Size GetOptimalSize() const override
SvTreeListEntry * First() const
bool IsInplaceEditingEnabled() const
sal_uInt16 GetChildCount() const
Link< SvTreeListBox *, bool > aExpandingHdl
virtual StringEntryIdentifier NextEntry(StringEntryIdentifier _currentEntry, OUString &_out_entryText) const =0
returns the next entry in the list.
virtual void Resize() override
virtual void ModelIsRemoving(SvTreeListEntry *pEntry)
void SetActivateOnSingleClick(bool bEnable)
SvTreeListEntry * pEdEntry
void SetFont(const vcl::Font &rNewFont)
std::tuple< vcl::RenderContext &, const tools::Rectangle &, const SvTreeListEntry & > svtree_render_args
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
SvTreeListEntry * Last() const
const Point & GetOrigin() const
virtual void ModelIsMoving(SvTreeListEntry *pSource)
virtual void MouseMove(const MouseEvent &rMEvt)
Link< svtree_render_args, void > aCustomRenderHdl
tools::Long GetPos() const
virtual void ModelHasCleared()
virtual void Command(const CommandEvent &rCEvt)
tools::Long CalcOffset(tools::Long nItemLength, tools::Long nTabWidth)
virtual void ModelNotification(SvListAction nActionId, SvTreeListEntry *pEntry1, SvTreeListEntry *pEntry2, sal_uLong nPos)
virtual void RequestHelp(const HelpEvent &rHEvt)
virtual void ModelHasMoved(SvTreeListEntry *pSource)
virtual void ModelHasInserted(SvTreeListEntry *pEntry)
SvTreeListEntry * Prev(SvTreeListEntry *pEntry) const
SvTreeFlags GetTreeFlags() const
void SetQuickSearch(bool bEnable)
Link< SvTreeListBox *, void > aScrolledHdl
std::unique_ptr< SvInplaceEdit2 > pEdCtrl
virtual void DataChanged(const DataChangedEvent &rDCEvt)
void SetPos(tools::Long nNewPos)