LibreOffice Module vcl (master) 1
iconviewimpl.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <vcl/svapp.hxx>
22#include <tools/debug.hxx>
23#include <iconview.hxx>
24#include "iconviewimpl.hxx"
25
26IconViewImpl::IconViewImpl( SvTreeListBox* pTreeListBox, SvTreeList* pTreeList, WinBits nWinStyle )
27: SvImpLBox( pTreeListBox, pTreeList, nWinStyle )
28{
29}
30
31static bool IsSeparator(const SvTreeListEntry* entry)
32{
33 return entry && entry->GetFlags() & SvTLEntryFlags::IS_SEPARATOR;
34}
35
37{
38 return static_cast<const IconView*>(m_pView.get())->GetEntrySize(entry);
39}
40
41void IconViewImpl::IterateVisibleEntryAreas(const IterateEntriesFunc& f, bool fromStartEntry) const
42{
43 tools::Long x = 0, y = 0;
44 short column = 0;
46 tools::Long nPrevHeight = 0;
47 for (auto entry = fromStartEntry ? m_pStartEntry : m_pView->FirstVisible(); entry;
48 entry = m_pView->NextVisible(entry))
49 {
50 const Size s = GetEntrySize(*entry);
51 if (x >= rowWidth || IsSeparator(entry))
52 {
53 column = 0;
54 x = 0;
55 y += nPrevHeight;
56 }
57 EntryAreaInfo info{ entry, column, tools::Rectangle{ Point{ x, y }, s } };
58 const auto result = f(info);
60 return;
61 ++column;
62 x += s.Width();
63 nPrevHeight = s.Height();
64 }
65}
66
68{
69 tools::Long nEntryRow = -1;
70 auto GetRow = [entry, &nEntryRow, row = -1](const EntryAreaInfo& info) mutable
71 {
72 if (info.column == 0 && !IsSeparator(info.entry))
73 ++row;
74 if (info.entry != entry)
76 nEntryRow = row;
78 };
80 return nEntryRow;
81}
82
84{
86 tools::Long row = -1;
87 auto GetEntryAndRow = [&entry, &row, max, found = entry](const EntryAreaInfo& info) mutable
88 {
89 if (info.column == 0 && !IsSeparator(info.entry))
90 {
91 found = info.entry;
92 ++row;
93 }
94 if (row >= max || info.entry == entry)
95 {
96 entry = found;
98 }
100 };
101 IterateVisibleEntryAreas(GetEntryAndRow);
102
103 m_pStartEntry = entry;
106}
107
109{
110 if (!m_aVerSBar->IsVisible())
111 return;
112 const tools::Long entryRow = GetEntryRow(entry);
113 const tools::Long oldStartRow = m_aVerSBar->GetThumbPos();
114 if (entryRow < oldStartRow)
116 const tools::Long visibleRows = m_aVerSBar->GetVisibleSize();
117 const tools::Long posRelativeToBottom = entryRow - (oldStartRow + visibleRows) + 1;
118 if (posRelativeToBottom > 0)
120}
121
123{
124 SvTreeListEntry* pPrev = pEntry;
125 auto FindPrev = [this, pEntry, nRows, &pPrev,
126 prevs = std::vector<SvTreeListEntry*>()](const EntryAreaInfo& info) mutable
127 {
128 if (info.column == 0 && !IsSeparator(info.entry))
129 prevs.push_back(info.entry);
130 if (pEntry == info.entry)
131 {
132 if (prevs.size() > 1)
133 {
134 int i = std::max(0, static_cast<int>(prevs.size()) - nRows - 1);
135 pPrev = prevs[i];
136 for (short column = info.column; column; --column)
137 {
138 SvTreeListEntry* pNext = m_pView->NextVisible(pPrev);
139 if (!pNext || IsSeparator(pNext))
140 break;
141 pPrev = pNext;
142 }
143 }
145 }
147 };
148 IterateVisibleEntryAreas(FindPrev);
149
150 return pPrev;
151}
152
154{
155 SvTreeListEntry* pNext = pEntry;
156 auto FindNext
157 = [pEntry, nRows, &pNext, column = -1](const EntryAreaInfo& info) mutable
158 {
159 if (info.column <= column && !IsSeparator(info.entry))
160 {
161 if (info.column == 0 && --nRows < 0)
163 pNext = info.entry;
164 if (info.column == column && nRows == 0)
166 }
167 else if (pEntry == info.entry)
168 {
169 column = info.column;
170 }
172 };
173 IterateVisibleEntryAreas(FindNext);
174
175 return pNext;
176}
177
179{
180 if (!m_pStartEntry)
181 return;
182
183 SvTreeListEntry* pPrevFirstToDraw = GoToPrevRow(m_pStartEntry, 1);
184
186 ShowCursor( false );
187 SetStartEntry(pPrevFirstToDraw);
188 ShowCursor( true );
190}
191
193{
194 if (!m_pStartEntry)
195 return;
196
197 SvTreeListEntry* pNextFirstToDraw = GoToNextRow(m_pStartEntry, 1);
198
200 ShowCursor( false );
201 SetStartEntry(pNextFirstToDraw);
202 ShowCursor( true );
204}
205
206void IconViewImpl::PageDown( sal_uInt16 nDelta )
207{
208 if( !nDelta )
209 return;
210
211 if (!m_pStartEntry)
212 return;
213
214 SvTreeListEntry* pNext = GoToNextRow(m_pStartEntry, nDelta);
215
216 ShowCursor( false );
217
219 SetStartEntry(pNext);
220
221 ShowCursor( true );
222}
223
224void IconViewImpl::PageUp( sal_uInt16 nDelta )
225{
226 if( !nDelta )
227 return;
228
229 if (!m_pStartEntry)
230 return;
231
232 SvTreeListEntry* pPrev = GoToPrevRow(m_pStartEntry, nDelta);
233
235 ShowCursor( false );
236
237 SetStartEntry(pPrev);
238
239 ShowCursor( true );
240}
241
242void IconViewImpl::KeyDown( bool bPageDown )
243{
244 if( !m_aVerSBar->IsVisible() )
245 return;
246
247 tools::Long nDelta;
248 if( bPageDown )
249 nDelta = m_aVerSBar->GetPageSize();
250 else
251 nDelta = 1;
252
253 if( nDelta <= 0 )
254 return;
255
257
258 if( bPageDown )
259 PageDown( static_cast<short>(nDelta) );
260 else
261 CursorDown();
262}
263
264void IconViewImpl::KeyUp( bool bPageUp )
265{
266 if( !m_aVerSBar->IsVisible() )
267 return;
268
269 tools::Long nDelta;
270 if( bPageUp )
271 nDelta = m_aVerSBar->GetPageSize();
272 else
273 nDelta = 1;
274
276
277 if( bPageUp )
278 PageUp( static_cast<short>(nDelta) );
279 else
280 CursorUp();
281}
282
284{
285 if(!m_pStartEntry )
286 return -1; // invisible position
287
288 return IconViewImpl::GetEntryPosition(pEntry).Y();
289}
290
292{
293 Point result{ -m_pView->GetEntryWidth(), -m_pView->GetEntryHeight() }; // invisible
294 auto FindEntryPos = [pEntry, &result](const EntryAreaInfo& info)
295 {
296 if (pEntry == info.entry)
297 {
298 result = info.area.TopLeft();
300 }
302 };
303 IterateVisibleEntryAreas(FindEntryPos, true);
304
305 return result;
306}
307
308// Returns the last entry (in respective row) if position is just past the last entry
310{
311 DBG_ASSERT( m_pView->GetModel(), "IconViewImpl::GetClickedEntry: how can this ever happen?" );
312 if ( !m_pView->GetModel() )
313 return nullptr;
315 return nullptr;
316
317 SvTreeListEntry* pEntry = nullptr;
318 auto FindEntryByPos = [&pEntry, &rPoint](const EntryAreaInfo& info)
319 {
320 if (info.area.Contains(rPoint))
321 {
322 pEntry = info.entry;
324 }
325 else if (info.area.Top() > rPoint.Y())
326 {
327 return CallbackResult::Stop; // we are already below the clicked row
328 }
329 else if (info.area.Bottom() > rPoint.Y())
330 {
331 pEntry = info.entry; // Same row; store the entry in case the click is past all entries
332 }
334 };
335 IterateVisibleEntryAreas(FindEntryByPos, true);
336
337 return pEntry;
338}
339
341{
342 // parent collapsed
343 if( !m_pView->IsEntryVisible(pEntry) )
344 return false;
345
346 tools::Long nY = GetEntryLine( pEntry );
347 if( nY < 0 )
348 return false;
349
350 tools::Long height = GetEntrySize(*pEntry).Height();
351 if (nY + height > m_aOutputSize.Height())
352 return false;
353
354 return true;
355}
356
358{
359 tools::Long nEntryHeight = m_pView->GetEntryHeight();
360 if( !nEntryHeight )
361 return;
362
363 sal_uInt16 nResult = 0;
364
365 Size aOSize( m_pView->Control::GetOutputSizePixel() );
366
367 const WinBits nWindowStyle = m_pView->GetStyle();
368 bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
369
370 // number of entries visible within the view
371 const tools::Long nVisibleRows = aOSize.Height() / nEntryHeight;
372 m_nVisibleCount = nVisibleRows * m_pView->GetColumnsCount();
373
374 tools::Long nTotalRows = 0;
375 tools::Long totalHeight = 0;
376 auto CountRowsAndHeight = [&nTotalRows, &totalHeight](const EntryAreaInfo& info)
377 {
378 totalHeight = std::max(totalHeight, info.area.Bottom());
379 if (info.column == 0 && !IsSeparator(info.entry))
380 ++nTotalRows;
382 };
383 IterateVisibleEntryAreas(CountRowsAndHeight);
384
385 // do we need a vertical scrollbar?
386 if( bVerSBar || totalHeight > aOSize.Height())
387 {
388 nResult = 1;
389 }
390
391 // do we need a Horizontal scrollbar?
392 bool bHorSBar = (nWindowStyle & WB_HSCROLL) != 0;
393 if (bHorSBar || m_pView->GetEntryWidth() > aOSize.Width())
394 {
395 nResult += 2;
398 }
399
400 PositionScrollBars( aOSize, nResult );
401
402 // adapt Range, VisibleRange etc.
403
404 // refresh output size, in case we have to scroll
405 tools::Rectangle aRect;
406 aRect.SetSize( aOSize );
407 m_aSelEng.SetVisibleArea( aRect );
408
409 // vertical scrollbar
410 if( !m_bInVScrollHdl )
411 {
412 m_aVerSBar->SetRange(Range(0, nTotalRows));
413 m_aVerSBar->SetPageSize(nVisibleRows);
414 m_aVerSBar->SetVisibleSize(nVisibleRows);
415 }
416 else
417 {
419 }
420
421 if( nResult & 0x0001 )
422 m_aVerSBar->Show();
423 else
424 m_aVerSBar->Hide();
425
426 if (nResult & 0x0002)
427 m_aHorSBar->Show();
428 else
429 m_aHorSBar->Hide();
430
431 rSize = aOSize;
432}
433
434// returns 0 if position is just past the last entry
435SvTreeListEntry* IconViewImpl::GetEntry( const Point& rPoint ) const
436{
437 if( (m_pView->GetEntryCount() == 0) || !m_pStartEntry ||
438 (rPoint.Y() > m_aOutputSize.Height())
440 || !m_pView->GetEntryWidth())
441 return nullptr;
442
443 SvTreeListEntry* pEntry = nullptr;
444 auto FindEntryByPos = [&pEntry, &rPoint](const EntryAreaInfo& info)
445 {
446 if (info.area.Contains(rPoint))
447 {
448 pEntry = info.entry;
450 }
451 else if (info.area.Top() > rPoint.Y())
452 {
453 return CallbackResult::Stop; // we are already below the clicked row
454 }
456 };
457 IterateVisibleEntryAreas(FindEntryByPos, true);
458
459 return pEntry;
460}
461
463{
465}
466
467void IconViewImpl::UpdateAll( bool bInvalidateCompleteView )
468{
470 SyncVerThumb();
471 FillView();
472 ShowVerSBar();
475 ShowCursor( true );
476 if( bInvalidateCompleteView )
478 else
480}
481
482void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
483{
484 if (!m_pView->GetVisibleCount())
485 return;
486
488
490 {
491 SvTreeListEntry* pFirst = m_pView->First();
492 if (pFirst != m_pStartEntry)
493 {
494 ShowCursor(false);
498 ShowCursor(true);
500 reinterpret_cast<void*>(1));
501 return;
502 }
503 }
504
505 if (!m_pStartEntry)
506 {
508 }
509
511 {
512 // do not select if multiselection or explicit set
514 SetCursor(m_pStartEntry, bNotSelect);
515 }
516
517 auto PaintEntry = [iconView = static_cast<IconView*>(m_pView.get()), &rRect,
518 &rRenderContext](const EntryAreaInfo& info)
519 {
520 if (!info.area.GetIntersection(rRect).IsEmpty())
521 {
522 iconView->PaintEntry(*info.entry, info.area.Left(), info.area.Top(), rRenderContext);
523 }
524 else if (info.area.Top() > rRect.Bottom())
525 {
526 return CallbackResult::Stop; // we are already below the last visible row
527 }
529 };
530 IterateVisibleEntryAreas(PaintEntry, true);
531
533 rRenderContext.SetClipRegion();
535}
536
538{
540 return;
541 if (nId < 0)
542 return;
543
544 // nId is a Y coordinate of the top of the element, coming from GetEntryLine
546 if (nId > aRect.Bottom())
547 return;
548 aRect.SetTop(nId); // Invalidate everything below
549 m_pView->Invalidate( aRect );
550}
551
553{
554 const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
555
556 if( rKeyCode.IsMod2() )
557 return false; // don't evaluate Alt key
558
560
561 if( !m_pCursor )
563 if( !m_pCursor )
564 return false;
565
566 sal_uInt16 aCode = rKeyCode.GetCode();
567
568 bool bShift = rKeyCode.IsShift();
569 bool bMod1 = rKeyCode.IsMod1();
570
571 SvTreeListEntry* pNewCursor;
572
573 bool bHandled = true;
574
575 switch( aCode )
576 {
577 case KEY_LEFT:
578 if( !IsEntryInView( m_pCursor ) )
580
581 pNewCursor = m_pCursor;
582 do
583 {
584 pNewCursor = m_pView->PrevVisible(pNewCursor);
585 } while( pNewCursor && !IsSelectable(pNewCursor) );
586
587 // if there is no next entry, take the current one
588 // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
589 // the cursor key
590 if (!pNewCursor)
591 pNewCursor = m_pCursor;
592
593 m_aSelEng.CursorPosChanging( bShift, bMod1 );
594 SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
595 if( !IsEntryInView( pNewCursor ) )
596 KeyUp( false );
597 break;
598
599 case KEY_RIGHT:
600 if( !IsEntryInView( m_pCursor ) )
602
603 pNewCursor = m_pCursor;
604 do
605 {
606 pNewCursor = m_pView->NextVisible(pNewCursor);
607 } while( pNewCursor && !IsSelectable(pNewCursor) );
608
609 // if there is no next entry, take the current one
610 // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
611 // the cursor key
612 if ( !pNewCursor && m_pCursor )
613 pNewCursor = m_pCursor;
614
615 if( pNewCursor )
616 {
617 m_aSelEng.CursorPosChanging( bShift, bMod1 );
618 if( IsEntryInView( pNewCursor ) )
619 SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
620 else
621 {
622 if( m_pCursor )
623 m_pView->Select( m_pCursor, false );
624 KeyDown( false );
625 SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
626 }
627 }
628 else
629 KeyDown( false ); // because scrollbar range might still
630 // allow scrolling
631 break;
632
633 case KEY_UP:
634 {
635 pNewCursor = GoToPrevRow(m_pCursor, 1);
636
637 if( pNewCursor )
638 {
639 m_aSelEng.CursorPosChanging( bShift, bMod1 );
640 SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
641 ScrollTo(pNewCursor);
642 }
643 break;
644 }
645
646 case KEY_DOWN:
647 {
648 pNewCursor = GoToNextRow(m_pCursor, 1);
649
650 if( pNewCursor )
651 {
652 m_aSelEng.CursorPosChanging( bShift, bMod1 );
653 ScrollTo(pNewCursor);
654 SetCursor(pNewCursor, bMod1); // no selection, when Ctrl is on
655 }
656 else
657 KeyDown( false ); // because scrollbar range might still
658 // allow scrolling
659 break;
660 }
661
662 case KEY_PAGEUP:
663 if (!bMod1)
664 {
665 const sal_uInt16 nDelta = m_aVerSBar->GetPageSize();
666 pNewCursor = GoToPrevRow(m_pCursor, nDelta);
667
668 if (pNewCursor)
669 {
670 m_aSelEng.CursorPosChanging(bShift, bMod1);
671 ScrollTo(pNewCursor);
672 SetCursor(pNewCursor);
673 }
674 }
675 else
676 bHandled = false;
677 break;
678
679 case KEY_PAGEDOWN:
680 if (!bMod1)
681 {
682 const sal_uInt16 nDelta = m_aVerSBar->GetPageSize();
683 pNewCursor = GoToNextRow(m_pCursor, nDelta);
684
685 if (pNewCursor)
686 {
687 m_aSelEng.CursorPosChanging(bShift, bMod1);
688 ScrollTo(pNewCursor);
689 SetCursor(pNewCursor);
690 }
691 else
692 KeyDown(false);
693 }
694 else
695 bHandled = false;
696 break;
697
698 case KEY_RETURN:
699 case KEY_SPACE:
700 {
701 bHandled = !m_pView->aDoubleClickHdl.Call(m_pView);
702 break;
703 }
704
705 case KEY_END:
706 {
707 pNewCursor = m_pView->GetModel()->Last();
708
709 while( pNewCursor && !IsSelectable(pNewCursor) )
710 {
711 pNewCursor = m_pView->PrevVisible(pNewCursor);
712 }
713
714 SetStartEntry(pNewCursor);
715
716 if( pNewCursor && pNewCursor != m_pCursor)
717 {
718// SelAllDestrAnch( false );
719 m_aSelEng.CursorPosChanging( bShift, bMod1 );
720 SetCursor( pNewCursor );
721 }
722
723 bHandled = true;
724
725 break;
726 }
727
728 default:
729 {
730 bHandled = false;
731 break;
732 }
733 }
734
735 if(!bHandled)
736 return SvImpLBox::KeyInput( rKEvt );
737
738 return true;
739}
740
741/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Post a user event to the default window.
Definition: svapp.cxx:1122
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
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
void CursorUp() override
tools::Long GetEntryRow(const SvTreeListEntry *entry) const
void KeyUp(bool bPageUp) override
SvTreeListEntry * GoToNextRow(SvTreeListEntry *pEntry, int n) const
void UpdateAll(bool bInvalidateCompleteView) override
SvTreeListEntry * GetClickedEntry(const Point &rPoint) const override
void CursorDown() override
void PageDown(sal_uInt16 nDelta) override
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:57
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
void SetThumbPos(tools::Long nThumbPos) override
Definition: scrbar.cxx:1362
void SetRange(const Range &rRange) override
Definition: scrbar.cxx:1338
void SetVisibleSize(tools::Long nNewSize) override
Definition: scrbar.cxx:1376
void SetPageSize(tools::Long nNewSize) override
Definition: scrbar.hxx:120
tools::Long GetPageSize() const override
Definition: scrbar.hxx:121
tools::Long GetVisibleSize() const override
Definition: scrbar.hxx:123
tools::Long GetRangeMax() const override
Definition: scrbar.hxx:113
tools::Long GetThumbPos() const override
Definition: scrbar.hxx:117
SelectionMode GetSelectionMode() const
Definition: seleng.hxx:137
void CursorPosChanging(bool bShift, bool bMod1)
Definition: seleng.cxx:67
void SetVisibleArea(const tools::Rectangle &rNewArea)
Definition: seleng.hxx:125
constexpr tools::Long Height() const
constexpr tools::Long Width() const
SvTreeListEntry * m_pStartEntry
Definition: svimpbox.hxx:191
bool m_bInVScrollHdl
Definition: svimpbox.hxx:199
bool m_bSimpleTravel
Definition: svimpbox.hxx:200
WinBits m_nStyle
Definition: svimpbox.hxx:195
SvTreeListEntry * m_pCursor
Definition: svimpbox.hxx:189
VclPtr< ScrollBar > m_aHorSBar
Definition: svimpbox.hxx:187
bool mbNoAutoCurEntry
Definition: svimpbox.hxx:196
SelectionEngine m_aSelEng
Definition: svimpbox.hxx:197
tools::Rectangle GetVisibleArea() const
Definition: svimpbox.cxx:2855
Size m_aOutputSize
Definition: svimpbox.hxx:193
void PositionScrollBars(Size &rOSize, sal_uInt16 nMask)
Definition: svimpbox.cxx:1075
ImplSVEvent * m_nCurUserEvent
Definition: svimpbox.hxx:192
void StopUserEvent()
Definition: svimpbox.cxx:3092
LBoxFlags m_nFlags
Definition: svimpbox.hxx:194
VclPtr< ScrollBar > m_aVerSBar
Definition: svimpbox.hxx:188
void FindMostRight()
Definition: svimpbox.cxx:3024
void ShowVerSBar()
Definition: svimpbox.cxx:1302
sal_uLong m_nVisibleCount
Definition: svimpbox.hxx:198
virtual bool KeyInput(const KeyEvent &)
Definition: svimpbox.cxx:2109
VclPtr< SvTreeListBox > m_pView
Definition: svimpbox.hxx:186
void FillView()
Definition: svimpbox.cxx:1257
void MakeVisible(SvTreeListEntry *pEntry, bool bMoveToTop=false)
Definition: svimpbox.cxx:912
void SetCursor(SvTreeListEntry *pEntry, bool bForceNoSelect=false)
Definition: svimpbox.cxx:578
void ShowCursor(bool bShow)
Definition: svimpbox.cxx:647
bool IsSelectable(const SvTreeListEntry *pEntry) const
Definition: svimpbox.cxx:3133
SvTreeListEntry * NextVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:235
SvTreeListEntry * FirstVisible() const
Definition: treelist.hxx:232
SvTreeListEntry * PrevVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:238
sal_uInt32 GetVisibleCount() const
Definition: treelist.hxx:229
bool IsEntryVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:273
void NotifyScrolled()
sal_uInt32 GetEntryCount() const
bool Select(SvTreeListEntry *pEntry, bool bSelect=true)
short GetEntryHeight() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE) override
SvTreeListEntry * First() const
short GetColumnsCount() const
Link< SvTreeListBox *, bool > aDoubleClickHdl
short GetEntryWidth() const
SvTreeList * GetModel() const
SvTLEntryFlags GetFlags() const
SvTreeListEntry * Last() const
Definition: treelist.cxx:555
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
constexpr void SetTop(tools::Long v)
tools::Rectangle GetIntersection(const tools::Rectangle &rRect) const
constexpr tools::Long Top() const
void SetSize(const Size &)
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
constexpr bool IsEmpty() const
bool IsMod1() const
Definition: keycod.hxx:56
sal_uInt16 GetCode() const
Definition: keycod.hxx:49
bool IsShift() const
Definition: keycod.hxx:54
bool IsMod2() const
Definition: keycod.hxx:58
bool HasFocus() const
Definition: window.cxx:2988
WinBits GetStyle() const
Definition: window2.cxx:984
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2191
void Hide()
Definition: window.hxx:885
bool IsVisible() const
Definition: window2.cxx:1133
#define DBG_ASSERT(sCon, aError)
float y
float x
#define max(a, b)
static bool IsSeparator(const SvTreeListEntry *entry)
constexpr sal_uInt16 KEY_RETURN
Definition: keycodes.hxx:119
constexpr sal_uInt16 KEY_LEFT
Definition: keycodes.hxx:112
constexpr sal_uInt16 KEY_PAGEDOWN
Definition: keycodes.hxx:117
constexpr sal_uInt16 KEY_UP
Definition: keycodes.hxx:111
constexpr sal_uInt16 KEY_RIGHT
Definition: keycodes.hxx:113
constexpr sal_uInt16 KEY_DOWN
Definition: keycodes.hxx:110
constexpr sal_uInt16 KEY_SPACE
Definition: keycodes.hxx:123
constexpr sal_uInt16 KEY_PAGEUP
Definition: keycodes.hxx:116
constexpr sal_uInt16 KEY_END
Definition: keycodes.hxx:115
int i
long Long
sal_Int16 nId
LBoxFlags
Definition: svimpbox.hxx:60
@ EndScrollSetVisSize
Any result
WinBits const WB_NOINITIALSELECTION
Definition: wintypes.hxx:227
sal_Int64 WinBits
Definition: wintypes.hxx:109
WinBits const WB_VSCROLL
Definition: wintypes.hxx:178
WinBits const WB_HSCROLL
Definition: wintypes.hxx:177