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 <vcl/ivctrl.hxx>
24 #include <vcl/virdev.hxx>
25 #include <vcl/scrbar.hxx>
26 #include <vcl/timer.hxx>
27 #include <vcl/idle.hxx>
28 #include <vcl/vclptr.hxx>
29 #include <tools/debug.hxx>
31 
32 #include <limits.h>
33 
34 
35 #include <memory>
36 #include <map>
37 
38 class IcnCursor_Impl;
39 class SvtIconChoiceCtrl;
41 class IcnViewEdit_Impl;
42 class IcnGridMap_Impl;
43 
44 
45 // some defines
46 
47 #define PAINTFLAG_HOR_CENTERED 0x0001
48 #define PAINTFLAG_VER_CENTERED 0x0002
49 
50 enum class IconChoiceFlags {
51  NONE = 0x0000,
52  AddMode = 0x0001,
53  SelectingRect = 0x0002,
54  DownCtrl = 0x0004,
55  DownDeselect = 0x0008,
56  EntryListPosValid = 0x0010,
57  ClearingSelection = 0x0020,
58  Arranging = 0x0040
59 };
60 namespace o3tl {
61  template<> struct typed_flags<IconChoiceFlags> : is_typed_flags<IconChoiceFlags, 0x007f> {};
62 }
63 
64 // unit = pixels
65 // distances from window borders
66 #define LROFFS_WINBORDER 4
67 #define TBOFFS_WINBORDER 4
68 // for the bounding rectangle
69 #define LROFFS_BOUND 2
70 #define TBOFFS_BOUND 2
71 // distance icon to text
72 #define HOR_DIST_BMP_STRING 3
73 #define VER_DIST_BMP_STRING 3
74 // width offset of highlight rectangle for Text
75 #define LROFFS_TEXT 2
76 
77 #define DEFAULT_MAX_VIRT_WIDTH 200
78 #define DEFAULT_MAX_VIRT_HEIGHT 200
79 
80 #define VIEWMODE_MASK (WB_ICON | WB_SMALLICON | WB_DETAILS)
81 
82 
83 enum class IcnViewFieldType
84 {
85  Image,
86  Text
87 };
88 
89 
90 // Data about the focus of entries
91 
92 struct LocalFocus
93 {
96 };
97 
98 
99 // Implementation-class of IconChoiceCtrl
100 
101 
102 typedef std::map<sal_uInt16, std::unique_ptr<SvxIconChoiceCtrlColumnInfo>> SvxIconChoiceCtrlColumnInfoMap;
103 typedef std::vector<SvxIconChoiceCtrlEntry*> SvxIconChoiceCtrlEntryPtrVec;
104 
106 {
107  friend class IcnCursor_Impl;
108  friend class IcnGridMap_Impl;
109 
111  std::vector< std::unique_ptr<SvxIconChoiceCtrlEntry> > maEntries;
116  std::vector<tools::Rectangle> aSelectedRectList;
124  Size aOutputSize; // Pixel
126  std::unique_ptr<IcnCursor_Impl> pImpCursor;
127  std::unique_ptr<IcnGridMap_Impl> pGridMap;
128  long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP
129  long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT
130  std::vector< SvxIconChoiceCtrlEntry* > maZOrderList;
131  std::unique_ptr<SvxIconChoiceCtrlColumnInfoMap> m_pColumns;
133  long nMaxBoundHeight; // height of highest BoundRects
139  SvxIconChoiceCtrlEntry* pHead = nullptr; // top left entry
146  SvxIconChoiceCtrlEntry* pAnchor; // for selection
147  LocalFocus aFocus; // Data for focusrect
149 
152  sal_Int32 nSelectionCount;
156 
157  void ShowCursor( bool bShow );
158 
159  void ImpArrange( bool bKeepPredecessors );
160  void AdjustVirtSize( const tools::Rectangle& );
161  void ResetVirtSize();
162  void CheckScrollBars();
163 
164  DECL_LINK( ScrollUpDownHdl, ScrollBar*, void );
165  DECL_LINK( ScrollLeftRightHdl, ScrollBar*, void );
166  DECL_LINK( UserEventHdl, void*, void );
167  DECL_LINK( AutoArrangeHdl, Timer*, void );
168  DECL_LINK( DocRectChangedHdl, Timer*, void );
169  DECL_LINK( VisRectChangedHdl, Timer*, void );
170  DECL_LINK( CallSelectHdlHdl, Timer*, void );
171 
172  void AdjustScrollBars();
173  void PositionScrollBars( long nRealWidth, long nRealHeight );
174  static long GetScrollBarPageSize( long nVisibleRange )
175  {
176  return ((nVisibleRange*75)/100);
177  }
178  long GetScrollBarLineSize() const
179  {
180  return nMaxBoundHeight / 2;
181  }
182  bool HandleScrollCommand( const CommandEvent& rCmd );
183  void ToDocPos( Point& rPosPixel )
184  {
185  rPosPixel -= pView->GetMapMode().GetOrigin();
186  }
187  void InitScrollBarBox();
189  void DeselectAllBut( SvxIconChoiceCtrlEntry const * );
190  void Center( SvxIconChoiceCtrlEntry* pEntry ) const;
191  void CallSelectHandler();
192  void SelectRect(
193  SvxIconChoiceCtrlEntry* pEntry1,
194  SvxIconChoiceCtrlEntry* pEntry2,
195  bool bAdd,
196  std::vector<tools::Rectangle>* pOtherRects
197  );
198 
199  void SelectRange(
200  SvxIconChoiceCtrlEntry const * pStart,
201  SvxIconChoiceCtrlEntry const * pEnd,
202  bool bAdd
203  );
204 
205  void AddSelectedRect( const tools::Rectangle& );
206  void AddSelectedRect(
207  SvxIconChoiceCtrlEntry* pEntry1,
208  SvxIconChoiceCtrlEntry* pEntry2
209  );
210 
211  void ClearSelectedRectList();
212  void ClearColumnList();
214 
215  void ClipAtVirtOutRect( tools::Rectangle& rRect ) const;
216  sal_uLong GetPredecessorGrid( const Point& rDocPos) const;
217 
218  void InitPredecessors();
219  void ClearPredecessors();
220 
221  bool CheckVerScrollBar();
222  bool CheckHorScrollBar();
223  void CancelUserEvents();
224  void EntrySelected(
225  SvxIconChoiceCtrlEntry* pEntry,
226  bool bSelect
227  );
228  void RepaintSelectedEntries();
229  void SetListPositions();
230  void SetDefaultTextSize();
231  bool IsAutoArrange() const
232  {
233  return (ePositionMode == SvxIconChoiceCtrlPositionMode::AutoArrange);
234  }
235  void DocRectChanged() { aDocRectChangedIdle.Start(); }
236  void VisRectChanged() { aVisRectChangedIdle.Start(); }
237  void SetOrigin( const Point& );
238 
239  DECL_LINK(TextEditEndedHdl, LinkParamNone*, void);
240 
241  void ShowFocus ( tools::Rectangle const & rRect );
242  void DrawFocusRect(vcl::RenderContext& rRenderContext);
243 
244  bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const;
245 
246  // Copy assignment is forbidden and not implemented.
249 
250 public:
251 
252  long nGridDX;
253  long nGridDY;
256 
257  SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
259 
260  void SetChoiceWithCursor() { bChooseWithCursor = true; }
261  void Clear( bool bInCtor );
262  void SetStyle( WinBits nWinStyle );
263  WinBits GetStyle() const { return nWinBits; }
264  void InsertEntry( std::unique_ptr<SvxIconChoiceCtrlEntry>, size_t nPos );
265  void RemoveEntry( size_t nPos );
266  void CreateAutoMnemonics( MnemonicGenerator* _pGenerator );
267  void FontModified();
268  void SelectAll();
269  void SelectEntry(
271  bool bSelect,
272  bool bAddToSelection = false
273  );
274  void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
275  bool MouseButtonDown( const MouseEvent& );
276  bool MouseButtonUp( const MouseEvent& );
277  bool MouseMove( const MouseEvent&);
278  bool RequestHelp( const HelpEvent& rHEvt );
279  void SetCursor_Impl(
280  SvxIconChoiceCtrlEntry* pOldCursor,
281  SvxIconChoiceCtrlEntry* pNewCursor,
282  bool bMod1,
283  bool bShift
284  );
285  bool KeyInput( const KeyEvent& );
286  void Resize();
287  void GetFocus();
288  void LoseFocus();
289  void SetUpdateMode( bool bUpdate );
290  bool GetUpdateMode() const { return bUpdateMode; }
291  void PaintEntry(SvxIconChoiceCtrlEntry*, const Point&, vcl::RenderContext& rRenderContext);
292 
293  void SetEntryPos(
294  SvxIconChoiceCtrlEntry* pEntry,
295  const Point& rPos
296  );
297 
299 
300  void SetNoSelection();
301 
304 
305  SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false );
306 
307  void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, bool bBound = true );
308 
309  void Arrange(
310  bool bKeepPredecessors,
311  long nSetMaxVirtWidth,
312  long nSetMaxVirtHeight
313  );
314 
316  tools::Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = nullptr );
319  const Point* pPos = nullptr,
320  const OUString* pStr = nullptr
321  );
322 
323  long CalcBoundingWidth() const;
324  long CalcBoundingHeight() const;
325  Size CalcBoundingSize() const;
328  SvxIconChoiceCtrlEntry* pEntry,
329  const Point& rPos,
330  const Size& rBoundingSize
331  );
332  // recalculates all invalid BoundRects
336  {
337  rRect.SetRight(LONG_MAX);
338  bBoundRectsDirty = true;
339  }
340  static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); }
341 
342  static void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected,
343  vcl::RenderContext& rRenderContext );
344 
345  void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry,
346  sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext);
347 
348  // recalculates all BoundingRects if bMustRecalcBoundingRects == true
349  void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); }
350  void Command( const CommandEvent& rCEvt );
351  void ToTop( SvxIconChoiceCtrlEntry* );
352 
353  sal_Int32 GetSelectionCount() const;
354  void SetGrid( const Size& );
355  Size GetMinGrid() const;
356  void Scroll( long nDeltaX, long nDeltaY );
357  const Size& GetItemSize( IcnViewFieldType ) const;
358 
359  void HideDDIcon();
360 
361  static bool IsOver(
362  std::vector<tools::Rectangle>* pSelectedRectList,
363  const tools::Rectangle& rEntryBoundRect
364  );
365 
366  void SelectRect(
367  const tools::Rectangle&,
368  bool bAdd,
369  std::vector<tools::Rectangle>* pOtherRects
370  );
371 
372  void MakeVisible(
373  const tools::Rectangle& rDocPos,
374  bool bInScrollBarEvent=false
375  );
376 
377 #ifdef DBG_UTIL
378  void SetEntryTextMode(
380  SvxIconChoiceCtrlEntry* pEntry
381  );
382 #endif
383  size_t GetEntryCount() const { return maEntries.size(); }
385  {
386  return maEntries[ nPos ].get();
387  }
388  SvxIconChoiceCtrlEntry* GetEntry( size_t nPos ) const
389  {
390  return maEntries[ nPos ].get();
391  }
393  void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; }
394  sal_Int32 GetEntryListPos( SvxIconChoiceCtrlEntry const * ) const;
395  void InitSettings();
397 
399  // only delivers valid results when in AutoArrange mode!
401 
403 
404  void SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& );
405  const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const;
406 
408  SvxIconChoiceCtrlEntry* pEntry,
409  bool bKeepHighlightFlags
410  );
411  void DrawHighlightFrame(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBmpRect);
412 
413  void CallEventListeners( VclEventId nEvent, void* pData );
414 
416  {
417  return aAccFactory.getFactory();
418  }
419 };
420 
421 typedef std::map<sal_uInt16, SvxIconChoiceCtrlEntryPtrVec> IconChoiceMap;
422 
424 {
426  std::unique_ptr<IconChoiceMap> xColumns;
427  std::unique_ptr<IconChoiceMap> xRows;
428  long nCols;
429  long nRows;
430  short nDeltaWidth;
433  void SetDeltas();
434  void ImplCreate();
435  void Create() { if( !xColumns ) ImplCreate(); }
436 
437  sal_uInt16 GetSortListPos(
439  long nValue,
440  bool bVertical);
442  sal_uInt16 nCol,
443  sal_uInt16 nTop,
444  sal_uInt16 nBottom,
445  bool bDown,
446  bool bSimple
447  );
448 
450  sal_uInt16 nRow,
451  sal_uInt16 nLeft,
452  sal_uInt16 nRight,
453  bool bRight,
454  bool bSimple
455  );
456 
457 public:
458  explicit IcnCursor_Impl( SvxIconChoiceCtrl_Impl* pOwner );
459  ~IcnCursor_Impl();
460  void Clear();
461 
462  // for Cursortravelling etc.
466 };
467 
468 
470 
471 #define GRID_NOT_FOUND ((GridId)ULONG_MAX)
472 
474 {
477  std::unique_ptr<bool[]> _pGridMap;
478  sal_uInt16 _nGridCols, _nGridRows;
479 
480  void Expand();
481  void Create_Impl();
482  void Create() { if(!_pGridMap) Create_Impl(); }
483 
484  void GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const;
485 
486 public:
487  explicit IcnGridMap_Impl(SvxIconChoiceCtrl_Impl* pView);
489 
490  void Clear();
491 
492  GridId GetGrid( const Point& rDocPos );
493  GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY );
495 
496  void OccupyGrids( const SvxIconChoiceCtrlEntry* );
497  void OccupyGrid( GridId nId )
498  {
499  DBG_ASSERT(!_pGridMap || nId<static_cast<sal_uLong>(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
500  if(_pGridMap && nId < static_cast<sal_uLong>(_nGridCols *_nGridRows) )
501  _pGridMap[ nId ] = true;
502  }
503 
505  void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY );
506  static sal_uLong GetGridCount(
507  const Size& rSizePixel,
508  sal_uInt16 nGridWidth,
509  sal_uInt16 nGridHeight
510  );
511 
512  void OutputSizeChanged();
513 };
514 
515 #endif
516 
517 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetEntryPos(SvxIconChoiceCtrlEntry *pEntry, const Point &rPos)
Definition: imivctl1.cxx:1542
void MakeVisible(const tools::Rectangle &rDocPos, bool bInScrollBarEvent=false)
Definition: imivctl1.cxx:2011
::vcl::IAccessibleFactory & GetAccessibleFactory()
Definition: imivctl.hxx:415
tools::Rectangle aRect
Definition: imivctl.hxx:94
void DrawHighlightFrame(vcl::RenderContext &rRenderContext, const tools::Rectangle &rBmpRect)
Definition: imivctl1.cxx:2927
SvxIconChoiceCtrlEntry * GoUpDown(SvxIconChoiceCtrlEntry *, bool bDown)
Definition: imivctl2.cxx:392
static bool IsOver(std::vector< tools::Rectangle > *pSelectedRectList, const tools::Rectangle &rEntryBoundRect)
Definition: imivctl1.cxx:2463
void ShowFocus(tools::Rectangle const &rRect)
Definition: imivctl1.cxx:2540
SvxIconChoiceCtrl_Impl(const SvxIconChoiceCtrl_Impl &)=delete
std::unique_ptr< IcnGridMap_Impl > pGridMap
Definition: imivctl.hxx:127
Size const aImageSize
Definition: imivctl.hxx:122
WinBits GetStyle() const
Definition: imivctl.hxx:263
void DeselectAllBut(SvxIconChoiceCtrlEntry const *)
Definition: imivctl1.cxx:2117
void FindBoundingRect(SvxIconChoiceCtrlEntry *pEntry)
Definition: imivctl1.cxx:1813
GridId GetGrid(const Point &rDocPos)
Definition: imivctl2.cxx:583
SvxIconChoiceCtrl_Impl * pView
Definition: imivctl.hxx:425
SvxIconChoiceCtrlEntry * GetEntry(const Point &rDocPos, bool bHit=false)
Definition: imivctl1.cxx:1588
std::unique_ptr< SvxIconChoiceCtrlColumnInfoMap > m_pColumns
Definition: imivctl.hxx:131
void DrawFocusRect(vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:2554
sal_uIntPtr sal_uLong
SvxIconChoiceCtrl_Impl * _pView
Definition: imivctl.hxx:476
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:2484
static void PaintEmphasis(const tools::Rectangle &rRect1, bool bSelected, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1410
void Create_Impl()
Definition: imivctl2.cxx:512
SvxIconChoiceCtrlPositionMode ePositionMode
Definition: imivctl.hxx:153
void SetBoundingRect_Impl(SvxIconChoiceCtrlEntry *pEntry, const Point &rPos, const Size &rBoundingSize)
Definition: imivctl1.cxx:1826
sal_uLong GetPredecessorGrid(const Point &rDocPos) const
Definition: imivctl1.cxx:2826
ImplSVEvent * nUserEventAdjustScrBars
Definition: imivctl.hxx:136
const MapMode & GetMapMode() const
Definition: outdev.hxx:1674
SelectionMode
Definition: vclenum.hxx:26
std::vector< SvxIconChoiceCtrlEntry * > maZOrderList
Definition: imivctl.hxx:130
void MakeEntryVisible(SvxIconChoiceCtrlEntry *pEntry, bool bBound=true)
Definition: imivctl1.cxx:1619
IcnViewFieldType
Definition: imivctl.hxx:83
sal_uInt16 GetSortListPos(SvxIconChoiceCtrlEntryPtrVec &rList, long nValue, bool bVertical)
Definition: imivctl2.cxx:37
::vcl::AccessibleFactoryAccess aAccFactory
Definition: imivctl.hxx:148
std::map< sal_uInt16, SvxIconChoiceCtrlEntryPtrVec > IconChoiceMap
Definition: imivctl.hxx:421
std::map< sal_uInt16, std::unique_ptr< SvxIconChoiceCtrlColumnInfo > > SvxIconChoiceCtrlColumnInfoMap
Definition: imivctl.hxx:102
bool MouseMove(const MouseEvent &)
Definition: imivctl1.cxx:836
bool GetUpdateMode() const
Definition: imivctl.hxx:290
sal_Int32 nSelectionCount
Definition: imivctl.hxx:152
Size CalcBoundingSize() const
Definition: imivctl1.cxx:1761
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:287
bool IsAutoArrange() const
Definition: imivctl.hxx:231
SvxIconChoiceCtrlEntry * pHdlEntry
Definition: imivctl.hxx:141
void CallEventListeners(VclEventId nEvent, void *pData)
Definition: imivctl1.cxx:3007
sal_Int64 WinBits
sal_uInt16 sal_Unicode
long Right() const
VclPtr< ScrollBar > aHorSBar
Definition: imivctl.hxx:113
void OccupyGrids(const SvxIconChoiceCtrlEntry *)
Definition: imivctl2.cxx:648
VclPtr< VirtualDevice > pEntryPaintDev
Definition: imivctl.hxx:145
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos)
Definition: imivctl.hxx:384
tools::Rectangle CalcFocusRect(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2287
bool MouseButtonUp(const MouseEvent &)
Definition: imivctl1.cxx:784
void SetEntryTextMode(SvxIconChoiceCtrlTextMode, SvxIconChoiceCtrlEntry *pEntry)
Definition: imivctl1.cxx:2513
void PositionScrollBars(long nRealWidth, long nRealHeight)
Definition: imivctl1.cxx:1114
void SetOrigin(const Point &)
Definition: imivctl1.cxx:3000
DrawTextFlags nCurTextDrawFlags
Definition: imivctl.hxx:135
Color aPenColor
Definition: imivctl.hxx:95
SelectionMode eSelectionMode
Definition: imivctl.hxx:151
static bool IsBoundingRectValid(const tools::Rectangle &rRect)
Definition: imivctl.hxx:340
tools::Rectangle aCurSelectionRect
Definition: imivctl.hxx:115
VclPtr< VirtualDevice > pDDBufDev
Definition: imivctl.hxx:143
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:146
VclPtr< VirtualDevice > pDDTempDev
Definition: imivctl.hxx:144
void SetCursor_Impl(SvxIconChoiceCtrlEntry *pOldCursor, SvxIconChoiceCtrlEntry *pNewCursor, bool bMod1, bool bShift)
Definition: imivctl1.cxx:852
size_t GetEntryCount() const
Definition: imivctl.hxx:383
static long GetScrollBarPageSize(long nVisibleRange)
Definition: imivctl.hxx:174
VclPtr< SvtIconChoiceCtrl > pView
Definition: imivctl.hxx:125
sal_uLong GridId
Definition: imivctl.hxx:469
tools::Rectangle CalcMaxTextRect(const SvxIconChoiceCtrlEntry *pEntry) const
Definition: imivctl1.cxx:2180
void ImpArrange(bool bKeepPredecessors)
Definition: imivctl1.cxx:504
void AdjustVirtSize(const tools::Rectangle &)
Definition: imivctl1.cxx:419
void SetColumn(sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo &)
Definition: imivctl1.cxx:2900
SvxIconChoiceCtrlEntry * GoLeftRight(SvxIconChoiceCtrlEntry *, bool bRight)
Definition: imivctl2.cxx:284
void SetGrid(const Size &)
Definition: imivctl1.cxx:2154
SvxIconChoiceCtrlTextMode eTextMode
Definition: imivctl.hxx:150
IconChoiceFlags nFlags
Definition: imivctl.hxx:134
SvxIconChoiceCtrlEntry * pCurHighlightFrame
Definition: imivctl.hxx:137
SvxIconChoiceCtrlEntry * GetCurEntry() const
Definition: imivctl.hxx:302
tools::Rectangle GetGridRect(GridId)
Definition: imivctl2.cxx:606
void EntrySelected(SvxIconChoiceCtrlEntry *pEntry, bool bSelect)
Definition: imivctl1.cxx:344
void Clear(bool bInCtor)
Definition: imivctl1.cxx:136
#define DBG_ASSERT(sCon, aError)
std::unique_ptr< bool[]> _pGridMap
Definition: imivctl.hxx:477
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:666
std::unique_ptr< IcnCursor_Impl > pImpCursor
Definition: imivctl.hxx:126
std::vector< std::unique_ptr< SvxIconChoiceCtrlEntry > > maEntries
Definition: imivctl.hxx:111
VclPtr< VirtualDevice > pDDDev
Definition: imivctl.hxx:142
void SetRight(long v)
VclPtr< ScrollBar > aVerSBar
Definition: imivctl.hxx:112
bool MouseButtonDown(const MouseEvent &)
Definition: imivctl1.cxx:655
SvxIconChoiceCtrlEntry * GetFirstSelectedEntry() const
Definition: imivctl1.cxx:2622
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
void OccupyGrid(GridId nId)
Definition: imivctl.hxx:497
void SetStyle(WinBits nWinStyle)
Definition: imivctl1.cxx:170
void Command(const CommandEvent &rCEvt)
Definition: imivctl1.cxx:1970
DrawTextFlags
Definition: outdev.hxx:144
std::unique_ptr< IconChoiceMap > xColumns
Definition: imivctl.hxx:426
void InvalidateEntry(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2611
void PaintEntry(SvxIconChoiceCtrlEntry *, const Point &, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1463
long CalcBoundingWidth() const
Definition: imivctl1.cxx:1713
const long LONG_MAX
long GetScrollBarLineSize() const
Definition: imivctl.hxx:178
SvxIconChoiceCtrlEntry * GoPageUpDown(SvxIconChoiceCtrlEntry *, bool bDown)
Definition: imivctl2.cxx:332
bool IsMnemonicChar(sal_Unicode cChar, sal_uLong &rPos) const
Definition: imivctl1.cxx:2570
bool RequestHelp(const HelpEvent &rHEvt)
Definition: imivctl1.cxx:2851
void ImplCreate()
Definition: imivctl2.cxx:63
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos) const
Definition: imivctl.hxx:388
tools::Rectangle CalcTextRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr, const OUString *pStr=nullptr)
Definition: imivctl1.cxx:1672
VclPtr< ScrollBarBox > aScrBarBox
Definition: imivctl.hxx:114
void RemoveEntry(size_t nPos)
Definition: imivctl1.cxx:248
void ToDocPos(Point &rPosPixel)
Definition: imivctl.hxx:183
const tools::Rectangle & GetEntryBoundRect(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1638
void ShowCursor(bool bShow)
Definition: imivctl1.cxx:1866
IconChoiceFlags
Definition: imivctl.hxx:50
SvxIconChoiceCtrlTextMode
Definition: ivctrl.hxx:47
SvxIconChoiceCtrlEntry * pCursor
Definition: imivctl.hxx:140
DECL_LINK(ScrollUpDownHdl, ScrollBar *, void)
SvxIconChoiceCtrlEntry * FindEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, const Point &)
Definition: imivctl1.cxx:2803
SvxIconChoiceCtrl_Impl & operator=(const SvxIconChoiceCtrl_Impl &)=delete
short nDeltaWidth
Definition: imivctl.hxx:430
void SetUpdateMode(bool bUpdate)
Definition: imivctl1.cxx:1394
void Create()
Definition: imivctl.hxx:435
tools::Rectangle CalcBmpRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr)
Definition: imivctl1.cxx:1645
void SelectEntry(SvxIconChoiceCtrlEntry *, bool bSelect, bool bAddToSelection=false)
Definition: imivctl1.cxx:307
void Scroll(long nDeltaX, long nDeltaY)
Definition: imivctl1.cxx:2267
SvxIconChoiceCtrlEntry * pCurEntry
Definition: imivctl.hxx:432
void CreateAutoMnemonics(MnemonicGenerator *_pGenerator)
Definition: imivctl1.cxx:255
IcnGridMap_Impl(SvxIconChoiceCtrl_Impl *pView)
Definition: imivctl2.cxx:477
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: imivctl1.cxx:534
const Point & GetOrigin() const
Definition: mapmod.cxx:165
void SetEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, SvxIconChoiceCtrlEntry *pPredecessor)
Definition: imivctl1.cxx:2755
std::vector< tools::Rectangle > aSelectedRectList
Definition: imivctl.hxx:116
IcnCursor_Impl(SvxIconChoiceCtrl_Impl *pOwner)
Definition: imivctl2.cxx:23
void InsertEntry(std::unique_ptr< SvxIconChoiceCtrlEntry >, size_t nPos)
Definition: imivctl1.cxx:210
void Arrange(bool bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight)
Definition: imivctl1.cxx:489
SvxIconChoiceCtrlEntry * pHead
Definition: imivctl.hxx:139
void Center(SvxIconChoiceCtrlEntry *pEntry) const
Definition: imivctl1.cxx:2248
void OutputSizeChanged()
Definition: imivctl2.cxx:675
void ClipAtVirtOutRect(tools::Rectangle &rRect) const
Definition: imivctl1.cxx:1995
void SetEntryHighlightFrame(SvxIconChoiceCtrlEntry *pEntry, bool bKeepHighlightFlags)
Definition: imivctl1.cxx:2947
sal_Int32 GetEntryListPos(SvxIconChoiceCtrlEntry const *) const
Definition: imivctl1.cxx:2679
Definition: timer.hxx:26
void SelectRange(SvxIconChoiceCtrlEntry const *pStart, SvxIconChoiceCtrlEntry const *pEnd, bool bAdd)
Definition: imivctl1.cxx:2417
short nDeltaHeight
Definition: imivctl.hxx:431
sal_uInt16 _nGridCols
Definition: imivctl.hxx:478
void SetCursor(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1837
void InvalidateBoundingRect(tools::Rectangle &rRect)
Definition: imivctl.hxx:335
tools::Rectangle _aLastOccupiedGrid
Definition: imivctl.hxx:475
std::unique_ptr< IconChoiceMap > xRows
Definition: imivctl.hxx:427
const SvxIconChoiceCtrlColumnInfo * GetColumn(sal_uInt16 nIndex) const
Definition: imivctl1.cxx:2917
void ToggleSelection(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:2110
std::vector< SvxIconChoiceCtrlEntry * > SvxIconChoiceCtrlEntryPtrVec
Definition: imivctl.hxx:103
void GetMinMapSize(sal_uInt16 &rDX, sal_uInt16 &rDY) const
Definition: imivctl2.cxx:532
void SetSelectionMode(SelectionMode eMode)
Definition: imivctl.hxx:393
Size GetMinGrid() const
Definition: imivctl1.cxx:2134
sal_uInt16 _nGridRows
Definition: imivctl.hxx:478
GridId GetUnoccupiedGrid()
Definition: imivctl2.cxx:619
SvxIconChoiceCtrlPositionMode
Definition: ivctrl.hxx:53
void PaintItem(const tools::Rectangle &rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry *pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext &rRenderContext)
Definition: imivctl1.cxx:1435
bool HandleScrollCommand(const CommandEvent &rCmd)
Definition: imivctl1.cxx:1891
bool KeyInput(const KeyEvent &)
Definition: imivctl1.cxx:900
void ToTop(SvxIconChoiceCtrlEntry *)
Definition: imivctl1.cxx:1982
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:2311
const Size & GetItemSize(IcnViewFieldType) const
Definition: imivctl1.cxx:2280
long CalcBoundingHeight() const
Definition: imivctl1.cxx:1734
sal_Int32 GetSelectionCount() const
Definition: imivctl1.cxx:2103
void SetPositionMode(SvxIconChoiceCtrlPositionMode)
Definition: imivctl1.cxx:2722
void RecalcAllBoundingRectsSmart()
Definition: imivctl1.cxx:1766
void GetGridCoord(GridId, sal_uInt16 &rGridX, sal_uInt16 &rGridY)
Definition: imivctl2.cxx:701