27:
SvImpLBox( pTreeListBox, pTreeList, nWinStyle )
58 const auto result = f(info);
70 auto GetRow = [entry, &nEntryRow, row = -1](
const EntryAreaInfo& info)
mutable
74 if (info.entry != entry)
87 auto GetEntryAndRow = [&entry, &row,
max, found = entry](
const EntryAreaInfo& info)
mutable
94 if (row >=
max || info.entry == entry)
114 if (entryRow < oldStartRow)
117 const tools::Long posRelativeToBottom = entryRow - (oldStartRow + visibleRows) + 1;
118 if (posRelativeToBottom > 0)
125 auto FindPrev = [
this, pEntry, nRows, &pPrev,
126 prevs = std::vector<SvTreeListEntry*>()](
const EntryAreaInfo& info)
mutable
129 prevs.push_back(info.entry);
130 if (pEntry == info.entry)
132 if (prevs.size() > 1)
134 int i = std::max(0,
static_cast<int>(prevs.size()) - nRows - 1);
136 for (
short column = info.column; column; --column)
157 = [pEntry, nRows, &pNext, column = -1](
const EntryAreaInfo& info)
mutable
159 if (info.column <= column && !
IsSeparator(info.entry))
161 if (info.column == 0 && --nRows < 0)
164 if (info.column == column && nRows == 0)
167 else if (pEntry == info.entry)
169 column = info.column;
259 PageDown(
static_cast<short>(nDelta) );
278 PageUp(
static_cast<short>(nDelta) );
296 if (pEntry == info.entry)
298 result = info.area.TopLeft();
318 auto FindEntryByPos = [&pEntry, &rPoint](
const EntryAreaInfo& info)
320 if (info.area.Contains(rPoint))
325 else if (info.area.Top() > rPoint.
Y())
329 else if (info.area.Bottom() > rPoint.
Y())
363 sal_uInt16 nResult = 0;
365 Size aOSize(
m_pView->Control::GetOutputSizePixel() );
368 bool bVerSBar = ( nWindowStyle &
WB_VSCROLL ) != 0;
376 auto CountRowsAndHeight = [&nTotalRows, &totalHeight](
const EntryAreaInfo& info)
378 totalHeight = std::max(totalHeight, info.area.Bottom());
386 if( bVerSBar || totalHeight > aOSize.
Height())
392 bool bHorSBar = (nWindowStyle &
WB_HSCROLL) != 0;
421 if( nResult & 0x0001 )
426 if (nResult & 0x0002)
444 auto FindEntryByPos = [&pEntry, &rPoint](
const EntryAreaInfo& info)
446 if (info.area.Contains(rPoint))
451 else if (info.area.Top() > rPoint.
Y())
497 reinterpret_cast<void*
>(1));
563 sal_uInt16 aCode = rKeyCode.
GetCode();
565 bool bShift = rKeyCode.
IsShift();
566 bool bMod1 = rKeyCode.
IsMod1();
570 bool bHandled =
true;
713 if( pNewCursor && pNewCursor !=
m_pCursor)
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Post a user event to the default window.
bool IsEntryInView(SvTreeListEntry *pEntry) const override
Size GetEntrySize(const SvTreeListEntry &entry) const
void ScrollTo(SvTreeListEntry *entry)
bool KeyInput(const KeyEvent &) override
SvTreeListEntry * GoToPrevRow(SvTreeListEntry *pEntry, int n) const
void UpdateAll() override
std::function< CallbackResult(const EntryAreaInfo &)> IterateEntriesFunc
void SetStartEntry(SvTreeListEntry *entry)
void PageUp(sal_uInt16 nDelta) override
void IterateVisibleEntryAreas(const IterateEntriesFunc &f, bool fromStartEntry=false) const
void KeyDown(bool bPageDown) override
tools::Long GetEntryLine(const SvTreeListEntry *pEntry) const override
Point GetEntryPosition(const SvTreeListEntry *pEntry) const override
IconViewImpl(SvTreeListBox *pTreeListBox, SvTreeList *pTreeList, WinBits nWinStyle)
SvTreeListEntry * GetEntry(const Point &rPoint) const override
void AdjustScrollBars(Size &rSize) override
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
void SyncVerThumb() override
void InvalidateEntry(tools::Long nId) const override
tools::Long GetEntryRow(const SvTreeListEntry *entry) const
void KeyUp(bool bPageUp) override
SvTreeListEntry * GoToNextRow(SvTreeListEntry *pEntry, int n) const
SvTreeListEntry * GetClickedEntry(const Point &rPoint) const override
void CursorDown() override
void PageDown(sal_uInt16 nDelta) override
const vcl::KeyCode & GetKeyCode() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
constexpr tools::Long Y() const
SelectionMode GetSelectionMode() const
void CursorPosChanging(bool bShift, bool bMod1)
void SetVisibleArea(const tools::Rectangle &rNewArea)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
SvTreeListEntry * m_pStartEntry
SvTreeListEntry * m_pCursor
VclPtr< ScrollBar > m_aHorSBar
SelectionEngine m_aSelEng
tools::Rectangle GetVisibleArea() const
void PositionScrollBars(Size &rOSize, sal_uInt16 nMask)
ImplSVEvent * m_nCurUserEvent
VclPtr< ScrollBar > m_aVerSBar
sal_uLong m_nVisibleCount
virtual bool KeyInput(const KeyEvent &)
VclPtr< SvTreeListBox > m_pView
void MakeVisible(SvTreeListEntry *pEntry, bool bMoveToTop=false)
void SetCursor(SvTreeListEntry *pEntry, bool bForceNoSelect=false)
void ShowCursor(bool bShow)
bool IsSelectable(const SvTreeListEntry *pEntry) const
SvTreeListEntry * NextVisible(SvTreeListEntry *pEntry) const
SvTreeListEntry * FirstVisible() const
SvTreeListEntry * PrevVisible(SvTreeListEntry *pEntry) const
sal_uInt32 GetVisibleCount() const
bool IsEntryVisible(SvTreeListEntry *pEntry) const
sal_uInt32 GetEntryCount() const
bool Select(SvTreeListEntry *pEntry, bool bSelect=true)
short GetEntryHeight() const
SvTreeListEntry * First() const
short GetColumnsCount() const
Link< SvTreeListBox *, bool > aDoubleClickHdl
short GetEntryWidth() const
SvTreeList * GetModel() const
SvTLEntryFlags GetFlags() const
SvTreeListEntry * Last() const
reference_type * get() const
Get the body.
sal_uInt16 GetCode() const
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
#define DBG_ASSERT(sCon, aError)
static bool IsSeparator(const SvTreeListEntry *entry)
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_END
#define LINK(Instance, Class, Member)
WinBits const WB_NOINITIALSELECTION