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>
21 #include <tools/debug.hxx>
22 #include <iconview.hxx>
23 #include "iconviewimpl.hxx"
24 
25 IconViewImpl::IconViewImpl( SvTreeListBox* pTreeListBox, SvTreeList* pTreeList, WinBits nWinStyle )
26 : SvImpLBox( pTreeListBox, pTreeList, nWinStyle )
27 {
28 }
29 
31 {
32  if (!m_pStartEntry)
33  return;
34 
35  SvTreeListEntry* pPrevFirstToDraw = m_pStartEntry;
36 
37  for(short i = 0; i < m_pView->GetColumnsCount() && pPrevFirstToDraw; i++)
38  pPrevFirstToDraw = m_pView->PrevVisible(pPrevFirstToDraw);
39 
40  if( !pPrevFirstToDraw )
41  return;
42 
44  long nEntryHeight = m_pView->GetEntryHeight();
45  ShowCursor( false );
47  m_pStartEntry = pPrevFirstToDraw;
49  aArea.AdjustBottom( -nEntryHeight );
50  m_pView->Scroll( 0, nEntryHeight, aArea, ScrollFlags::NoChildren );
52  ShowCursor( true );
54 }
55 
57 {
58  if (!m_pStartEntry)
59  return;
60 
61  SvTreeListEntry* pNextFirstToDraw = m_pStartEntry;
62 
63  for(short i = 0; i < m_pView->GetColumnsCount(); i++)
64  pNextFirstToDraw = m_pView->NextVisible(pNextFirstToDraw);
65 
66  if( pNextFirstToDraw )
67  {
69  ShowCursor( false );
71  m_pStartEntry = pNextFirstToDraw;
75  ShowCursor( true );
77  }
78 }
79 
80 void IconViewImpl::PageDown( sal_uInt16 nDelta )
81 {
82  sal_uInt16 nRealDelta = nDelta * m_pView->GetColumnsCount();
83 
84  if( !nDelta )
85  return;
86 
87  if (!m_pStartEntry)
88  return;
89 
90  SvTreeListEntry* pNext = m_pView->NextVisible(m_pStartEntry, nRealDelta);
91  if( pNext == m_pStartEntry )
92  return;
93 
94  ShowCursor( false );
95 
97  m_pStartEntry = pNext;
98 
99  if( nRealDelta >= m_nVisibleCount )
100  {
102  }
103  else
104  {
105  tools::Rectangle aArea( GetVisibleArea() );
106  long nScroll = m_pView->GetEntryHeight() * static_cast<long>(nRealDelta);
107  nScroll = -nScroll;
109  m_pView->Scroll( 0, nScroll, aArea, ScrollFlags::NoChildren );
112  }
113 
114  ShowCursor( true );
115 }
116 
117 void IconViewImpl::PageUp( sal_uInt16 nDelta )
118 {
119  sal_uInt16 nRealDelta = nDelta * m_pView->GetColumnsCount();
120  if( !nDelta )
121  return;
122 
123  if (!m_pStartEntry)
124  return;
125 
126  SvTreeListEntry* pPrev = m_pView->PrevVisible(m_pStartEntry, nRealDelta);
127  if( pPrev == m_pStartEntry )
128  return;
129 
131  ShowCursor( false );
132 
133  m_pStartEntry = pPrev;
134  if( nRealDelta >= m_nVisibleCount )
135  {
137  }
138  else
139  {
140  long nEntryHeight = m_pView->GetEntryHeight();
141  tools::Rectangle aArea( GetVisibleArea() );
143  m_pView->Scroll( 0, nEntryHeight*nRealDelta, aArea, ScrollFlags::NoChildren );
146  }
147 
148  ShowCursor( true );
149 }
150 
151 void IconViewImpl::KeyDown( bool bPageDown )
152 {
153  if( !m_aVerSBar->IsVisible() )
154  return;
155 
156  long nDelta;
157  if( bPageDown )
158  nDelta = m_aVerSBar->GetPageSize();
159  else
160  nDelta = 1;
161 
162  long nThumbPos = m_aVerSBar->GetThumbPos();
163 
164  if( nDelta <= 0 )
165  return;
166 
168  BeginScroll();
169 
170  m_aVerSBar->SetThumbPos( nThumbPos+nDelta );
171  if( bPageDown )
172  PageDown( static_cast<short>(nDelta) );
173  else
174  CursorDown();
175 
176  EndScroll();
177 }
178 
179 void IconViewImpl::KeyUp( bool bPageUp )
180 {
181  if( !m_aVerSBar->IsVisible() )
182  return;
183 
184  long nDelta;
185  if( bPageUp )
186  nDelta = m_aVerSBar->GetPageSize();
187  else
188  nDelta = 1;
189 
190  long nThumbPos = m_aVerSBar->GetThumbPos();
191 
192  if( nThumbPos < nDelta )
193  nDelta = nThumbPos;
194 
195  if( nDelta < 0 )
196  return;
197 
199  BeginScroll();
200 
201  m_aVerSBar->SetThumbPos( nThumbPos - nDelta );
202  if( bPageUp )
203  PageUp( static_cast<short>(nDelta) );
204  else
205  CursorUp();
206 
207  EndScroll();
208 }
209 
211 {
212  if(!m_pStartEntry )
213  return -1; // invisible position
214 
215  long nFirstVisPos = m_pView->GetVisiblePos( m_pStartEntry );
216  long nEntryVisPos = m_pView->GetVisiblePos( pEntry );
217  nFirstVisPos = nEntryVisPos - nFirstVisPos;
218 
219  return nFirstVisPos;
220 }
221 
223 {
224  const int pos = m_pView->GetAbsPos( pEntry );
225 
226  return Point( ( pos % m_pView->GetColumnsCount() ) * m_pView->GetEntryWidth(),
227  ( pos / m_pView->GetColumnsCount() ) * m_pView->GetEntryHeight() );
228 }
229 
230 SvTreeListEntry* IconViewImpl::GetClickedEntry( const Point& rPoint ) const
231 {
232  DBG_ASSERT( m_pView->GetModel(), "IconViewImpl::GetClickedEntry: how can this ever happen?" );
233  if ( !m_pView->GetModel() )
234  return nullptr;
236  return nullptr;
237 
238  sal_uInt16 nY = static_cast<sal_uInt16>(rPoint.Y() / m_pView->GetEntryHeight() );
239  sal_uInt16 nX = static_cast<sal_uInt16>(rPoint.X() / m_pView->GetEntryWidth() );
240  sal_uInt16 nTemp = nY * m_pView->GetColumnsCount() + nX;
241 
243 
244  return pEntry;
245 }
246 
248 {
249  // parent collapsed
250  if( !m_pView->IsEntryVisible(pEntry) )
251  return false;
252 
253  long nY = GetEntryLine( pEntry ) / m_pView->GetColumnsCount() * m_pView->GetEntryHeight();
254  if( nY < 0 )
255  return false;
256 
258  if( nY >= nMax )
259  return false;
260 
261  long nStart = GetEntryLine( pEntry ) - GetEntryLine( m_pStartEntry );
262  return nStart >= 0;
263 }
264 
266 {
267  long nEntryHeight = m_pView->GetEntryHeight();
268  if( !nEntryHeight )
269  return;
270 
271  sal_uInt16 nResult = 0;
272 
273  Size aOSize( m_pView->Control::GetOutputSizePixel() );
274 
275  const WinBits nWindowStyle = m_pView->GetStyle();
276  bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
277 
278  // number of entries that are not collapsed
279  sal_uLong nTotalCount = m_pView->GetVisibleCount();
280 
281  // number of entries visible within the view
282  m_nVisibleCount = aOSize.Height() / nEntryHeight * m_pView->GetColumnsCount();
283 
284  long nRows = ( nTotalCount / m_pView->GetColumnsCount() ) + 1;
285 
286  // do we need a vertical scrollbar?
287  if( bVerSBar || nTotalCount > m_nVisibleCount )
288  {
289  nResult = 1;
290  }
291 
292  PositionScrollBars( aOSize, nResult );
293 
294  // adapt Range, VisibleRange etc.
295 
296  // refresh output size, in case we have to scroll
297  tools::Rectangle aRect;
298  aRect.SetSize( aOSize );
299  m_aSelEng.SetVisibleArea( aRect );
300 
301  // vertical scrollbar
302  if( !m_bInVScrollHdl )
303  {
304  m_aVerSBar->SetPageSize( nTotalCount );
305  m_aVerSBar->SetVisibleSize( nTotalCount - nRows );
306  }
307  else
308  {
310  }
311 
312  if( nResult & 0x0001 )
313  m_aVerSBar->Show();
314  else
315  m_aVerSBar->Hide();
316 
317  rSize = aOSize;
318 }
319 
320 // returns 0 if position is just past the last entry
321 SvTreeListEntry* IconViewImpl::GetEntry( const Point& rPoint ) const
322 {
323  if( (m_pView->GetEntryCount() == 0) || !m_pStartEntry ||
324  (rPoint.Y() > m_aOutputSize.Height())
325  || !m_pView->GetEntryHeight()
326  || !m_pView->GetEntryWidth())
327  return nullptr;
328 
329  sal_uInt16 nClickedEntry = static_cast<sal_uInt16>(rPoint.Y() / m_pView->GetEntryHeight() * m_pView->GetColumnsCount() + rPoint.X() / m_pView->GetEntryWidth() );
330  sal_uInt16 nTemp = nClickedEntry;
332  if( nTemp != nClickedEntry )
333  pEntry = nullptr;
334  return pEntry;
335 }
336 
338 {
339  if( m_pStartEntry )
340  {
341  long nEntryPos = m_pView->GetVisiblePos( m_pStartEntry );
342  m_aVerSBar->SetThumbPos( nEntryPos );
343  }
344  else
345  m_aVerSBar->SetThumbPos( 0 );
346 }
347 
348 void IconViewImpl::UpdateAll( bool bInvalidateCompleteView )
349 {
350  FindMostRight();
352  SyncVerThumb();
353  FillView();
354  ShowVerSBar();
357  ShowCursor( true );
358  if( bInvalidateCompleteView )
359  m_pView->Invalidate();
360  else
362 }
363 
364 void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
365 {
366  if (!m_pView->GetVisibleCount())
367  return;
368 
370 
372  {
373  SvTreeListEntry* pFirst = m_pView->First();
374  if (pFirst != m_pStartEntry)
375  {
376  ShowCursor(false);
378  m_aVerSBar->SetThumbPos( 0 );
379  StopUserEvent();
380  ShowCursor(true);
382  reinterpret_cast<void*>(1));
383  return;
384  }
385  }
386 
387  if (!m_pStartEntry)
388  {
390  }
391 
392  long nRectHeight = rRect.GetHeight();
393  long nRectWidth = rRect.GetWidth();
394  long nEntryHeight = m_pView->GetEntryHeight();
395  long nEntryWidth = m_pView->GetEntryWidth();
396 
397  // calculate area for the entries we want to draw
398  sal_uInt16 nStartId = static_cast<sal_uInt16>(rRect.Top() / nEntryHeight * m_pView->GetColumnsCount() + (rRect.Left() / nEntryWidth));
399  sal_uInt16 nCount = static_cast<sal_uInt16>(( nRectHeight / nEntryHeight + 1 ) * nRectWidth / nEntryWidth);
400  nCount += 2; // don't miss an entry
401 
402  long nY = nStartId / m_pView->GetColumnsCount() * nEntryHeight;
403  long nX = 0;
404  SvTreeListEntry* pEntry = m_pStartEntry;
405  while (nStartId && pEntry)
406  {
407  pEntry = m_pView->NextVisible(pEntry);
408  nStartId--;
409  }
410 
411  if (!m_pCursor && !mbNoAutoCurEntry)
412  {
413  // do not select if multiselection or explicit set
414  bool bNotSelect = (m_aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
415  SetCursor(m_pStartEntry, bNotSelect);
416  }
417 
418  for(sal_uInt16 n = 0; n< nCount && pEntry; n++)
419  {
420  static_cast<IconView*>(m_pView.get())->PaintEntry(*pEntry, nX, nY, rRenderContext);
421  nX += nEntryWidth;
422 
423  if(nX + m_pView->GetEntryWidth() > nEntryWidth * m_pView->GetColumnsCount())
424  {
425  nY += nEntryHeight;
426  nX = 0;
427  }
428  pEntry = m_pView->NextVisible(pEntry);
429  }
430 
432  rRenderContext.SetClipRegion();
434 }
435 
436 void IconViewImpl::InvalidateEntry( long nId ) const
437 {
439  return;
440 
441  tools::Rectangle aRect( GetVisibleArea() );
442  long nMaxBottom = aRect.Bottom();
443  aRect.SetTop( nId / m_pView->GetColumnsCount() * m_pView->GetEntryHeight() );
444  aRect.SetBottom( aRect.Top() ); aRect.AdjustBottom(m_pView->GetEntryHeight() );
445 
446  if( aRect.Top() > nMaxBottom )
447  return;
448  if( aRect.Bottom() > nMaxBottom )
449  aRect.SetBottom( nMaxBottom );
450  m_pView->Invalidate( aRect );
451 }
452 
453 bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
454 {
455  const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
456 
457  if( rKeyCode.IsMod2() )
458  return false; // don't evaluate Alt key
459 
461 
462  if( !m_pCursor )
464  if( !m_pCursor )
465  return false;
466 
467  sal_uInt16 aCode = rKeyCode.GetCode();
468 
469  bool bShift = rKeyCode.IsShift();
470  bool bMod1 = rKeyCode.IsMod1();
471 
472  SvTreeListEntry* pNewCursor;
473 
474  bool bHandled = true;
475 
476  long i;
477  long nColumns = m_pView->GetColumnsCount();
478 
479  switch( aCode )
480  {
481  case KEY_LEFT:
482  if( !IsEntryInView( m_pCursor ) )
484 
485  pNewCursor = m_pCursor;
486  do
487  {
488  pNewCursor = m_pView->PrevVisible(pNewCursor);
489  } while( pNewCursor && !IsSelectable(pNewCursor) );
490 
491  // if there is no next entry, take the current one
492  // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
493  // the cursor key
494  if (!pNewCursor)
495  pNewCursor = m_pCursor;
496 
497  m_aSelEng.CursorPosChanging( bShift, bMod1 );
498  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
499  if( !IsEntryInView( pNewCursor ) )
500  KeyUp( false );
501  break;
502 
503  case KEY_RIGHT:
504  if( !IsEntryInView( m_pCursor ) )
506 
507  pNewCursor = m_pCursor;
508  do
509  {
510  pNewCursor = m_pView->NextVisible(pNewCursor);
511  } while( pNewCursor && !IsSelectable(pNewCursor) );
512 
513  // if there is no next entry, take the current one
514  // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
515  // the cursor key
516  if ( !pNewCursor && m_pCursor )
517  pNewCursor = m_pCursor;
518 
519  if( pNewCursor )
520  {
521  m_aSelEng.CursorPosChanging( bShift, bMod1 );
522  if( IsEntryInView( pNewCursor ) )
523  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
524  else
525  {
526  if( m_pCursor )
527  m_pView->Select( m_pCursor, false );
528  KeyDown( false );
529  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
530  }
531  }
532  else
533  KeyDown( false ); // because scrollbar range might still
534  // allow scrolling
535  break;
536 
537  case KEY_UP:
538  {
539  if( !IsEntryInView( m_pCursor ) )
541 
542  pNewCursor = m_pCursor;
543  for( i = 0; i < nColumns && pNewCursor; i++)
544  {
545  do
546  {
547  pNewCursor = m_pView->PrevVisible(pNewCursor);
548  } while( pNewCursor && !IsSelectable(pNewCursor) );
549  }
550 
551  // if there is no next entry, take the current one
552  // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
553  // the cursor key
554  if ( !pNewCursor && m_pCursor )
555  pNewCursor = m_pCursor;
556 
557  if( pNewCursor )
558  {
559  m_aSelEng.CursorPosChanging( bShift, bMod1 );
560  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
561  if( !IsEntryInView( pNewCursor ) )
562  KeyUp( false );
563  }
564  break;
565  }
566 
567  case KEY_DOWN:
568  {
569  if( !IsEntryInView( m_pCursor ) )
571 
572  pNewCursor = m_pCursor;
573  for( i = 0; i < nColumns && pNewCursor; i++)
574  {
575  do
576  {
577  pNewCursor = m_pView->NextVisible(pNewCursor);
578  } while( pNewCursor && !IsSelectable(pNewCursor) );
579  }
580 
581  // if there is no next entry, take the current one
582  // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
583  // the cursor key
584  if ( !pNewCursor && m_pCursor )
585  pNewCursor = m_pCursor;
586 
587  if( pNewCursor )
588  {
589  m_aSelEng.CursorPosChanging( bShift, bMod1 );
590  if( IsEntryInView( pNewCursor ) )
591  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
592  else
593  {
594  if( m_pCursor )
595  m_pView->Select( m_pCursor, false );
596  KeyDown( false );
597  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
598  }
599  }
600  else
601  KeyDown( false ); // because scrollbar range might still
602  // allow scrolling
603  break;
604  }
605 
606  case KEY_RETURN:
607  {
609  bHandled = true;
610 
611  break;
612  }
613 
614  case KEY_END:
615  {
616  pNewCursor = m_pView->GetModel()->Last();
617 
618  while( pNewCursor && !IsSelectable(pNewCursor) )
619  {
620  pNewCursor = m_pView->PrevVisible(pNewCursor);
621  }
622 
623  m_pStartEntry = pNewCursor;
624 
626  {
628  }
629 
630  if( pNewCursor && pNewCursor != m_pCursor)
631  {
632 // SelAllDestrAnch( false );
633  m_aSelEng.CursorPosChanging( bShift, bMod1 );
634  SetCursor( pNewCursor );
635  SyncVerThumb();
636  }
637 
638  bHandled = true;
639 
640  break;
641  }
642 
643  default:
644  {
645  bHandled = false;
646  break;
647  }
648  }
649 
650  if(!bHandled)
651  return SvImpLBox::KeyInput( rKEvt );
652 
653  return true;
654 }
655 
656 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long GetWidth() const
SvTreeListEntry * NextVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:239
IconViewImpl(SvTreeListBox *pTreeListBox, SvTreeList *pTreeList, WinBits nWinStyle)
void KeyDown(bool bPageDown) override
void UpdateAll(bool bInvalidateCompleteView) override
long GetHeight() const
void SyncVerThumb() override
bool IsEntryVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:279
long Height() const
SvTreeList * GetModel() const
SvTreeListEntry * PrevVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:242
Size m_aOutputSize
Definition: svimpbox.hxx:204
sal_uIntPtr sal_uLong
void EndScroll()
Definition: svimpbox.cxx:3005
sal_uLong GetEntryCount() const
SvTreeListEntry * GetEntry(const Point &rPoint) const override
sal_Int64 n
void MakeVisible(SvTreeListEntry *pEntry, bool bMoveToTop=false)
Definition: svimpbox.cxx:933
void PositionScrollBars(Size &rOSize, sal_uInt16 nMask)
Definition: svimpbox.cxx:1119
VclPtr< SvTreeListBox > m_pView
Definition: svimpbox.hxx:199
long GetThumbPos() const
Definition: scrbar.hxx:122
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:1007
sal_uInt16 GetCode() const
Definition: keycod.hxx:53
WinBits const WB_VSCROLL
void StopUserEvent()
Definition: svimpbox.cxx:3260
sal_uLong m_nVisibleCount
Definition: svimpbox.hxx:209
short GetColumnsCount() const
LBoxFlags
Definition: svimpbox.hxx:66
void PaintImmediately()
Definition: paint.cxx:1284
void CursorPosChanging(bool bShift, bool bMod1)
Definition: seleng.cxx:67
constexpr sal_uInt16 KEY_UP
Definition: keycodes.hxx:111
long AdjustBottom(long nVertMoveDelta)
constexpr sal_uInt16 KEY_END
Definition: keycodes.hxx:115
bool mbNoAutoCurEntry
Definition: svimpbox.hxx:207
sal_uLong GetAbsPos(SvTreeListEntry const *pEntry) const
Definition: treelist.hxx:270
sal_Int64 WinBits
void PageUp(sal_uInt16 nDelta) override
size_t pos
long GetEntryLine(const SvTreeListEntry *pEntry) const override
int nCount
void Hide()
Definition: window.hxx:936
Link< SvTreeListBox *, bool > aDoubleClickHdl
long Top() const
virtual bool KeyInput(const KeyEvent &)
Definition: svimpbox.cxx:2124
bool m_bSimpleTravel
Definition: svimpbox.hxx:211
ImplSVEvent * m_nCurUserEvent
Definition: svimpbox.hxx:203
virtual void NotifyScrolled()
short GetEntryHeight() const
void CursorUp() override
constexpr sal_uInt16 KEY_DOWN
Definition: keycodes.hxx:110
short GetEntryWidth() const
void PageDown(sal_uInt16 nDelta) override
void SetTop(long v)
#define DBG_ASSERT(sCon, aError)
int i
void CursorDown() override
void KeyUp(bool bPageUp) override
void SetVisibleSize(long nNewSize)
Definition: scrbar.cxx:1377
void AdjustScrollBars(Size &rSize) override
void SetSize(const Size &rSize)
void SetRange(const Range &rRange)
Definition: scrbar.cxx:1338
WinBits m_nStyle
Definition: svimpbox.hxx:206
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
void InvalidateEntry(long nId) const override
long Bottom() const
void ShowVerSBar()
Definition: svimpbox.cxx:1346
void SetPageSize(long nNewSize)
Definition: scrbar.hxx:125
tools::Rectangle GetVisibleArea() const
Definition: svimpbox.cxx:3015
SvTreeListEntry * Last() const
Definition: treelist.cxx:554
long GetPageSize() const
Definition: scrbar.hxx:126
LBoxFlags m_nFlags
Definition: svimpbox.hxx:205
void SetCursor(SvTreeListEntry *pEntry, bool bForceNoSelect=false)
Definition: svimpbox.cxx:590
constexpr sal_uInt16 KEY_RETURN
Definition: keycodes.hxx:119
bool IsEntryInView(SvTreeListEntry *pEntry) const override
constexpr sal_uInt16 KEY_RIGHT
Definition: keycodes.hxx:113
void ShowCursor(bool bShow)
Definition: svimpbox.cxx:659
void SetVisibleArea(const tools::Rectangle &rNewArea)
Definition: seleng.hxx:114
SvTreeListEntry * m_pCursor
Definition: svimpbox.hxx:201
SvTreeListEntry * First() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE) override
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:54
virtual void Scroll(long nHorzScroll, long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
Definition: window.cxx:2998
sal_uLong GetVisibleCount() const
Definition: treelist.hxx:233
bool IsShift() const
Definition: keycod.hxx:58
void FindMostRight()
Definition: svimpbox.cxx:3192
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
SelectionEngine m_aSelEng
Definition: svimpbox.hxx:208
WinBits const WB_NOINITIALSELECTION
bool IsVisible() const
Definition: window2.cxx:1102
SvTreeListEntry * GetClickedEntry(const Point &rPoint) const override
bool IsMod1() const
Definition: keycod.hxx:60
bool IsSelectable(const SvTreeListEntry *pEntry)
Definition: svimpbox.cxx:3321
void SetBottom(long v)
long Left() const
SvTreeListEntry * m_pStartEntry
Definition: svimpbox.hxx:202
void FillView()
Definition: svimpbox.cxx:1301
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
WinBits GetStyle() const
Definition: window2.cxx:953
constexpr sal_uInt16 KEY_LEFT
Definition: keycodes.hxx:112
virtual bool Select(SvTreeListEntry *pEntry, bool bSelect=true)
sal_uLong GetVisiblePos(SvTreeListEntry const *pEntry) const
Definition: treelist.hxx:273
void BeginScroll()
Definition: svimpbox.cxx:2997
VclPtr< ScrollBar > m_aVerSBar
Definition: svimpbox.hxx:200
Point GetEntryPosition(const SvTreeListEntry *pEntry) const override
bool HasFocus() const
Definition: window.cxx:3039
bool m_bInVScrollHdl
Definition: svimpbox.hxx:210
SelectionMode GetSelectionMode() const
Definition: seleng.hxx:126
void SetThumbPos(long nThumbPos)
Definition: scrbar.cxx:1363
bool KeyInput(const KeyEvent &) override
bool IsMod2() const
Definition: keycod.hxx:62
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2204