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  tools::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  tools::Long nScroll = m_pView->GetEntryHeight() * static_cast<tools::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  tools::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  tools::Long nDelta;
157  if( bPageDown )
158  nDelta = m_aVerSBar->GetPageSize();
159  else
160  nDelta = 1;
161 
162  tools::Long nThumbPos = m_aVerSBar->GetThumbPos();
163 
164  if( nDelta <= 0 )
165  return;
166 
168 
169  m_aVerSBar->SetThumbPos( nThumbPos+nDelta );
170  if( bPageDown )
171  PageDown( static_cast<short>(nDelta) );
172  else
173  CursorDown();
174 }
175 
176 void IconViewImpl::KeyUp( bool bPageUp )
177 {
178  if( !m_aVerSBar->IsVisible() )
179  return;
180 
181  tools::Long nDelta;
182  if( bPageUp )
183  nDelta = m_aVerSBar->GetPageSize();
184  else
185  nDelta = 1;
186 
187  tools::Long nThumbPos = m_aVerSBar->GetThumbPos();
188 
189  if( nThumbPos < nDelta )
190  nDelta = nThumbPos;
191 
192  if( nDelta < 0 )
193  return;
194 
196 
197  m_aVerSBar->SetThumbPos( nThumbPos - nDelta );
198  if( bPageUp )
199  PageUp( static_cast<short>(nDelta) );
200  else
201  CursorUp();
202 }
203 
205 {
206  if(!m_pStartEntry )
207  return -1; // invisible position
208 
209  tools::Long nFirstVisPos = m_pView->GetVisiblePos( m_pStartEntry );
210  tools::Long nEntryVisPos = m_pView->GetVisiblePos( pEntry );
211  nFirstVisPos = nEntryVisPos - nFirstVisPos;
212 
213  return nFirstVisPos;
214 }
215 
217 {
218  const int pos = m_pView->GetAbsPos( pEntry );
219 
220  return Point( ( pos % m_pView->GetColumnsCount() ) * m_pView->GetEntryWidth(),
221  ( pos / m_pView->GetColumnsCount() ) * m_pView->GetEntryHeight() );
222 }
223 
224 SvTreeListEntry* IconViewImpl::GetClickedEntry( const Point& rPoint ) const
225 {
226  DBG_ASSERT( m_pView->GetModel(), "IconViewImpl::GetClickedEntry: how can this ever happen?" );
227  if ( !m_pView->GetModel() )
228  return nullptr;
230  return nullptr;
231 
232  sal_uInt16 nY = static_cast<sal_uInt16>(rPoint.Y() / m_pView->GetEntryHeight() );
233  sal_uInt16 nX = static_cast<sal_uInt16>(rPoint.X() / m_pView->GetEntryWidth() );
234  sal_uInt16 nTemp = nY * m_pView->GetColumnsCount() + nX;
235 
237 
238  return pEntry;
239 }
240 
242 {
243  // parent collapsed
244  if( !m_pView->IsEntryVisible(pEntry) )
245  return false;
246 
248  if( nY < 0 )
249  return false;
250 
252  if( nY >= nMax )
253  return false;
254 
255  tools::Long nStart = GetEntryLine( pEntry ) - GetEntryLine( m_pStartEntry );
256  return nStart >= 0;
257 }
258 
260 {
261  tools::Long nEntryHeight = m_pView->GetEntryHeight();
262  if( !nEntryHeight )
263  return;
264 
265  sal_uInt16 nResult = 0;
266 
267  Size aOSize( m_pView->Control::GetOutputSizePixel() );
268 
269  const WinBits nWindowStyle = m_pView->GetStyle();
270  bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
271 
272  // number of entries that are not collapsed
273  sal_uLong nTotalCount = m_pView->GetVisibleCount();
274 
275  // number of entries visible within the view
276  m_nVisibleCount = aOSize.Height() / nEntryHeight * m_pView->GetColumnsCount();
277 
278  tools::Long nRows = ( nTotalCount / m_pView->GetColumnsCount() ) + 1;
279 
280  // do we need a vertical scrollbar?
281  if( bVerSBar || nTotalCount > m_nVisibleCount )
282  {
283  nResult = 1;
284  }
285 
286  PositionScrollBars( aOSize, nResult );
287 
288  // adapt Range, VisibleRange etc.
289 
290  // refresh output size, in case we have to scroll
291  tools::Rectangle aRect;
292  aRect.SetSize( aOSize );
293  m_aSelEng.SetVisibleArea( aRect );
294 
295  // vertical scrollbar
296  if( !m_bInVScrollHdl )
297  {
298  m_aVerSBar->SetPageSize( nTotalCount );
299  m_aVerSBar->SetVisibleSize( nTotalCount - nRows );
300  }
301  else
302  {
304  }
305 
306  if( nResult & 0x0001 )
307  m_aVerSBar->Show();
308  else
309  m_aVerSBar->Hide();
310 
311  rSize = aOSize;
312 }
313 
314 // returns 0 if position is just past the last entry
315 SvTreeListEntry* IconViewImpl::GetEntry( const Point& rPoint ) const
316 {
317  if( (m_pView->GetEntryCount() == 0) || !m_pStartEntry ||
318  (rPoint.Y() > m_aOutputSize.Height())
319  || !m_pView->GetEntryHeight()
320  || !m_pView->GetEntryWidth())
321  return nullptr;
322 
323  sal_uInt16 nClickedEntry = static_cast<sal_uInt16>(rPoint.Y() / m_pView->GetEntryHeight() * m_pView->GetColumnsCount() + rPoint.X() / m_pView->GetEntryWidth() );
324  sal_uInt16 nTemp = nClickedEntry;
326  if( nTemp != nClickedEntry )
327  pEntry = nullptr;
328  return pEntry;
329 }
330 
332 {
333  if( m_pStartEntry )
334  {
336  m_aVerSBar->SetThumbPos( nEntryPos );
337  }
338  else
339  m_aVerSBar->SetThumbPos( 0 );
340 }
341 
342 void IconViewImpl::UpdateAll( bool bInvalidateCompleteView )
343 {
344  FindMostRight();
346  SyncVerThumb();
347  FillView();
348  ShowVerSBar();
351  ShowCursor( true );
352  if( bInvalidateCompleteView )
353  m_pView->Invalidate();
354  else
356 }
357 
358 void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
359 {
360  if (!m_pView->GetVisibleCount())
361  return;
362 
364 
366  {
367  SvTreeListEntry* pFirst = m_pView->First();
368  if (pFirst != m_pStartEntry)
369  {
370  ShowCursor(false);
372  m_aVerSBar->SetThumbPos( 0 );
373  StopUserEvent();
374  ShowCursor(true);
376  reinterpret_cast<void*>(1));
377  return;
378  }
379  }
380 
381  if (!m_pStartEntry)
382  {
384  }
385 
386  tools::Long nRectHeight = rRect.GetHeight();
387  tools::Long nRectWidth = rRect.GetWidth();
388  tools::Long nEntryHeight = m_pView->GetEntryHeight();
389  tools::Long nEntryWidth = m_pView->GetEntryWidth();
390 
391  // calculate area for the entries we want to draw
392  sal_uInt16 nStartId = static_cast<sal_uInt16>(rRect.Top() / nEntryHeight * m_pView->GetColumnsCount() + (rRect.Left() / nEntryWidth));
393  sal_uInt16 nCount = static_cast<sal_uInt16>(( nRectHeight / nEntryHeight + 1 ) * nRectWidth / nEntryWidth);
394  nCount += 2; // don't miss an entry
395 
396  tools::Long nY = nStartId / m_pView->GetColumnsCount() * nEntryHeight;
397  tools::Long nX = 0;
398  SvTreeListEntry* pEntry = m_pStartEntry;
399  while (nStartId && pEntry)
400  {
401  pEntry = m_pView->NextVisible(pEntry);
402  nStartId--;
403  }
404 
405  if (!m_pCursor && !mbNoAutoCurEntry)
406  {
407  // do not select if multiselection or explicit set
408  bool bNotSelect = (m_aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
409  SetCursor(m_pStartEntry, bNotSelect);
410  }
411 
412  for(sal_uInt16 n = 0; n< nCount && pEntry; n++)
413  {
414  static_cast<IconView*>(m_pView.get())->PaintEntry(*pEntry, nX, nY, rRenderContext);
415  nX += nEntryWidth;
416 
417  if(nX + m_pView->GetEntryWidth() > nEntryWidth * m_pView->GetColumnsCount())
418  {
419  nY += nEntryHeight;
420  nX = 0;
421  }
422  pEntry = m_pView->NextVisible(pEntry);
423  }
424 
426  rRenderContext.SetClipRegion();
428 }
429 
431 {
433  return;
434 
435  tools::Rectangle aRect( GetVisibleArea() );
436  tools::Long nMaxBottom = aRect.Bottom();
437  aRect.SetTop( nId / m_pView->GetColumnsCount() * m_pView->GetEntryHeight() );
438  aRect.SetBottom( aRect.Top() ); aRect.AdjustBottom(m_pView->GetEntryHeight() );
439 
440  if( aRect.Top() > nMaxBottom )
441  return;
442  if( aRect.Bottom() > nMaxBottom )
443  aRect.SetBottom( nMaxBottom );
444  m_pView->Invalidate( aRect );
445 }
446 
447 bool IconViewImpl::KeyInput( const KeyEvent& rKEvt )
448 {
449  const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
450 
451  if( rKeyCode.IsMod2() )
452  return false; // don't evaluate Alt key
453 
455 
456  if( !m_pCursor )
458  if( !m_pCursor )
459  return false;
460 
461  sal_uInt16 aCode = rKeyCode.GetCode();
462 
463  bool bShift = rKeyCode.IsShift();
464  bool bMod1 = rKeyCode.IsMod1();
465 
466  SvTreeListEntry* pNewCursor;
467 
468  bool bHandled = true;
469 
470  tools::Long i;
471  tools::Long nColumns = m_pView->GetColumnsCount();
472 
473  switch( aCode )
474  {
475  case KEY_LEFT:
476  if( !IsEntryInView( m_pCursor ) )
478 
479  pNewCursor = m_pCursor;
480  do
481  {
482  pNewCursor = m_pView->PrevVisible(pNewCursor);
483  } while( pNewCursor && !IsSelectable(pNewCursor) );
484 
485  // if there is no next entry, take the current one
486  // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
487  // the cursor key
488  if (!pNewCursor)
489  pNewCursor = m_pCursor;
490 
491  m_aSelEng.CursorPosChanging( bShift, bMod1 );
492  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
493  if( !IsEntryInView( pNewCursor ) )
494  KeyUp( false );
495  break;
496 
497  case KEY_RIGHT:
498  if( !IsEntryInView( m_pCursor ) )
500 
501  pNewCursor = m_pCursor;
502  do
503  {
504  pNewCursor = m_pView->NextVisible(pNewCursor);
505  } while( pNewCursor && !IsSelectable(pNewCursor) );
506 
507  // if there is no next entry, take the current one
508  // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
509  // the cursor key
510  if ( !pNewCursor && m_pCursor )
511  pNewCursor = m_pCursor;
512 
513  if( pNewCursor )
514  {
515  m_aSelEng.CursorPosChanging( bShift, bMod1 );
516  if( IsEntryInView( pNewCursor ) )
517  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
518  else
519  {
520  if( m_pCursor )
521  m_pView->Select( m_pCursor, false );
522  KeyDown( false );
523  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
524  }
525  }
526  else
527  KeyDown( false ); // because scrollbar range might still
528  // allow scrolling
529  break;
530 
531  case KEY_UP:
532  {
533  if( !IsEntryInView( m_pCursor ) )
535 
536  pNewCursor = m_pCursor;
537  for( i = 0; i < nColumns && pNewCursor; i++)
538  {
539  do
540  {
541  pNewCursor = m_pView->PrevVisible(pNewCursor);
542  } while( pNewCursor && !IsSelectable(pNewCursor) );
543  }
544 
545  // if there is no next entry, take the current one
546  // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
547  // the cursor key
548  if ( !pNewCursor && m_pCursor )
549  pNewCursor = m_pCursor;
550 
551  if( pNewCursor )
552  {
553  m_aSelEng.CursorPosChanging( bShift, bMod1 );
554  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
555  if( !IsEntryInView( pNewCursor ) )
556  KeyUp( false );
557  }
558  break;
559  }
560 
561  case KEY_DOWN:
562  {
563  if( !IsEntryInView( m_pCursor ) )
565 
566  pNewCursor = m_pCursor;
567  for( i = 0; i < nColumns && pNewCursor; i++)
568  {
569  do
570  {
571  pNewCursor = m_pView->NextVisible(pNewCursor);
572  } while( pNewCursor && !IsSelectable(pNewCursor) );
573  }
574 
575  // if there is no next entry, take the current one
576  // this ensures that in case of _one_ entry in the list, this entry is selected when pressing
577  // the cursor key
578  if ( !pNewCursor && m_pCursor )
579  pNewCursor = m_pCursor;
580 
581  if( pNewCursor )
582  {
583  m_aSelEng.CursorPosChanging( bShift, bMod1 );
584  if( IsEntryInView( pNewCursor ) )
585  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
586  else
587  {
588  if( m_pCursor )
589  m_pView->Select( m_pCursor, false );
590  KeyDown( false );
591  SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
592  }
593  }
594  else
595  KeyDown( false ); // because scrollbar range might still
596  // allow scrolling
597  break;
598  }
599 
600  case KEY_RETURN:
601  {
602  bHandled = !m_pView->aDoubleClickHdl.Call(m_pView);
603  break;
604  }
605 
606  case KEY_END:
607  {
608  pNewCursor = m_pView->GetModel()->Last();
609 
610  while( pNewCursor && !IsSelectable(pNewCursor) )
611  {
612  pNewCursor = m_pView->PrevVisible(pNewCursor);
613  }
614 
615  m_pStartEntry = pNewCursor;
616 
618  {
620  }
621 
622  if( pNewCursor && pNewCursor != m_pCursor)
623  {
624 // SelAllDestrAnch( false );
625  m_aSelEng.CursorPosChanging( bShift, bMod1 );
626  SetCursor( pNewCursor );
627  SyncVerThumb();
628  }
629 
630  bHandled = true;
631 
632  break;
633  }
634 
635  default:
636  {
637  bHandled = false;
638  break;
639  }
640  }
641 
642  if(!bHandled)
643  return SvImpLBox::KeyInput( rKEvt );
644 
645  return true;
646 }
647 
648 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvTreeListEntry * NextVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:236
IconViewImpl(SvTreeListBox *pTreeListBox, SvTreeList *pTreeList, WinBits nWinStyle)
void KeyDown(bool bPageDown) override
void UpdateAll(bool bInvalidateCompleteView) override
void SyncVerThumb() override
bool IsEntryVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:274
SvTreeList * GetModel() const
SvTreeListEntry * PrevVisible(SvTreeListEntry *pEntry) const
Definition: treelist.hxx:239
Size m_aOutputSize
Definition: svimpbox.hxx:193
tools::Long GetEntryLine(const SvTreeListEntry *pEntry) const override
sal_uIntPtr sal_uLong
long Long
sal_uLong GetEntryCount() const
SvTreeListEntry * GetEntry(const Point &rPoint) const override
sal_Int64 n
void MakeVisible(SvTreeListEntry *pEntry, bool bMoveToTop=false)
Definition: svimpbox.cxx:904
void PositionScrollBars(Size &rOSize, sal_uInt16 nMask)
Definition: svimpbox.cxx:1062
VclPtr< SvTreeListBox > m_pView
Definition: svimpbox.hxx:188
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
sal_uInt16 GetCode() const
Definition: keycod.hxx:51
tools::Long GetWidth() const
WinBits const WB_VSCROLL
void StopUserEvent()
Definition: svimpbox.cxx:3068
sal_uLong m_nVisibleCount
Definition: svimpbox.hxx:198
short GetColumnsCount() const
LBoxFlags
Definition: svimpbox.hxx:60
void PaintImmediately()
Definition: paint.cxx:1288
void CursorPosChanging(bool bShift, bool bMod1)
Definition: seleng.cxx:67
constexpr sal_uInt16 KEY_UP
Definition: keycodes.hxx:111
constexpr sal_uInt16 KEY_END
Definition: keycodes.hxx:115
bool mbNoAutoCurEntry
Definition: svimpbox.hxx:196
sal_uLong GetAbsPos(SvTreeListEntry const *pEntry) const
Definition: treelist.hxx:265
sal_Int64 WinBits
void SetPageSize(tools::Long nNewSize)
Definition: scrbar.hxx:125
void PageUp(sal_uInt16 nDelta) override
tools::Long Left() const
size_t pos
int nCount
void Hide()
Definition: window.hxx:945
tools::Long Bottom() const
Link< SvTreeListBox *, bool > aDoubleClickHdl
virtual bool KeyInput(const KeyEvent &)
Definition: svimpbox.cxx:2083
bool m_bSimpleTravel
Definition: svimpbox.hxx:200
ImplSVEvent * m_nCurUserEvent
Definition: svimpbox.hxx:192
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
void NotifyScrolled()
void SetThumbPos(tools::Long nThumbPos)
Definition: scrbar.cxx:1362
short GetEntryHeight() const
void CursorUp() override
constexpr sal_uInt16 KEY_DOWN
Definition: keycodes.hxx:110
short GetEntryWidth() const
tools::Long GetPageSize() const
Definition: scrbar.hxx:126
void PageDown(sal_uInt16 nDelta) override
void InvalidateEntry(tools::Long nId) const override
#define DBG_ASSERT(sCon, aError)
int i
void CursorDown() override
void KeyUp(bool bPageUp) override
void SetVisibleSize(tools::Long nNewSize)
Definition: scrbar.cxx:1376
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:195
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:302
void ShowVerSBar()
Definition: svimpbox.cxx:1289
void SetTop(tools::Long v)
void SetBottom(tools::Long v)
tools::Rectangle GetVisibleArea() const
Definition: svimpbox.cxx:2829
SvTreeListEntry * Last() const
Definition: treelist.cxx:554
tools::Long Top() const
LBoxFlags m_nFlags
Definition: svimpbox.hxx:194
void SetCursor(SvTreeListEntry *pEntry, bool bForceNoSelect=false)
Definition: svimpbox.cxx:570
constexpr sal_uInt16 KEY_RETURN
Definition: keycodes.hxx:119
bool IsEntryInView(SvTreeListEntry *pEntry) const override
constexpr sal_uInt16 KEY_RIGHT
Definition: keycodes.hxx:113
tools::Long GetThumbPos() const
Definition: scrbar.hxx:122
void ShowCursor(bool bShow)
Definition: svimpbox.cxx:639
void SetVisibleArea(const tools::Rectangle &rNewArea)
Definition: seleng.hxx:114
SvTreeListEntry * m_pCursor
Definition: svimpbox.hxx:190
SvTreeListEntry * First() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE) override
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:54
sal_uLong GetVisibleCount() const
Definition: treelist.hxx:230
bool IsShift() const
Definition: keycod.hxx:56
void FindMostRight()
Definition: svimpbox.cxx:3000
virtual void Scroll(tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
Definition: window.cxx:2921
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
SelectionEngine m_aSelEng
Definition: svimpbox.hxx:197
WinBits const WB_NOINITIALSELECTION
bool IsVisible() const
Definition: window2.cxx:1102
SvTreeListEntry * GetClickedEntry(const Point &rPoint) const override
bool IsMod1() const
Definition: keycod.hxx:58
bool IsSelectable(const SvTreeListEntry *pEntry)
Definition: svimpbox.cxx:3109
tools::Long Height() const
SvTreeListEntry * m_pStartEntry
Definition: svimpbox.hxx:191
tools::Long GetHeight() const
void FillView()
Definition: svimpbox.cxx:1244
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
bool Select(SvTreeListEntry *pEntry, bool bSelect=true)
sal_uLong GetVisiblePos(SvTreeListEntry const *pEntry) const
Definition: treelist.hxx:268
VclPtr< ScrollBar > m_aVerSBar
Definition: svimpbox.hxx:189
Point GetEntryPosition(const SvTreeListEntry *pEntry) const override
bool HasFocus() const
Definition: window.cxx:2962
bool m_bInVScrollHdl
Definition: svimpbox.hxx:199
SelectionMode GetSelectionMode() const
Definition: seleng.hxx:126
bool KeyInput(const KeyEvent &) override
bool IsMod2() const
Definition: keycod.hxx:60
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2186