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 
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 
113  std::vector< std::unique_ptr<SvxIconChoiceCtrlEntry> > maEntries;
118  std::vector<tools::Rectangle> aSelectedRectList;
126  Size aOutputSize; // Pixel
128  std::unique_ptr<IcnCursor_Impl> pImpCursor;
129  std::unique_ptr<IcnGridMap_Impl> pGridMap;
130  long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP
131  long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT
132  std::vector< SvxIconChoiceCtrlEntry* > maZOrderList;
133  std::unique_ptr<SvxIconChoiceCtrlColumnInfoMap> m_pColumns;
135  long nMaxBoundHeight; // height of highest BoundRects
141  SvxIconChoiceCtrlEntry* pHead = nullptr; // top left entry
144  SvxIconChoiceCtrlEntry* pAnchor; // for selection
145  LocalFocus aFocus; // Data for focusrect
146  ::vcl::AccessibleFactoryAccess aAccFactory;
147 
150  sal_Int32 nSelectionCount;
154 
155  void ShowCursor( bool bShow );
156 
157  void ImpArrange( bool bKeepPredecessors );
158  void AdjustVirtSize( const tools::Rectangle& );
159  void ResetVirtSize();
160  void CheckScrollBars();
161 
162  DECL_LINK( ScrollUpDownHdl, ScrollBar*, void );
163  DECL_LINK( ScrollLeftRightHdl, ScrollBar*, void );
164  DECL_LINK( UserEventHdl, void*, void );
165  DECL_LINK( AutoArrangeHdl, Timer*, void );
166  DECL_LINK( DocRectChangedHdl, Timer*, void );
167  DECL_LINK( VisRectChangedHdl, Timer*, void );
168  DECL_LINK( CallSelectHdlHdl, Timer*, void );
169 
170  void AdjustScrollBars();
171  void PositionScrollBars( long nRealWidth, long nRealHeight );
172  static long GetScrollBarPageSize( long nVisibleRange )
173  {
174  return ((nVisibleRange*75)/100);
175  }
176  long GetScrollBarLineSize() const
177  {
178  return nMaxBoundHeight / 2;
179  }
180  bool HandleScrollCommand( const CommandEvent& rCmd );
181  void ToDocPos( Point& rPosPixel )
182  {
183  rPosPixel -= pView->GetMapMode().GetOrigin();
184  }
185  void InitScrollBarBox();
187  void DeselectAllBut( SvxIconChoiceCtrlEntry const * );
188  void Center( SvxIconChoiceCtrlEntry* pEntry ) const;
189  void CallSelectHandler();
190  void SelectRect(
191  SvxIconChoiceCtrlEntry* pEntry1,
192  SvxIconChoiceCtrlEntry* pEntry2,
193  bool bAdd,
194  std::vector<tools::Rectangle>* pOtherRects
195  );
196 
197  void SelectRange(
198  SvxIconChoiceCtrlEntry const * pStart,
199  SvxIconChoiceCtrlEntry const * pEnd,
200  bool bAdd
201  );
202 
203  void AddSelectedRect( const tools::Rectangle& );
204  void AddSelectedRect(
205  SvxIconChoiceCtrlEntry* pEntry1,
206  SvxIconChoiceCtrlEntry* pEntry2
207  );
208 
209  void ClearSelectedRectList();
211 
212  void ClipAtVirtOutRect( tools::Rectangle& rRect ) const;
213  sal_uLong GetPredecessorGrid( const Point& rDocPos) const;
214 
215  void InitPredecessors();
216  void ClearPredecessors();
217 
218  bool CheckVerScrollBar();
219  bool CheckHorScrollBar();
220  void CancelUserEvents();
221  void EntrySelected(
222  SvxIconChoiceCtrlEntry* pEntry,
223  bool bSelect
224  );
225  void RepaintSelectedEntries();
226  void SetListPositions();
227  void SetDefaultTextSize();
228  bool IsAutoArrange() const
229  {
230  return (ePositionMode == SvxIconChoiceCtrlPositionMode::AutoArrange);
231  }
232  void DocRectChanged() { aDocRectChangedIdle.Start(); }
233  void VisRectChanged() { aVisRectChangedIdle.Start(); }
234  void SetOrigin( const Point& );
235 
236  void ShowFocus ( tools::Rectangle const & rRect );
237  void DrawFocusRect(vcl::RenderContext& rRenderContext);
238 
239  bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const;
240 
241  // Copy assignment is forbidden and not implemented.
244 
245 public:
246 
247  long nGridDX;
248  long nGridDY;
251 
252  SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
254 
255  void Clear( bool bInCtor );
256  void SetStyle( WinBits nWinStyle );
257  WinBits GetStyle() const { return nWinBits; }
258  void InsertEntry( std::unique_ptr<SvxIconChoiceCtrlEntry>, size_t nPos );
259  void RemoveEntry( size_t nPos );
260  void FontModified();
261  void SelectAll();
262  void SelectEntry(
264  bool bSelect,
265  bool bAddToSelection = false
266  );
267  void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
268  bool MouseButtonDown( const MouseEvent& );
269  bool MouseButtonUp( const MouseEvent& );
270  bool MouseMove( const MouseEvent&);
271  bool RequestHelp( const HelpEvent& rHEvt );
272  void SetCursor_Impl(
273  SvxIconChoiceCtrlEntry* pOldCursor,
274  SvxIconChoiceCtrlEntry* pNewCursor,
275  bool bMod1,
276  bool bShift
277  );
278  bool KeyInput( const KeyEvent& );
279  void Resize();
280  void GetFocus();
281  void LoseFocus();
282  void SetUpdateMode( bool bUpdate );
283  bool GetUpdateMode() const { return bUpdateMode; }
284  void PaintEntry(SvxIconChoiceCtrlEntry*, const Point&, vcl::RenderContext& rRenderContext);
285 
286  void SetEntryPos(
287  SvxIconChoiceCtrlEntry* pEntry,
288  const Point& rPos
289  );
290 
292 
293  void SetNoSelection();
294 
297 
298  SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false );
299 
300  void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound = true );
301 
302  void Arrange(
303  bool bKeepPredecessors,
304  long nSetMaxVirtWidth,
305  long nSetMaxVirtHeight
306  );
307 
309  tools::Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr );
312  const Point* pPos = nullptr,
313  const OUString* pStr = nullptr
314  );
315 
316  long CalcBoundingWidth() const;
317  long CalcBoundingHeight() const;
318  Size CalcBoundingSize() const;
321  SvxIconChoiceCtrlEntry* pEntry,
322  const Point& rPos,
323  const Size& rBoundingSize
324  );
325  // recalculates all invalid BoundRects
329  {
330  rRect.SetRight(LONG_MAX);
331  bBoundRectsDirty = true;
332  }
333  static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); }
334 
335  static void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected,
336  vcl::RenderContext& rRenderContext );
337 
338  void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry,
339  sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext);
340 
341  // recalculates all BoundingRects if bMustRecalcBoundingRects == true
342  void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); }
343  void Command( const CommandEvent& rCEvt );
344  void ToTop( SvxIconChoiceCtrlEntry* );
345 
346  sal_Int32 GetSelectionCount() const;
347  void SetGrid( const Size& );
348  Size GetMinGrid() const;
349  void Scroll( long nDeltaX, long nDeltaY );
350  const Size& GetItemSize( IcnViewFieldType ) const;
351 
352  void HideDDIcon();
353 
354  static bool IsOver(
355  std::vector<tools::Rectangle>* pSelectedRectList,
356  const tools::Rectangle& rEntryBoundRect
357  );
358 
359  void SelectRect(
360  const tools::Rectangle&,
361  bool bAdd,
362  std::vector<tools::Rectangle>* pOtherRects
363  );
364 
365  void MakeVisible(
366  const tools::Rectangle& rDocPos,
367  bool bInScrollBarEvent=false
368  );
369 
370 #ifdef DBG_UTIL
371  void SetEntryTextMode(
373  SvxIconChoiceCtrlEntry* pEntry
374  );
375 #endif
376  size_t GetEntryCount() const { return maEntries.size(); }
378  {
379  return maEntries[ nPos ].get();
380  }
381  SvxIconChoiceCtrlEntry* GetEntry( size_t nPos ) const
382  {
383  return maEntries[ nPos ].get();
384  }
386  sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry const * ) const;
387  void InitSettings();
389 
391  // only delivers valid results when in AutoArrange mode!
393 
395 
396  void SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& );
397  const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const;
398 
400  SvxIconChoiceCtrlEntry* pEntry,
401  bool bKeepHighlightFlags
402  );
403  void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect);
404 
405  void CallEventListeners( VclEventId nEvent, void* pData );
406 
408  {
409  return aAccFactory.getFactory();
410  }
411 };
412 
413 typedef std::map<sal_uInt16, SvxIconChoiceCtrlEntryPtrVec> IconChoiceMap;
414 
416 {
418  std::unique_ptr<IconChoiceMap> xColumns;
419  std::unique_ptr<IconChoiceMap> xRows;
420  long nCols;
421  long nRows;
422  short nDeltaWidth;
425  void SetDeltas();
426  void ImplCreate();
427  void Create() { if( !xColumns ) ImplCreate(); }
428 
429  sal_uInt16 GetSortListPos(
431  long nValue,
432  bool bVertical);
434  sal_uInt16 nCol,
435  sal_uInt16 nTop,
436  sal_uInt16 nBottom,
437  bool bDown,
438  bool bSimple
439  );
440 
442  sal_uInt16 nRow,
443  sal_uInt16 nLeft,
444  sal_uInt16 nRight,
445  bool bRight,
446  bool bSimple
447  );
448 
449 public:
450  explicit IcnCursor_Impl( SvxIconChoiceCtrl_Impl* pOwner );
451  ~IcnCursor_Impl();
452  void Clear();
453 
454  // for Cursortravelling etc.
458 };
459 
460 
462 
463 #define GRID_NOT_FOUND ((GridId)ULONG_MAX)
464 
466 {
469  std::unique_ptr<bool[]> _pGridMap;
470  sal_uInt16 _nGridCols, _nGridRows;
471 
472  void Expand();
473  void Create_Impl();
474  void Create() { if(!_pGridMap) Create_Impl(); }
475 
476  void GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const;
477 
478 public:
479  explicit IcnGridMap_Impl(SvxIconChoiceCtrl_Impl* pView);
481 
482  void Clear();
483 
484  GridId GetGrid( const Point& rDocPos );
485  GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY );
487 
488  void OccupyGrids( const SvxIconChoiceCtrlEntry* );
489  void OccupyGrid( GridId nId )
490  {
491  DBG_ASSERT(!_pGridMap || nId<o3tl::make_unsigned(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
492  if(_pGridMap && nId < o3tl::make_unsigned(_nGridCols *_nGridRows) )
493  _pGridMap[ nId ] = true;
494  }
495 
497  void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY );
498  static sal_uLong GetGridCount(
499  const Size& rSizePixel,
500  sal_uInt16 nGridWidth,
501  sal_uInt16 nGridHeight
502  );
503 
504  void OutputSizeChanged();
505 };
506 
507 #endif
508 
509 /* 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:407
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:129
WinBits GetStyle() const
Definition: imivctl.hxx:257
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:417
SvxIconChoiceCtrlEntry * GetEntry(const Point &rDocPos, bool bHit=false)
Definition: imivctl1.cxx:1520
std::unique_ptr< SvxIconChoiceCtrlColumnInfoMap > m_pColumns
Definition: imivctl.hxx:133
void DrawFocusRect(vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:2477
sal_uIntPtr sal_uLong
SvxIconChoiceCtrl_Impl * _pView
Definition: imivctl.hxx:468
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
void Create_Impl()
Definition: imivctl2.cxx:510
SvxIconChoiceCtrlPositionMode ePositionMode
Definition: imivctl.hxx:151
void SetBoundingRect_Impl(SvxIconChoiceCtrlEntry *pEntry, const Point &rPos, const Size &rBoundingSize)
Definition: imivctl1.cxx:1758
sal_uLong GetPredecessorGrid(const Point &rDocPos) const
Definition: imivctl1.cxx:2749
ImplSVEvent * nUserEventAdjustScrBars
Definition: imivctl.hxx:138
const MapMode & GetMapMode() const
Definition: outdev.hxx:1677
SelectionMode
Definition: vclenum.hxx:26
std::vector< SvxIconChoiceCtrlEntry * > maZOrderList
Definition: imivctl.hxx:132
void MakeEntryVisible(SvxIconChoiceCtrlEntry *pEntry, bool bBound=true)
Definition: imivctl1.cxx:1551
IcnViewFieldType
Definition: imivctl.hxx:86
sal_uInt16 GetSortListPos(SvxIconChoiceCtrlEntryPtrVec &rList, long nValue, bool bVertical)
Definition: imivctl2.cxx:37
::vcl::AccessibleFactoryAccess aAccFactory
Definition: imivctl.hxx:146
std::map< sal_uInt16, SvxIconChoiceCtrlEntryPtrVec > IconChoiceMap
Definition: imivctl.hxx:413
std::map< sal_uInt16, std::unique_ptr< SvxIconChoiceCtrlColumnInfo > > SvxIconChoiceCtrlColumnInfoMap
Definition: imivctl.hxx:105
bool MouseMove(const MouseEvent &)
Definition: imivctl1.cxx:784
bool GetUpdateMode() const
Definition: imivctl.hxx:283
sal_Int32 nSelectionCount
Definition: imivctl.hxx:150
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:228
SvxIconChoiceCtrlEntry * pHdlEntry
Definition: imivctl.hxx:143
void CallEventListeners(VclEventId nEvent, void *pData)
Definition: imivctl1.cxx:2925
sal_Int64 WinBits
sal_uInt16 sal_Unicode
long Right() const
VclPtr< ScrollBar > aHorSBar
Definition: imivctl.hxx:115
void OccupyGrids(const SvxIconChoiceCtrlEntry *)
Definition: imivctl2.cxx:646
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos)
Definition: imivctl.hxx:377
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 PositionScrollBars(long nRealWidth, long nRealHeight)
Definition: imivctl1.cxx:1046
void SetOrigin(const Point &)
Definition: imivctl1.cxx:2918
DrawTextFlags nCurTextDrawFlags
Definition: imivctl.hxx:137
Color aPenColor
Definition: imivctl.hxx:98
SelectionMode eSelectionMode
Definition: imivctl.hxx:149
static bool IsBoundingRectValid(const tools::Rectangle &rRect)
Definition: imivctl.hxx:333
tools::Rectangle aCurSelectionRect
Definition: imivctl.hxx:117
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:144
void SetCursor_Impl(SvxIconChoiceCtrlEntry *pOldCursor, SvxIconChoiceCtrlEntry *pNewCursor, bool bMod1, bool bShift)
Definition: imivctl1.cxx:800
size_t GetEntryCount() const
Definition: imivctl.hxx:376
static long GetScrollBarPageSize(long nVisibleRange)
Definition: imivctl.hxx:172
VclPtr< SvtIconChoiceCtrl > pView
Definition: imivctl.hxx:127
sal_uLong GridId
Definition: imivctl.hxx:461
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
void SetGrid(const Size &)
Definition: imivctl1.cxx:2077
SvxIconChoiceCtrlTextMode eTextMode
Definition: imivctl.hxx:148
IconChoiceFlags nFlags
Definition: imivctl.hxx:136
SvxIconChoiceCtrlEntry * pCurHighlightFrame
Definition: imivctl.hxx:139
SvxIconChoiceCtrlEntry * GetCurEntry() const
Definition: imivctl.hxx:295
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:469
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:128
std::vector< std::unique_ptr< SvxIconChoiceCtrlEntry > > maEntries
Definition: imivctl.hxx:113
void SetRight(long v)
VclPtr< ScrollBar > aVerSBar
Definition: imivctl.hxx:114
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:489
void SetStyle(WinBits nWinStyle)
Definition: imivctl1.cxx:154
void Command(const CommandEvent &rCEvt)
Definition: imivctl1.cxx:1894
DrawTextFlags
Definition: outdev.hxx:142
std::unique_ptr< IconChoiceMap > xColumns
Definition: imivctl.hxx:418
void InvalidateEntry(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2534
void PaintEntry(SvxIconChoiceCtrlEntry *, const Point &, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1395
long CalcBoundingWidth() const
Definition: imivctl1.cxx:1645
const long LONG_MAX
long GetScrollBarLineSize() const
Definition: imivctl.hxx:176
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
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos) const
Definition: imivctl.hxx:381
tools::Rectangle CalcTextRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr, const OUString *pStr=nullptr)
Definition: imivctl1.cxx:1604
VclPtr< ScrollBarBox > aScrBarBox
Definition: imivctl.hxx:116
void RemoveEntry(size_t nPos)
Definition: imivctl1.cxx:228
void ToDocPos(Point &rPosPixel)
Definition: imivctl.hxx:181
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:142
DECL_LINK(ScrollUpDownHdl, ScrollBar *, void)
SvxIconChoiceCtrlEntry * FindEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, const Point &)
Definition: imivctl1.cxx:2726
SvxIconChoiceCtrl_Impl & operator=(const SvxIconChoiceCtrl_Impl &)=delete
short nDeltaWidth
Definition: imivctl.hxx:422
void SetUpdateMode(bool bUpdate)
Definition: imivctl1.cxx:1326
void Create()
Definition: imivctl.hxx:427
tools::Rectangle CalcBmpRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr)
Definition: imivctl1.cxx:1577
void SelectEntry(SvxIconChoiceCtrlEntry *, bool bSelect, bool bAddToSelection=false)
Definition: imivctl1.cxx:255
void Scroll(long nDeltaX, long nDeltaY)
Definition: imivctl1.cxx:2190
SvxIconChoiceCtrlEntry * pCurEntry
Definition: imivctl.hxx:424
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:118
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:437
SvxIconChoiceCtrlEntry * pHead
Definition: imivctl.hxx:141
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
void SelectRange(SvxIconChoiceCtrlEntry const *pStart, SvxIconChoiceCtrlEntry const *pEnd, bool bAdd)
Definition: imivctl1.cxx:2340
short nDeltaHeight
Definition: imivctl.hxx:423
sal_uInt16 _nGridCols
Definition: imivctl.hxx:470
void SetCursor(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1769
void InvalidateBoundingRect(tools::Rectangle &rRect)
Definition: imivctl.hxx:328
tools::Rectangle _aLastOccupiedGrid
Definition: imivctl.hxx:467
std::unique_ptr< IconChoiceMap > xRows
Definition: imivctl.hxx:419
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:106
void GetMinMapSize(sal_uInt16 &rDX, sal_uInt16 &rDY) const
Definition: imivctl2.cxx:530
Size GetMinGrid() const
Definition: imivctl1.cxx:2058
sal_uInt16 _nGridRows
Definition: imivctl.hxx:470
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
void ToTop(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1906
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
long CalcBoundingHeight() const
Definition: imivctl1.cxx:1666
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