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