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
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
468{
470 SyncVerThumb();
471 FillView();
472 ShowVerSBar();
475 ShowCursor( true );
477}
478
479void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
480{
481 if (!m_pView->GetVisibleCount())
482 return;
483
485
487 {
488 SvTreeListEntry* pFirst = m_pView->First();
489 if (pFirst != m_pStartEntry)
490 {
491 ShowCursor(false);
495 ShowCursor(true);
497 reinterpret_cast<void*>(1));
498 return;
499 }
500 }
501
502 if (!m_pStartEntry)
503 {
505 }
506
508 {
509 // do not select if multiselection or explicit set
511 SetCursor(m_pStartEntry, bNotSelect);
512 }
513
514 auto PaintEntry = [iconView = static_cast<IconView*>(m_pView.get()), &rRect,
515 &rRenderContext](const EntryAreaInfo& info)
516 {
517 if (!info.area.GetIntersection(rRect).IsEmpty())
518 {
519 iconView->PaintEntry(*info.entry, info.area.Left(), info.area.Top(), rRenderContext);
520 }
521 else if (info.area.Top() > rRect.Bottom())
522 {
523 return CallbackResult::Stop; // we are already below the last visible row
524 }
526 };
527 IterateVisibleEntryAreas(PaintEntry, true);
528
530 rRenderContext.SetClipRegion();
532}
533
535{
537 return;
538 if (nId < 0)
539 return;
540
541 // nId is a Y coordinate of the top of the element, coming from GetEntryLine
543 if (nId > aRect.Bottom())
544 return;
545 aRect.SetTop(nId); // Invalidate everything below
546 m_pView->Invalidate( aRect );
547}
548
550{
551 const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
552
553 if( rKeyCode.IsMod2() )
554 return false; // don't evaluate Alt key
555
557
558 if( !m_pCursor )
560 if( !m_pCursor )
561 return false;
562
563 sal_uInt16 aCode = rKeyCode.GetCode();
564
565 bool bShift = rKeyCode.IsShift();
566 bool bMod1 = rKeyCode.IsMod1();
567
568 SvTreeListEntry* pNewCursor;
569
570 bool bHandled = true;
571
572 switch( aCode )
573 {
574 case KEY_LEFT:
575 if( !IsEntryInView( m_pCursor ) )
577
578 pNewCursor = m_pCursor;
579 do
580 {
581 pNewCursor = m_pView->PrevVisible(pNewCursor);
582 } while( pNewCursor && !IsSelectable(pNewCursor) );
583
584 // if there is no next entry, take the current one
585 // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
586 // the cursor key
587 if (!pNewCursor)
588 pNewCursor = m_pCursor;
589
590 m_aSelEng.CursorPosChanging( bShift, bMod1 );
591 SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
592 if( !IsEntryInView( pNewCursor ) )
593 KeyUp( false );
594 break;
595
596 case KEY_RIGHT:
597 if( !IsEntryInView( m_pCursor ) )
599
600 pNewCursor = m_pCursor;
601 do
602 {
603 pNewCursor = m_pView->NextVisible(pNewCursor);
604 } while( pNewCursor && !IsSelectable(pNewCursor) );
605
606 // if there is no next entry, take the current one
607 // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
608 // the cursor key
609 if ( !pNewCursor && m_pCursor )
610 pNewCursor = m_pCursor;
611
612 if( pNewCursor )
613 {
614 m_aSelEng.CursorPosChanging( bShift, bMod1 );
615 if( IsEntryInView( pNewCursor ) )
616 SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
617 else
618 {
619 if( m_pCursor )
620 m_pView->Select( m_pCursor, false );
621 KeyDown( false );
622 SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
623 }
624 }
625 else
626 KeyDown( false ); // because scrollbar range might still
627 // allow scrolling
628 break;
629
630 case KEY_UP:
631 {
632 pNewCursor = GoToPrevRow(m_pCursor, 1);
633
634 if( pNewCursor )
635 {
636 m_aSelEng.CursorPosChanging( bShift, bMod1 );
637 SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
638 ScrollTo(pNewCursor);
639 }
640 break;
641 }
642
643 case KEY_DOWN:
644 {
645 pNewCursor = GoToNextRow(m_pCursor, 1);
646
647 if( pNewCursor )
648 {
649 m_aSelEng.CursorPosChanging( bShift, bMod1 );
650 ScrollTo(pNewCursor);
651 SetCursor(pNewCursor, bMod1); // no selection, when Ctrl is on
652 }
653 else
654 KeyDown( false ); // because scrollbar range might still
655 // allow scrolling
656 break;
657 }
658
659 case KEY_PAGEUP:
660 if (!bMod1)
661 {
662 const sal_uInt16 nDelta = m_aVerSBar->GetPageSize();
663 pNewCursor = GoToPrevRow(m_pCursor, nDelta);
664
665 if (pNewCursor)
666 {
667 m_aSelEng.CursorPosChanging(bShift, bMod1);
668 ScrollTo(pNewCursor);
669 SetCursor(pNewCursor);
670 }
671 }
672 else
673 bHandled = false;
674 break;
675
676 case KEY_PAGEDOWN:
677 if (!bMod1)
678 {
679 const sal_uInt16 nDelta = m_aVerSBar->GetPageSize();
680 pNewCursor = GoToNextRow(m_pCursor, nDelta);
681
682 if (pNewCursor)
683 {
684 m_aSelEng.CursorPosChanging(bShift, bMod1);
685 ScrollTo(pNewCursor);
686 SetCursor(pNewCursor);
687 }
688 else
689 KeyDown(false);
690 }
691 else
692 bHandled = false;
693 break;
694
695 case KEY_RETURN:
696 case KEY_SPACE:
697 {
698 bHandled = !m_pView->aDoubleClickHdl.Call(m_pView);
699 break;
700 }
701
702 case KEY_END:
703 {
704 pNewCursor = m_pView->GetModel()->Last();
705
706 while( pNewCursor && !IsSelectable(pNewCursor) )
707 {
708 pNewCursor = m_pView->PrevVisible(pNewCursor);
709 }
710
711 SetStartEntry(pNewCursor);
712
713 if( pNewCursor && pNewCursor != m_pCursor)
714 {
715// SelAllDestrAnch( false );
716 m_aSelEng.CursorPosChanging( bShift, bMod1 );
717 SetCursor( pNewCursor );
718 }
719
720 bHandled = true;
721
722 break;
723 }
724
725 default:
726 {
727 bHandled = false;
728 break;
729 }
730 }
731
732 if(!bHandled)
733 return SvImpLBox::KeyInput( rKEvt );
734
735 return true;
736}
737
738/* 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:999
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
void CursorUp() 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
Definition: event.hxx:57
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
constexpr tools::Long Y() const
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:2850
Size m_aOutputSize
Definition: svimpbox.hxx:193
void PositionScrollBars(Size &rOSize, sal_uInt16 nMask)
Definition: svimpbox.cxx:1067
ImplSVEvent * m_nCurUserEvent
Definition: svimpbox.hxx:192
void StopUserEvent()
Definition: svimpbox.cxx:3087
LBoxFlags m_nFlags
Definition: svimpbox.hxx:194
VclPtr< ScrollBar > m_aVerSBar
Definition: svimpbox.hxx:188
void FindMostRight()
Definition: svimpbox.cxx:3019
void ShowVerSBar()
Definition: svimpbox.cxx:1294
sal_uLong m_nVisibleCount
Definition: svimpbox.hxx:198
virtual bool KeyInput(const KeyEvent &)
Definition: svimpbox.cxx:2101
VclPtr< SvTreeListBox > m_pView
Definition: svimpbox.hxx:186
void FillView()
Definition: svimpbox.cxx:1249
void MakeVisible(SvTreeListEntry *pEntry, bool bMoveToTop=false)
Definition: svimpbox.cxx:909
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:3128
SvTreeListEntry * NextVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:234
SvTreeListEntry * FirstVisible() const
Definition: treelist.hxx:231
SvTreeListEntry * PrevVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:237
sal_uInt32 GetVisibleCount() const
Definition: treelist.hxx:228
bool IsEntryVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:272
void NotifyScrolled()
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
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:2981
WinBits GetStyle() const
Definition: window2.cxx:979
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2187
void Hide()
Definition: window.hxx:879
bool IsVisible() const
Definition: window2.cxx:1128
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Definition: paint.cxx:1143
#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