LibreOffice Module vcl (master)  1
imivctl.hxx
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 #ifndef INCLUDED_SVTOOLS_SOURCE_CONTNR_IMIVCTL_HXX
21 #define INCLUDED_SVTOOLS_SOURCE_CONTNR_IMIVCTL_HXX
22 
23 #include <sal/config.h>
24 
25 #include <o3tl/safeint.hxx>
26 #include <vcl/toolkit/ivctrl.hxx>
27 #include <vcl/virdev.hxx>
28 #include <vcl/scrbar.hxx>
29 #include <vcl/timer.hxx>
30 #include <vcl/idle.hxx>
31 #include <vcl/vclptr.hxx>
32 #include <tools/debug.hxx>
34 
35 #include <limits.h>
36 
37 
38 #include <memory>
39 #include <map>
40 
41 class IcnCursor_Impl;
42 class SvtIconChoiceCtrl;
44 class IcnViewEdit_Impl;
45 class IcnGridMap_Impl;
46 
47 
48 // some defines
49 
50 #define PAINTFLAG_HOR_CENTERED 0x0001
51 #define PAINTFLAG_VER_CENTERED 0x0002
52 
53 enum class IconChoiceFlags {
54  NONE = 0x0000,
55  AddMode = 0x0001,
56  SelectingRect = 0x0002,
57  DownCtrl = 0x0004,
58  DownDeselect = 0x0008,
59  EntryListPosValid = 0x0010,
60  ClearingSelection = 0x0020,
61  Arranging = 0x0040
62 };
63 namespace o3tl {
64  template<> struct typed_flags<IconChoiceFlags> : is_typed_flags<IconChoiceFlags, 0x007f> {};
65 }
66 
67 // unit = pixels
68 // distances from window borders
69 #define LROFFS_WINBORDER 4
70 #define TBOFFS_WINBORDER 4
71 // for the bounding rectangle
72 #define LROFFS_BOUND 2
73 #define TBOFFS_BOUND 2
74 // distance icon to text
75 #define HOR_DIST_BMP_STRING 3
76 #define VER_DIST_BMP_STRING 3
77 // width offset of highlight rectangle for Text
78 #define LROFFS_TEXT 2
79 
80 #define DEFAULT_MAX_VIRT_WIDTH 200
81 #define DEFAULT_MAX_VIRT_HEIGHT 200
82 
83 #define VIEWMODE_MASK (WB_ICON | WB_SMALLICON | WB_DETAILS)
84 
85 
86 enum class IcnViewFieldType
87 {
88  Image,
89  Text
90 };
91 
92 
93 // Data about the focus of entries
94 
95 struct LocalFocus
96 {
99 };
100 
101 
103 
104 #define GRID_NOT_FOUND (GridId(ULONG_MAX))
105 
106 // Implementation-class of IconChoiceCtrl
107 
108 
109 typedef std::map<sal_uInt16, std::unique_ptr<SvxIconChoiceCtrlColumnInfo>> SvxIconChoiceCtrlColumnInfoMap;
110 typedef std::vector<SvxIconChoiceCtrlEntry*> SvxIconChoiceCtrlEntryPtrVec;
111 
113 {
114  friend class IcnCursor_Impl;
115  friend class IcnGridMap_Impl;
116 
117  std::vector< std::unique_ptr<SvxIconChoiceCtrlEntry> > maEntries;
122  std::vector<tools::Rectangle> aSelectedRectList;
130  Size aOutputSize; // Pixel
132  std::unique_ptr<IcnCursor_Impl> pImpCursor;
133  std::unique_ptr<IcnGridMap_Impl> pGridMap;
134  tools::Long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP
135  tools::Long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT
136  std::vector< SvxIconChoiceCtrlEntry* > maZOrderList;
137  std::unique_ptr<SvxIconChoiceCtrlColumnInfoMap> m_pColumns;
139  tools::Long nMaxBoundHeight; // height of highest BoundRects
145  SvxIconChoiceCtrlEntry* pHead = nullptr; // top left entry
148  SvxIconChoiceCtrlEntry* pAnchor; // for selection
149  LocalFocus aFocus; // Data for focusrect
150  ::vcl::AccessibleFactoryAccess aAccFactory;
151 
154  sal_Int32 nSelectionCount;
158 
159  void ShowCursor( bool bShow );
160 
161  void ImpArrange( bool bKeepPredecessors );
162  void AdjustVirtSize( const tools::Rectangle& );
163  void ResetVirtSize();
164  void CheckScrollBars();
165 
166  DECL_LINK( ScrollUpDownHdl, ScrollBar*, void );
167  DECL_LINK( ScrollLeftRightHdl, ScrollBar*, void );
168  DECL_LINK( UserEventHdl, void*, void );
169  DECL_LINK( AutoArrangeHdl, Timer*, void );
170  DECL_LINK( DocRectChangedHdl, Timer*, void );
171  DECL_LINK( VisRectChangedHdl, Timer*, void );
172  DECL_LINK( CallSelectHdlHdl, Timer*, void );
173 
174  void AdjustScrollBars();
175  void PositionScrollBars( tools::Long nRealWidth, tools::Long nRealHeight );
177  {
178  return ((nVisibleRange*75)/100);
179  }
181  {
182  return nMaxBoundHeight / 2;
183  }
184  bool HandleScrollCommand( const CommandEvent& rCmd );
185  void ToDocPos( Point& rPosPixel )
186  {
187  rPosPixel -= pView->GetMapMode().GetOrigin();
188  }
189  void InitScrollBarBox();
191  void DeselectAllBut( SvxIconChoiceCtrlEntry const * );
192  void Center( SvxIconChoiceCtrlEntry* pEntry ) const;
193  void CallSelectHandler();
194  void SelectRect(
195  SvxIconChoiceCtrlEntry* pEntry1,
196  SvxIconChoiceCtrlEntry* pEntry2,
197  bool bAdd,
198  std::vector<tools::Rectangle>* pOtherRects
199  );
200 
201  void SelectRange(
202  SvxIconChoiceCtrlEntry const * pStart,
203  SvxIconChoiceCtrlEntry const * pEnd,
204  bool bAdd
205  );
206 
207  void AddSelectedRect( const tools::Rectangle& );
208  void AddSelectedRect(
209  SvxIconChoiceCtrlEntry* pEntry1,
210  SvxIconChoiceCtrlEntry* pEntry2
211  );
212 
213  void ClearSelectedRectList();
215 
216  void ClipAtVirtOutRect( tools::Rectangle& rRect ) const;
217  GridId GetPredecessorGrid( const Point& rDocPos) const;
218 
219  void InitPredecessors();
220  void ClearPredecessors();
221 
222  bool CheckVerScrollBar();
223  bool CheckHorScrollBar();
224  void CancelUserEvents();
225  void EntrySelected(
226  SvxIconChoiceCtrlEntry* pEntry,
227  bool bSelect
228  );
229  void RepaintSelectedEntries();
230  void SetListPositions();
231  void SetDefaultTextSize();
232  bool IsAutoArrange() const
233  {
234  return (ePositionMode == SvxIconChoiceCtrlPositionMode::AutoArrange);
235  }
236  void DocRectChanged() { aDocRectChangedIdle.Start(); }
237  void VisRectChanged() { aVisRectChangedIdle.Start(); }
238  void SetOrigin( const Point& );
239 
240  void ShowFocus ( tools::Rectangle const & rRect );
241  void DrawFocusRect(vcl::RenderContext& rRenderContext);
242 
243  bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const;
244 
245  // Copy assignment is forbidden and not implemented.
248 
249 public:
250 
255 
256  SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
258 
260  {
261  eSelectionMode = eMode;
262  }
263 
264  void Clear( bool bInCtor );
265  void SetStyle( WinBits nWinStyle );
266  WinBits GetStyle() const { return nWinBits; }
267  void InsertEntry( std::unique_ptr<SvxIconChoiceCtrlEntry>, size_t nPos );
268  void RemoveEntry( size_t nPos );
269  void FontModified();
270  void SelectAll();
271  void SelectEntry(
273  bool bSelect,
274  bool bAddToSelection = false
275  );
276  void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
277  bool MouseButtonDown( const MouseEvent& );
278  bool MouseButtonUp( const MouseEvent& );
279  bool MouseMove( const MouseEvent&);
280  bool RequestHelp( const HelpEvent& rHEvt );
281  void SetCursor_Impl(
282  SvxIconChoiceCtrlEntry* pOldCursor,
283  SvxIconChoiceCtrlEntry* pNewCursor,
284  bool bMod1,
285  bool bShift
286  );
287  bool KeyInput( const KeyEvent& );
288  void Resize();
289  void GetFocus();
290  void LoseFocus();
291  void SetUpdateMode( bool bUpdate );
292  bool GetUpdateMode() const { return bUpdateMode; }
293  void PaintEntry(SvxIconChoiceCtrlEntry*, const Point&, vcl::RenderContext& rRenderContext);
294 
295  void SetEntryPos(
296  SvxIconChoiceCtrlEntry* pEntry,
297  const Point& rPos
298  );
299 
301 
302  void SetNoSelection();
303 
306 
307  SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false );
308 
309  void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound = true );
310 
311  void Arrange(
312  bool bKeepPredecessors,
313  tools::Long nSetMaxVirtWidth,
314  tools::Long nSetMaxVirtHeight
315  );
316 
318  tools::Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr );
321  const Point* pPos = nullptr,
322  const OUString* pStr = nullptr
323  );
324 
327  Size CalcBoundingSize() const;
330  SvxIconChoiceCtrlEntry* pEntry,
331  const Point& rPos,
332  const Size& rBoundingSize
333  );
334  // recalculates all invalid BoundRects
338  {
339  rRect.SetRight(LONG_MAX);
340  bBoundRectsDirty = true;
341  }
342  static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); }
343 
344  static void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected,
345  vcl::RenderContext& rRenderContext );
346 
347  void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry,
348  sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext);
349 
350  // recalculates all BoundingRects if bMustRecalcBoundingRects == true
351  void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); }
352  void Command( const CommandEvent& rCEvt );
353  void ToTop( SvxIconChoiceCtrlEntry* );
354 
355  sal_Int32 GetSelectionCount() const;
356  void SetGrid( const Size& );
357  Size GetMinGrid() const;
358  void Scroll( tools::Long nDeltaX, tools::Long nDeltaY );
359  const Size& GetItemSize( IcnViewFieldType ) const;
360 
361  void HideDDIcon();
362 
363  static bool IsOver(
364  std::vector<tools::Rectangle>* pSelectedRectList,
365  const tools::Rectangle& rEntryBoundRect
366  );
367 
368  void SelectRect(
369  const tools::Rectangle&,
370  bool bAdd,
371  std::vector<tools::Rectangle>* pOtherRects
372  );
373 
374  void MakeVisible(
375  const tools::Rectangle& rDocPos,
376  bool bInScrollBarEvent=false
377  );
378 
379 #ifdef DBG_UTIL
380  void SetEntryTextMode(
382  SvxIconChoiceCtrlEntry* pEntry
383  );
384 #endif
385  size_t GetEntryCount() const { return maEntries.size(); }
387  {
388  return maEntries[ nPos ].get();
389  }
390  SvxIconChoiceCtrlEntry* GetEntry( size_t nPos ) const
391  {
392  return maEntries[ nPos ].get();
393  }
395  sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry const * ) const;
396  void InitSettings();
398 
400  // only delivers valid results when in AutoArrange mode!
402 
404 
405  void SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& );
406  const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const;
407 
409  SvxIconChoiceCtrlEntry* pEntry,
410  bool bKeepHighlightFlags
411  );
412  void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect);
413 
414  void CallEventListeners( VclEventId nEvent, void* pData );
415 
417  {
418  return aAccFactory.getFactory();
419  }
420 };
421 
422 typedef std::map<sal_uInt16, SvxIconChoiceCtrlEntryPtrVec> IconChoiceMap;
423 
425 {
427  std::unique_ptr<IconChoiceMap> xColumns;
428  std::unique_ptr<IconChoiceMap> xRows;
431  short nDeltaWidth;
434  void SetDeltas();
435  void ImplCreate();
436  void Create() { if( !xColumns ) ImplCreate(); }
437 
438  sal_uInt16 GetSortListPos(
440  tools::Long nValue,
441  bool bVertical);
443  sal_uInt16 nCol,
444  sal_uInt16 nTop,
445  sal_uInt16 nBottom,
446  bool bDown,
447  bool bSimple
448  );
449 
451  sal_uInt16 nRow,
452  sal_uInt16 nLeft,
453  sal_uInt16 nRight,
454  bool bRight,
455  bool bSimple
456  );
457 
458 public:
459  explicit IcnCursor_Impl( SvxIconChoiceCtrl_Impl* pOwner );
460  ~IcnCursor_Impl();
461  void Clear();
462 
463  // for Cursortravelling etc.
467 };
468 
470 {
473  std::unique_ptr<bool[]> _pGridMap;
474  sal_uInt16 _nGridCols, _nGridRows;
475 
476  void Expand();
477  void Create_Impl();
478  void Create() { if(!_pGridMap) Create_Impl(); }
479 
480  void GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const;
481 
482 public:
483  explicit IcnGridMap_Impl(SvxIconChoiceCtrl_Impl* pView);
485 
486  void Clear();
487 
488  GridId GetGrid( const Point& rDocPos );
489  GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY );
491 
492  void OccupyGrids( const SvxIconChoiceCtrlEntry* );
493  void OccupyGrid( GridId nId )
494  {
495  DBG_ASSERT(!_pGridMap || nId<o3tl::make_unsigned(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
496  if(_pGridMap && nId < o3tl::make_unsigned(_nGridCols *_nGridRows) )
497  _pGridMap[ nId ] = true;
498  }
499 
501  void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY );
502  static sal_uLong GetGridCount(
503  const Size& rSizePixel,
504  sal_uInt16 nGridWidth,
505  sal_uInt16 nGridHeight
506  );
507 
508  void OutputSizeChanged();
509 };
510 
511 #endif
512 
513 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetEntryPos(SvxIconChoiceCtrlEntry *pEntry, const Point &rPos)
Definition: imivctl1.cxx:1474
void MakeVisible(const tools::Rectangle &rDocPos, bool bInScrollBarEvent=false)
Definition: imivctl1.cxx:1935
::vcl::IAccessibleFactory & GetAccessibleFactory()
Definition: imivctl.hxx:416
tools::Rectangle aRect
Definition: imivctl.hxx:97
void DrawHighlightFrame(vcl::RenderContext &rRenderContext, const tools::Rectangle &rBmpRect)
Definition: imivctl1.cxx:2845
SvxIconChoiceCtrlEntry * GoUpDown(SvxIconChoiceCtrlEntry *, bool bDown)
Definition: imivctl2.cxx:392
static bool IsOver(std::vector< tools::Rectangle > *pSelectedRectList, const tools::Rectangle &rEntryBoundRect)
Definition: imivctl1.cxx:2386
void ShowFocus(tools::Rectangle const &rRect)
Definition: imivctl1.cxx:2463
SvxIconChoiceCtrl_Impl(const SvxIconChoiceCtrl_Impl &)=delete
std::unique_ptr< IcnGridMap_Impl > pGridMap
Definition: imivctl.hxx:133
tools::Long CalcBoundingWidth() const
Definition: imivctl1.cxx:1645
WinBits GetStyle() const
Definition: imivctl.hxx:266
static tools::Long GetScrollBarPageSize(tools::Long nVisibleRange)
Definition: imivctl.hxx:176
GridId GetPredecessorGrid(const Point &rDocPos) const
Definition: imivctl1.cxx:2749
void DeselectAllBut(SvxIconChoiceCtrlEntry const *)
Definition: imivctl1.cxx:2041
void FindBoundingRect(SvxIconChoiceCtrlEntry *pEntry)
Definition: imivctl1.cxx:1745
GridId GetGrid(const Point &rDocPos)
Definition: imivctl2.cxx:581
SvxIconChoiceCtrl_Impl * pView
Definition: imivctl.hxx:426
SvxIconChoiceCtrlEntry * GetEntry(const Point &rDocPos, bool bHit=false)
Definition: imivctl1.cxx:1520
std::unique_ptr< SvxIconChoiceCtrlColumnInfoMap > m_pColumns
Definition: imivctl.hxx:137
void DrawFocusRect(vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:2477
sal_uIntPtr sal_uLong
long Long
SvxIconChoiceCtrl_Impl * _pView
Definition: imivctl.hxx:472
SvxIconChoiceCtrlEntry * SearchRow(sal_uInt16 nRow, sal_uInt16 nLeft, sal_uInt16 nRight, bool bRight, bool bSimple)
Definition: imivctl2.cxx:190
void AddSelectedRect(const tools::Rectangle &)
Definition: imivctl1.cxx:2407
static void PaintEmphasis(const tools::Rectangle &rRect1, bool bSelected, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1342
tools::Long nGridDY
Definition: imivctl.hxx:252
void Create_Impl()
Definition: imivctl2.cxx:510
SvxIconChoiceCtrlPositionMode ePositionMode
Definition: imivctl.hxx:155
void SetBoundingRect_Impl(SvxIconChoiceCtrlEntry *pEntry, const Point &rPos, const Size &rBoundingSize)
Definition: imivctl1.cxx:1758
ImplSVEvent * nUserEventAdjustScrBars
Definition: imivctl.hxx:142
const MapMode & GetMapMode() const
Definition: outdev.hxx:1681
tools::Long nCols
Definition: imivctl.hxx:429
SelectionMode
Definition: vclenum.hxx:26
std::vector< SvxIconChoiceCtrlEntry * > maZOrderList
Definition: imivctl.hxx:136
tools::Long nMaxVirtHeight
Definition: imivctl.hxx:135
void MakeEntryVisible(SvxIconChoiceCtrlEntry *pEntry, bool bBound=true)
Definition: imivctl1.cxx:1551
IcnViewFieldType
Definition: imivctl.hxx:86
::vcl::AccessibleFactoryAccess aAccFactory
Definition: imivctl.hxx:150
std::map< sal_uInt16, SvxIconChoiceCtrlEntryPtrVec > IconChoiceMap
Definition: imivctl.hxx:422
std::map< sal_uInt16, std::unique_ptr< SvxIconChoiceCtrlColumnInfo > > SvxIconChoiceCtrlColumnInfoMap
Definition: imivctl.hxx:109
bool MouseMove(const MouseEvent &)
Definition: imivctl1.cxx:784
tools::Long nMaxBoundHeight
Definition: imivctl.hxx:139
void SetRight(tools::Long v)
bool GetUpdateMode() const
Definition: imivctl.hxx:292
sal_Int32 nSelectionCount
Definition: imivctl.hxx:154
Size CalcBoundingSize() const
Definition: imivctl1.cxx:1693
SvxIconChoiceCtrlEntry * SearchCol(sal_uInt16 nCol, sal_uInt16 nTop, sal_uInt16 nBottom, bool bDown, bool bSimple)
Definition: imivctl2.cxx:114
tools::Rectangle GetOutputRect() const
Definition: imivctl1.cxx:235
bool IsAutoArrange() const
Definition: imivctl.hxx:232
SvxIconChoiceCtrlEntry * pHdlEntry
Definition: imivctl.hxx:147
void CallEventListeners(VclEventId nEvent, void *pData)
Definition: imivctl1.cxx:2925
sal_Int64 WinBits
sal_uInt16 sal_Unicode
VclPtr< ScrollBar > aHorSBar
Definition: imivctl.hxx:119
void OccupyGrids(const SvxIconChoiceCtrlEntry *)
Definition: imivctl2.cxx:646
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos)
Definition: imivctl.hxx:386
tools::Rectangle CalcFocusRect(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2210
bool MouseButtonUp(const MouseEvent &)
Definition: imivctl1.cxx:732
void SetEntryTextMode(SvxIconChoiceCtrlTextMode, SvxIconChoiceCtrlEntry *pEntry)
Definition: imivctl1.cxx:2436
void SetOrigin(const Point &)
Definition: imivctl1.cxx:2918
DrawTextFlags nCurTextDrawFlags
Definition: imivctl.hxx:141
Color aPenColor
Definition: imivctl.hxx:98
SelectionMode eSelectionMode
Definition: imivctl.hxx:153
static bool IsBoundingRectValid(const tools::Rectangle &rRect)
Definition: imivctl.hxx:342
tools::Rectangle aCurSelectionRect
Definition: imivctl.hxx:121
virtual void Start() override
Activates the timer task.
Definition: idle.cxx:34
void SetDeltas()
Definition: imivctl2.cxx:451
VclEventId
Definition: vclevent.hxx:37
SvxIconChoiceCtrlEntry * pAnchor
Definition: imivctl.hxx:148
void Scroll(tools::Long nDeltaX, tools::Long nDeltaY)
Definition: imivctl1.cxx:2190
void SetCursor_Impl(SvxIconChoiceCtrlEntry *pOldCursor, SvxIconChoiceCtrlEntry *pNewCursor, bool bMod1, bool bShift)
Definition: imivctl1.cxx:800
size_t GetEntryCount() const
Definition: imivctl.hxx:385
VclPtr< SvtIconChoiceCtrl > pView
Definition: imivctl.hxx:131
sal_uLong GridId
Definition: imivctl.hxx:102
tools::Rectangle CalcMaxTextRect(const SvxIconChoiceCtrlEntry *pEntry) const
Definition: imivctl1.cxx:2103
void ImpArrange(bool bKeepPredecessors)
Definition: imivctl1.cxx:452
void AdjustVirtSize(const tools::Rectangle &)
Definition: imivctl1.cxx:367
void SetColumn(sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo &)
Definition: imivctl1.cxx:2818
SvxIconChoiceCtrlEntry * GoLeftRight(SvxIconChoiceCtrlEntry *, bool bRight)
Definition: imivctl2.cxx:284
sal_uInt16 GetSortListPos(SvxIconChoiceCtrlEntryPtrVec &rList, tools::Long nValue, bool bVertical)
Definition: imivctl2.cxx:37
void SetGrid(const Size &)
Definition: imivctl1.cxx:2077
SvxIconChoiceCtrlTextMode eTextMode
Definition: imivctl.hxx:152
IconChoiceFlags nFlags
Definition: imivctl.hxx:140
SvxIconChoiceCtrlEntry * pCurHighlightFrame
Definition: imivctl.hxx:143
SvxIconChoiceCtrlEntry * GetCurEntry() const
Definition: imivctl.hxx:304
tools::Rectangle GetGridRect(GridId)
Definition: imivctl2.cxx:604
void EntrySelected(SvxIconChoiceCtrlEntry *pEntry, bool bSelect)
Definition: imivctl1.cxx:292
void Clear(bool bInCtor)
Definition: imivctl1.cxx:120
#define DBG_ASSERT(sCon, aError)
std::unique_ptr< bool[]> _pGridMap
Definition: imivctl.hxx:473
static sal_uLong GetGridCount(const Size &rSizePixel, sal_uInt16 nGridWidth, sal_uInt16 nGridHeight)
Definition: imivctl2.cxx:664
std::unique_ptr< IcnCursor_Impl > pImpCursor
Definition: imivctl.hxx:132
std::vector< std::unique_ptr< SvxIconChoiceCtrlEntry > > maEntries
Definition: imivctl.hxx:117
VclPtr< ScrollBar > aVerSBar
Definition: imivctl.hxx:118
bool MouseButtonDown(const MouseEvent &)
Definition: imivctl1.cxx:603
SvxIconChoiceCtrlEntry * GetFirstSelectedEntry() const
Definition: imivctl1.cxx:2545
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:302
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
void OccupyGrid(GridId nId)
Definition: imivctl.hxx:493
tools::Long nRows
Definition: imivctl.hxx:430
void SetStyle(WinBits nWinStyle)
Definition: imivctl1.cxx:154
void Command(const CommandEvent &rCEvt)
Definition: imivctl1.cxx:1894
DrawTextFlags
Definition: outdev.hxx:142
tools::Long GetScrollBarLineSize() const
Definition: imivctl.hxx:180
std::unique_ptr< IconChoiceMap > xColumns
Definition: imivctl.hxx:427
void InvalidateEntry(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2534
void PaintEntry(SvxIconChoiceCtrlEntry *, const Point &, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1395
void PositionScrollBars(tools::Long nRealWidth, tools::Long nRealHeight)
Definition: imivctl1.cxx:1046
const long LONG_MAX
SvxIconChoiceCtrlEntry * GoPageUpDown(SvxIconChoiceCtrlEntry *, bool bDown)
Definition: imivctl2.cxx:332
bool IsMnemonicChar(sal_Unicode cChar, sal_uLong &rPos) const
Definition: imivctl1.cxx:2493
bool RequestHelp(const HelpEvent &rHEvt)
Definition: imivctl1.cxx:2774
void ImplCreate()
Definition: imivctl2.cxx:63
tools::Long nGridDX
Definition: imivctl.hxx:251
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos) const
Definition: imivctl.hxx:390
tools::Rectangle CalcTextRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr, const OUString *pStr=nullptr)
Definition: imivctl1.cxx:1604
VclPtr< ScrollBarBox > aScrBarBox
Definition: imivctl.hxx:120
void RemoveEntry(size_t nPos)
Definition: imivctl1.cxx:228
void ToDocPos(Point &rPosPixel)
Definition: imivctl.hxx:185
const tools::Rectangle & GetEntryBoundRect(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1570
void ShowCursor(bool bShow)
Definition: imivctl1.cxx:1798
IconChoiceFlags
Definition: imivctl.hxx:53
SvxIconChoiceCtrlTextMode
Definition: ivctrl.hxx:49
SvxIconChoiceCtrlEntry * pCursor
Definition: imivctl.hxx:146
DECL_LINK(ScrollUpDownHdl, ScrollBar *, void)
SvxIconChoiceCtrlEntry * FindEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, const Point &)
Definition: imivctl1.cxx:2726
tools::Long CalcBoundingHeight() const
Definition: imivctl1.cxx:1666
SvxIconChoiceCtrl_Impl & operator=(const SvxIconChoiceCtrl_Impl &)=delete
short nDeltaWidth
Definition: imivctl.hxx:431
tools::Long nMaxVirtWidth
Definition: imivctl.hxx:134
void SetUpdateMode(bool bUpdate)
Definition: imivctl1.cxx:1326
void Create()
Definition: imivctl.hxx:436
tools::Rectangle CalcBmpRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr)
Definition: imivctl1.cxx:1577
void SelectEntry(SvxIconChoiceCtrlEntry *, bool bSelect, bool bAddToSelection=false)
Definition: imivctl1.cxx:255
SvxIconChoiceCtrlEntry * pCurEntry
Definition: imivctl.hxx:433
tools::Long nVerSBarWidth
Definition: imivctl.hxx:254
IcnGridMap_Impl(SvxIconChoiceCtrl_Impl *pView)
Definition: imivctl2.cxx:477
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: imivctl1.cxx:482
const Point & GetOrigin() const
Definition: mapmod.cxx:170
void SetEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, SvxIconChoiceCtrlEntry *pPredecessor)
Definition: imivctl1.cxx:2678
std::vector< tools::Rectangle > aSelectedRectList
Definition: imivctl.hxx:122
IcnCursor_Impl(SvxIconChoiceCtrl_Impl *pOwner)
Definition: imivctl2.cxx:23
void InsertEntry(std::unique_ptr< SvxIconChoiceCtrlEntry >, size_t nPos)
Definition: imivctl1.cxx:190
SvxIconChoiceCtrlEntry * pHead
Definition: imivctl.hxx:145
void Center(SvxIconChoiceCtrlEntry *pEntry) const
Definition: imivctl1.cxx:2171
void OutputSizeChanged()
Definition: imivctl2.cxx:673
void ClipAtVirtOutRect(tools::Rectangle &rRect) const
Definition: imivctl1.cxx:1919
void SetEntryHighlightFrame(SvxIconChoiceCtrlEntry *pEntry, bool bKeepHighlightFlags)
Definition: imivctl1.cxx:2865
sal_Int32 GetEntryListPos(SvxIconChoiceCtrlEntry const *) const
Definition: imivctl1.cxx:2602
Definition: timer.hxx:26
tools::Long nHorSBarHeight
Definition: imivctl.hxx:253
void SelectRange(SvxIconChoiceCtrlEntry const *pStart, SvxIconChoiceCtrlEntry const *pEnd, bool bAdd)
Definition: imivctl1.cxx:2340
short nDeltaHeight
Definition: imivctl.hxx:432
sal_uInt16 _nGridCols
Definition: imivctl.hxx:474
void SetCursor(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1769
void InvalidateBoundingRect(tools::Rectangle &rRect)
Definition: imivctl.hxx:337
tools::Rectangle _aLastOccupiedGrid
Definition: imivctl.hxx:471
std::unique_ptr< IconChoiceMap > xRows
Definition: imivctl.hxx:428
const SvxIconChoiceCtrlColumnInfo * GetColumn(sal_uInt16 nIndex) const
Definition: imivctl1.cxx:2835
void ToggleSelection(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2034
std::vector< SvxIconChoiceCtrlEntry * > SvxIconChoiceCtrlEntryPtrVec
Definition: imivctl.hxx:110
void GetMinMapSize(sal_uInt16 &rDX, sal_uInt16 &rDY) const
Definition: imivctl2.cxx:530
void SetSelectionMode(SelectionMode eMode)
Definition: imivctl.hxx:259
Size GetMinGrid() const
Definition: imivctl1.cxx:2058
sal_uInt16 _nGridRows
Definition: imivctl.hxx:474
GridId GetUnoccupiedGrid()
Definition: imivctl2.cxx:617
SvxIconChoiceCtrlPositionMode
Definition: ivctrl.hxx:55
void PaintItem(const tools::Rectangle &rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry *pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1367
bool HandleScrollCommand(const CommandEvent &rCmd)
Definition: imivctl1.cxx:1815
bool KeyInput(const KeyEvent &)
Definition: imivctl1.cxx:848
tools::Long Right() const
void ToTop(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1906
void Arrange(bool bKeepPredecessors, tools::Long nSetMaxVirtWidth, tools::Long nSetMaxVirtHeight)
Definition: imivctl1.cxx:437
An idle is a timer to be scheduled immediately.
Definition: idle.hxx:30
void SelectRect(SvxIconChoiceCtrlEntry *pEntry1, SvxIconChoiceCtrlEntry *pEntry2, bool bAdd, std::vector< tools::Rectangle > *pOtherRects)
Definition: imivctl1.cxx:2234
const Size & GetItemSize(IcnViewFieldType) const
Definition: imivctl1.cxx:2203
sal_Int32 GetSelectionCount() const
Definition: imivctl1.cxx:2027
void SetPositionMode(SvxIconChoiceCtrlPositionMode)
Definition: imivctl1.cxx:2645
void RecalcAllBoundingRectsSmart()
Definition: imivctl1.cxx:1698
void GetGridCoord(GridId, sal_uInt16 &rGridX, sal_uInt16 &rGridY)
Definition: imivctl2.cxx:699