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