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/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 
102 // Implementation-class of IconChoiceCtrl
103 
104 
105 typedef std::map<sal_uInt16, std::unique_ptr<SvxIconChoiceCtrlColumnInfo>> SvxIconChoiceCtrlColumnInfoMap;
106 typedef std::vector<SvxIconChoiceCtrlEntry*> SvxIconChoiceCtrlEntryPtrVec;
107 
109 {
110  friend class IcnCursor_Impl;
111  friend class IcnGridMap_Impl;
112 
114  std::vector< std::unique_ptr<SvxIconChoiceCtrlEntry> > maEntries;
119  std::vector<tools::Rectangle> aSelectedRectList;
127  Size aOutputSize; // Pixel
129  std::unique_ptr<IcnCursor_Impl> pImpCursor;
130  std::unique_ptr<IcnGridMap_Impl> pGridMap;
131  long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP
132  long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT
133  std::vector< SvxIconChoiceCtrlEntry* > maZOrderList;
134  std::unique_ptr<SvxIconChoiceCtrlColumnInfoMap> m_pColumns;
136  long nMaxBoundHeight; // height of highest BoundRects
142  SvxIconChoiceCtrlEntry* pHead = nullptr; // top left entry
145  SvxIconChoiceCtrlEntry* pAnchor; // for selection
146  LocalFocus aFocus; // Data for focusrect
148 
151  sal_Int32 nSelectionCount;
155 
156  void ShowCursor( bool bShow );
157 
158  void ImpArrange( bool bKeepPredecessors );
159  void AdjustVirtSize( const tools::Rectangle& );
160  void ResetVirtSize();
161  void CheckScrollBars();
162 
163  DECL_LINK( ScrollUpDownHdl, ScrollBar*, void );
164  DECL_LINK( ScrollLeftRightHdl, ScrollBar*, void );
165  DECL_LINK( UserEventHdl, void*, void );
166  DECL_LINK( AutoArrangeHdl, Timer*, void );
167  DECL_LINK( DocRectChangedHdl, Timer*, void );
168  DECL_LINK( VisRectChangedHdl, Timer*, void );
169  DECL_LINK( CallSelectHdlHdl, Timer*, void );
170 
171  void AdjustScrollBars();
172  void PositionScrollBars( long nRealWidth, long nRealHeight );
173  static long GetScrollBarPageSize( long nVisibleRange )
174  {
175  return ((nVisibleRange*75)/100);
176  }
177  long GetScrollBarLineSize() const
178  {
179  return nMaxBoundHeight / 2;
180  }
181  bool HandleScrollCommand( const CommandEvent& rCmd );
182  void ToDocPos( Point& rPosPixel )
183  {
184  rPosPixel -= pView->GetMapMode().GetOrigin();
185  }
186  void InitScrollBarBox();
188  void DeselectAllBut( SvxIconChoiceCtrlEntry const * );
189  void Center( SvxIconChoiceCtrlEntry* pEntry ) const;
190  void CallSelectHandler();
191  void SelectRect(
192  SvxIconChoiceCtrlEntry* pEntry1,
193  SvxIconChoiceCtrlEntry* pEntry2,
194  bool bAdd,
195  std::vector<tools::Rectangle>* pOtherRects
196  );
197 
198  void SelectRange(
199  SvxIconChoiceCtrlEntry const * pStart,
200  SvxIconChoiceCtrlEntry const * pEnd,
201  bool bAdd
202  );
203 
204  void AddSelectedRect( const tools::Rectangle& );
205  void AddSelectedRect(
206  SvxIconChoiceCtrlEntry* pEntry1,
207  SvxIconChoiceCtrlEntry* pEntry2
208  );
209 
210  void ClearSelectedRectList();
212 
213  void ClipAtVirtOutRect( tools::Rectangle& rRect ) const;
214  sal_uLong GetPredecessorGrid( const Point& rDocPos) const;
215 
216  void InitPredecessors();
217  void ClearPredecessors();
218 
219  bool CheckVerScrollBar();
220  bool CheckHorScrollBar();
221  void CancelUserEvents();
222  void EntrySelected(
223  SvxIconChoiceCtrlEntry* pEntry,
224  bool bSelect
225  );
226  void RepaintSelectedEntries();
227  void SetListPositions();
228  void SetDefaultTextSize();
229  bool IsAutoArrange() const
230  {
231  return (ePositionMode == SvxIconChoiceCtrlPositionMode::AutoArrange);
232  }
233  void DocRectChanged() { aDocRectChangedIdle.Start(); }
234  void VisRectChanged() { aVisRectChangedIdle.Start(); }
235  void SetOrigin( const Point& );
236 
237  void ShowFocus ( tools::Rectangle const & rRect );
238  void DrawFocusRect(vcl::RenderContext& rRenderContext);
239 
240  bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const;
241 
242  // Copy assignment is forbidden and not implemented.
245 
246 public:
247 
248  long nGridDX;
249  long nGridDY;
252 
253  SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
255 
256  void SetChoiceWithCursor() { bChooseWithCursor = true; }
257  void Clear( bool bInCtor );
258  void SetStyle( WinBits nWinStyle );
259  WinBits GetStyle() const { return nWinBits; }
260  void InsertEntry( std::unique_ptr<SvxIconChoiceCtrlEntry>, size_t nPos );
261  void RemoveEntry( size_t nPos );
262  void CreateAutoMnemonics( MnemonicGenerator* _pGenerator );
263  void FontModified();
264  void SelectAll();
265  void SelectEntry(
267  bool bSelect,
268  bool bAddToSelection = false
269  );
270  void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
271  bool MouseButtonDown( const MouseEvent& );
272  bool MouseButtonUp( const MouseEvent& );
273  bool MouseMove( const MouseEvent&);
274  bool RequestHelp( const HelpEvent& rHEvt );
275  void SetCursor_Impl(
276  SvxIconChoiceCtrlEntry* pOldCursor,
277  SvxIconChoiceCtrlEntry* pNewCursor,
278  bool bMod1,
279  bool bShift
280  );
281  bool KeyInput( const KeyEvent& );
282  void Resize();
283  void GetFocus();
284  void LoseFocus();
285  void SetUpdateMode( bool bUpdate );
286  bool GetUpdateMode() const { return bUpdateMode; }
287  void PaintEntry(SvxIconChoiceCtrlEntry*, const Point&, vcl::RenderContext& rRenderContext);
288 
289  void SetEntryPos(
290  SvxIconChoiceCtrlEntry* pEntry,
291  const Point& rPos
292  );
293 
295 
296  void SetNoSelection();
297 
300 
301  SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false );
302 
303  void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound = true );
304 
305  void Arrange(
306  bool bKeepPredecessors,
307  long nSetMaxVirtWidth,
308  long nSetMaxVirtHeight
309  );
310 
312  tools::Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr );
315  const Point* pPos = nullptr,
316  const OUString* pStr = nullptr
317  );
318 
319  long CalcBoundingWidth() const;
320  long CalcBoundingHeight() const;
321  Size CalcBoundingSize() const;
324  SvxIconChoiceCtrlEntry* pEntry,
325  const Point& rPos,
326  const Size& rBoundingSize
327  );
328  // recalculates all invalid BoundRects
332  {
333  rRect.SetRight(LONG_MAX);
334  bBoundRectsDirty = true;
335  }
336  static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); }
337 
338  static void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected,
339  vcl::RenderContext& rRenderContext );
340 
341  void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry,
342  sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext);
343 
344  // recalculates all BoundingRects if bMustRecalcBoundingRects == true
345  void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); }
346  void Command( const CommandEvent& rCEvt );
347  void ToTop( SvxIconChoiceCtrlEntry* );
348 
349  sal_Int32 GetSelectionCount() const;
350  void SetGrid( const Size& );
351  Size GetMinGrid() const;
352  void Scroll( long nDeltaX, long nDeltaY );
353  const Size& GetItemSize( IcnViewFieldType ) const;
354 
355  void HideDDIcon();
356 
357  static bool IsOver(
358  std::vector<tools::Rectangle>* pSelectedRectList,
359  const tools::Rectangle& rEntryBoundRect
360  );
361 
362  void SelectRect(
363  const tools::Rectangle&,
364  bool bAdd,
365  std::vector<tools::Rectangle>* pOtherRects
366  );
367 
368  void MakeVisible(
369  const tools::Rectangle& rDocPos,
370  bool bInScrollBarEvent=false
371  );
372 
373 #ifdef DBG_UTIL
374  void SetEntryTextMode(
376  SvxIconChoiceCtrlEntry* pEntry
377  );
378 #endif
379  size_t GetEntryCount() const { return maEntries.size(); }
381  {
382  return maEntries[ nPos ].get();
383  }
384  SvxIconChoiceCtrlEntry* GetEntry( size_t nPos ) const
385  {
386  return maEntries[ nPos ].get();
387  }
389  void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; }
390  sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry const * ) const;
391  void InitSettings();
393 
395  // only delivers valid results when in AutoArrange mode!
397 
399 
400  void SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& );
401  const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const;
402 
404  SvxIconChoiceCtrlEntry* pEntry,
405  bool bKeepHighlightFlags
406  );
407  void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect);
408 
409  void CallEventListeners( VclEventId nEvent, void* pData );
410 
412  {
413  return aAccFactory.getFactory();
414  }
415 };
416 
417 typedef std::map<sal_uInt16, SvxIconChoiceCtrlEntryPtrVec> IconChoiceMap;
418 
420 {
422  std::unique_ptr<IconChoiceMap> xColumns;
423  std::unique_ptr<IconChoiceMap> xRows;
424  long nCols;
425  long nRows;
426  short nDeltaWidth;
429  void SetDeltas();
430  void ImplCreate();
431  void Create() { if( !xColumns ) ImplCreate(); }
432 
433  sal_uInt16 GetSortListPos(
435  long nValue,
436  bool bVertical);
438  sal_uInt16 nCol,
439  sal_uInt16 nTop,
440  sal_uInt16 nBottom,
441  bool bDown,
442  bool bSimple
443  );
444 
446  sal_uInt16 nRow,
447  sal_uInt16 nLeft,
448  sal_uInt16 nRight,
449  bool bRight,
450  bool bSimple
451  );
452 
453 public:
454  explicit IcnCursor_Impl( SvxIconChoiceCtrl_Impl* pOwner );
455  ~IcnCursor_Impl();
456  void Clear();
457 
458  // for Cursortravelling etc.
462 };
463 
464 
466 
467 #define GRID_NOT_FOUND ((GridId)ULONG_MAX)
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:1522
void MakeVisible(const tools::Rectangle &rDocPos, bool bInScrollBarEvent=false)
Definition: imivctl1.cxx:1983
::vcl::IAccessibleFactory & GetAccessibleFactory()
Definition: imivctl.hxx:411
tools::Rectangle aRect
Definition: imivctl.hxx:97
void DrawHighlightFrame(vcl::RenderContext &rRenderContext, const tools::Rectangle &rBmpRect)
Definition: imivctl1.cxx:2894
SvxIconChoiceCtrlEntry * GoUpDown(SvxIconChoiceCtrlEntry *, bool bDown)
Definition: imivctl2.cxx:392
static bool IsOver(std::vector< tools::Rectangle > *pSelectedRectList, const tools::Rectangle &rEntryBoundRect)
Definition: imivctl1.cxx:2435
void ShowFocus(tools::Rectangle const &rRect)
Definition: imivctl1.cxx:2512
SvxIconChoiceCtrl_Impl(const SvxIconChoiceCtrl_Impl &)=delete
std::unique_ptr< IcnGridMap_Impl > pGridMap
Definition: imivctl.hxx:130
Size const aImageSize
Definition: imivctl.hxx:125
WinBits GetStyle() const
Definition: imivctl.hxx:259
void DeselectAllBut(SvxIconChoiceCtrlEntry const *)
Definition: imivctl1.cxx:2089
void FindBoundingRect(SvxIconChoiceCtrlEntry *pEntry)
Definition: imivctl1.cxx:1793
GridId GetGrid(const Point &rDocPos)
Definition: imivctl2.cxx:581
SvxIconChoiceCtrl_Impl * pView
Definition: imivctl.hxx:421
SvxIconChoiceCtrlEntry * GetEntry(const Point &rDocPos, bool bHit=false)
Definition: imivctl1.cxx:1568
std::unique_ptr< SvxIconChoiceCtrlColumnInfoMap > m_pColumns
Definition: imivctl.hxx:134
void DrawFocusRect(vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:2526
sal_uIntPtr sal_uLong
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:2456
static void PaintEmphasis(const tools::Rectangle &rRect1, bool bSelected, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1390
void Create_Impl()
Definition: imivctl2.cxx:510
SvxIconChoiceCtrlPositionMode ePositionMode
Definition: imivctl.hxx:152
void SetBoundingRect_Impl(SvxIconChoiceCtrlEntry *pEntry, const Point &rPos, const Size &rBoundingSize)
Definition: imivctl1.cxx:1806
sal_uLong GetPredecessorGrid(const Point &rDocPos) const
Definition: imivctl1.cxx:2798
ImplSVEvent * nUserEventAdjustScrBars
Definition: imivctl.hxx:139
const MapMode & GetMapMode() const
Definition: outdev.hxx:1681
SelectionMode
Definition: vclenum.hxx:26
std::vector< SvxIconChoiceCtrlEntry * > maZOrderList
Definition: imivctl.hxx:133
void MakeEntryVisible(SvxIconChoiceCtrlEntry *pEntry, bool bBound=true)
Definition: imivctl1.cxx:1599
IcnViewFieldType
Definition: imivctl.hxx:86
sal_uInt16 GetSortListPos(SvxIconChoiceCtrlEntryPtrVec &rList, long nValue, bool bVertical)
Definition: imivctl2.cxx:37
::vcl::AccessibleFactoryAccess aAccFactory
Definition: imivctl.hxx:147
std::map< sal_uInt16, SvxIconChoiceCtrlEntryPtrVec > IconChoiceMap
Definition: imivctl.hxx:417
std::map< sal_uInt16, std::unique_ptr< SvxIconChoiceCtrlColumnInfo > > SvxIconChoiceCtrlColumnInfoMap
Definition: imivctl.hxx:105
bool MouseMove(const MouseEvent &)
Definition: imivctl1.cxx:816
bool GetUpdateMode() const
Definition: imivctl.hxx:286
sal_Int32 nSelectionCount
Definition: imivctl.hxx:151
Size CalcBoundingSize() const
Definition: imivctl1.cxx:1741
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:267
bool IsAutoArrange() const
Definition: imivctl.hxx:229
SvxIconChoiceCtrlEntry * pHdlEntry
Definition: imivctl.hxx:144
void CallEventListeners(VclEventId nEvent, void *pData)
Definition: imivctl1.cxx:2974
sal_Int64 WinBits
sal_uInt16 sal_Unicode
long Right() const
VclPtr< ScrollBar > aHorSBar
Definition: imivctl.hxx:116
void OccupyGrids(const SvxIconChoiceCtrlEntry *)
Definition: imivctl2.cxx:646
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos)
Definition: imivctl.hxx:380
tools::Rectangle CalcFocusRect(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2259
bool MouseButtonUp(const MouseEvent &)
Definition: imivctl1.cxx:764
void SetEntryTextMode(SvxIconChoiceCtrlTextMode, SvxIconChoiceCtrlEntry *pEntry)
Definition: imivctl1.cxx:2485
void PositionScrollBars(long nRealWidth, long nRealHeight)
Definition: imivctl1.cxx:1094
void SetOrigin(const Point &)
Definition: imivctl1.cxx:2967
DrawTextFlags nCurTextDrawFlags
Definition: imivctl.hxx:138
Color aPenColor
Definition: imivctl.hxx:98
SelectionMode eSelectionMode
Definition: imivctl.hxx:150
static bool IsBoundingRectValid(const tools::Rectangle &rRect)
Definition: imivctl.hxx:336
tools::Rectangle aCurSelectionRect
Definition: imivctl.hxx:118
virtual void Start() override
Activates the timer task.
Definition: idle.cxx:34
void SetDeltas()
Definition: imivctl2.cxx:451
VclEventId
Definition: vclevent.hxx:41
SvxIconChoiceCtrlEntry * pAnchor
Definition: imivctl.hxx:145
void SetCursor_Impl(SvxIconChoiceCtrlEntry *pOldCursor, SvxIconChoiceCtrlEntry *pNewCursor, bool bMod1, bool bShift)
Definition: imivctl1.cxx:832
size_t GetEntryCount() const
Definition: imivctl.hxx:379
static long GetScrollBarPageSize(long nVisibleRange)
Definition: imivctl.hxx:173
VclPtr< SvtIconChoiceCtrl > pView
Definition: imivctl.hxx:128
sal_uLong GridId
Definition: imivctl.hxx:465
tools::Rectangle CalcMaxTextRect(const SvxIconChoiceCtrlEntry *pEntry) const
Definition: imivctl1.cxx:2152
void ImpArrange(bool bKeepPredecessors)
Definition: imivctl1.cxx:484
void AdjustVirtSize(const tools::Rectangle &)
Definition: imivctl1.cxx:399
void SetColumn(sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo &)
Definition: imivctl1.cxx:2867
SvxIconChoiceCtrlEntry * GoLeftRight(SvxIconChoiceCtrlEntry *, bool bRight)
Definition: imivctl2.cxx:284
void SetGrid(const Size &)
Definition: imivctl1.cxx:2126
SvxIconChoiceCtrlTextMode eTextMode
Definition: imivctl.hxx:149
IconChoiceFlags nFlags
Definition: imivctl.hxx:137
SvxIconChoiceCtrlEntry * pCurHighlightFrame
Definition: imivctl.hxx:140
SvxIconChoiceCtrlEntry * GetCurEntry() const
Definition: imivctl.hxx:298
tools::Rectangle GetGridRect(GridId)
Definition: imivctl2.cxx:604
void EntrySelected(SvxIconChoiceCtrlEntry *pEntry, bool bSelect)
Definition: imivctl1.cxx:324
void Clear(bool bInCtor)
Definition: imivctl1.cxx:120
#define DBG_ASSERT(sCon, aError)
std::unique_ptr< bool[]> _pGridMap
Definition: imivctl.hxx:473
a client for the accessibility implementations which have been outsourced from the main vcl/svtools l...
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:129
std::vector< std::unique_ptr< SvxIconChoiceCtrlEntry > > maEntries
Definition: imivctl.hxx:114
void SetRight(long v)
VclPtr< ScrollBar > aVerSBar
Definition: imivctl.hxx:115
bool MouseButtonDown(const MouseEvent &)
Definition: imivctl1.cxx:635
SvxIconChoiceCtrlEntry * GetFirstSelectedEntry() const
Definition: imivctl1.cxx:2594
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
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
void SetStyle(WinBits nWinStyle)
Definition: imivctl1.cxx:154
void Command(const CommandEvent &rCEvt)
Definition: imivctl1.cxx:1942
DrawTextFlags
Definition: outdev.hxx:144
std::unique_ptr< IconChoiceMap > xColumns
Definition: imivctl.hxx:422
void InvalidateEntry(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2583
void PaintEntry(SvxIconChoiceCtrlEntry *, const Point &, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1443
long CalcBoundingWidth() const
Definition: imivctl1.cxx:1693
const long LONG_MAX
long GetScrollBarLineSize() const
Definition: imivctl.hxx:177
SvxIconChoiceCtrlEntry * GoPageUpDown(SvxIconChoiceCtrlEntry *, bool bDown)
Definition: imivctl2.cxx:332
bool IsMnemonicChar(sal_Unicode cChar, sal_uLong &rPos) const
Definition: imivctl1.cxx:2542
bool RequestHelp(const HelpEvent &rHEvt)
Definition: imivctl1.cxx:2823
void ImplCreate()
Definition: imivctl2.cxx:63
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos) const
Definition: imivctl.hxx:384
tools::Rectangle CalcTextRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr, const OUString *pStr=nullptr)
Definition: imivctl1.cxx:1652
VclPtr< ScrollBarBox > aScrBarBox
Definition: imivctl.hxx:117
void RemoveEntry(size_t nPos)
Definition: imivctl1.cxx:228
void ToDocPos(Point &rPosPixel)
Definition: imivctl.hxx:182
const tools::Rectangle & GetEntryBoundRect(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1618
void ShowCursor(bool bShow)
Definition: imivctl1.cxx:1846
IconChoiceFlags
Definition: imivctl.hxx:53
SvxIconChoiceCtrlTextMode
Definition: ivctrl.hxx:47
SvxIconChoiceCtrlEntry * pCursor
Definition: imivctl.hxx:143
DECL_LINK(ScrollUpDownHdl, ScrollBar *, void)
SvxIconChoiceCtrlEntry * FindEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, const Point &)
Definition: imivctl1.cxx:2775
SvxIconChoiceCtrl_Impl & operator=(const SvxIconChoiceCtrl_Impl &)=delete
short nDeltaWidth
Definition: imivctl.hxx:426
void SetUpdateMode(bool bUpdate)
Definition: imivctl1.cxx:1374
void Create()
Definition: imivctl.hxx:431
tools::Rectangle CalcBmpRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr)
Definition: imivctl1.cxx:1625
void SelectEntry(SvxIconChoiceCtrlEntry *, bool bSelect, bool bAddToSelection=false)
Definition: imivctl1.cxx:287
void Scroll(long nDeltaX, long nDeltaY)
Definition: imivctl1.cxx:2239
SvxIconChoiceCtrlEntry * pCurEntry
Definition: imivctl.hxx:428
void CreateAutoMnemonics(MnemonicGenerator *_pGenerator)
Definition: imivctl1.cxx:235
IcnGridMap_Impl(SvxIconChoiceCtrl_Impl *pView)
Definition: imivctl2.cxx:477
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: imivctl1.cxx:514
const Point & GetOrigin() const
Definition: mapmod.cxx:170
void SetEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, SvxIconChoiceCtrlEntry *pPredecessor)
Definition: imivctl1.cxx:2727
std::vector< tools::Rectangle > aSelectedRectList
Definition: imivctl.hxx:119
IcnCursor_Impl(SvxIconChoiceCtrl_Impl *pOwner)
Definition: imivctl2.cxx:23
void InsertEntry(std::unique_ptr< SvxIconChoiceCtrlEntry >, size_t nPos)
Definition: imivctl1.cxx:190
void Arrange(bool bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight)
Definition: imivctl1.cxx:469
SvxIconChoiceCtrlEntry * pHead
Definition: imivctl.hxx:142
void Center(SvxIconChoiceCtrlEntry *pEntry) const
Definition: imivctl1.cxx:2220
void OutputSizeChanged()
Definition: imivctl2.cxx:673
void ClipAtVirtOutRect(tools::Rectangle &rRect) const
Definition: imivctl1.cxx:1967
void SetEntryHighlightFrame(SvxIconChoiceCtrlEntry *pEntry, bool bKeepHighlightFlags)
Definition: imivctl1.cxx:2914
sal_Int32 GetEntryListPos(SvxIconChoiceCtrlEntry const *) const
Definition: imivctl1.cxx:2651
Definition: timer.hxx:26
void SelectRange(SvxIconChoiceCtrlEntry const *pStart, SvxIconChoiceCtrlEntry const *pEnd, bool bAdd)
Definition: imivctl1.cxx:2389
short nDeltaHeight
Definition: imivctl.hxx:427
sal_uInt16 _nGridCols
Definition: imivctl.hxx:474
void SetCursor(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1817
void InvalidateBoundingRect(tools::Rectangle &rRect)
Definition: imivctl.hxx:331
tools::Rectangle _aLastOccupiedGrid
Definition: imivctl.hxx:471
std::unique_ptr< IconChoiceMap > xRows
Definition: imivctl.hxx:423
const SvxIconChoiceCtrlColumnInfo * GetColumn(sal_uInt16 nIndex) const
Definition: imivctl1.cxx:2884
void ToggleSelection(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2082
std::vector< SvxIconChoiceCtrlEntry * > SvxIconChoiceCtrlEntryPtrVec
Definition: imivctl.hxx:106
void GetMinMapSize(sal_uInt16 &rDX, sal_uInt16 &rDY) const
Definition: imivctl2.cxx:530
void SetSelectionMode(SelectionMode eMode)
Definition: imivctl.hxx:389
Size GetMinGrid() const
Definition: imivctl1.cxx:2106
sal_uInt16 _nGridRows
Definition: imivctl.hxx:474
GridId GetUnoccupiedGrid()
Definition: imivctl2.cxx:617
SvxIconChoiceCtrlPositionMode
Definition: ivctrl.hxx:53
void PaintItem(const tools::Rectangle &rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry *pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1415
bool HandleScrollCommand(const CommandEvent &rCmd)
Definition: imivctl1.cxx:1863
bool KeyInput(const KeyEvent &)
Definition: imivctl1.cxx:880
void ToTop(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1954
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:2283
const Size & GetItemSize(IcnViewFieldType) const
Definition: imivctl1.cxx:2252
long CalcBoundingHeight() const
Definition: imivctl1.cxx:1714
sal_Int32 GetSelectionCount() const
Definition: imivctl1.cxx:2075
void SetPositionMode(SvxIconChoiceCtrlPositionMode)
Definition: imivctl1.cxx:2694
void RecalcAllBoundingRectsSmart()
Definition: imivctl1.cxx:1746
void GetGridCoord(GridId, sal_uInt16 &rGridX, sal_uInt16 &rGridY)
Definition: imivctl2.cxx:699