20 #ifndef INCLUDED_SVTOOLS_SOURCE_CONTNR_IMIVCTL_HXX
21 #define INCLUDED_SVTOOLS_SOURCE_CONTNR_IMIVCTL_HXX
44 class IcnViewEdit_Impl;
50 #define PAINTFLAG_HOR_CENTERED 0x0001
51 #define PAINTFLAG_VER_CENTERED 0x0002
69 #define LROFFS_WINBORDER 4
70 #define TBOFFS_WINBORDER 4
72 #define LROFFS_BOUND 2
73 #define TBOFFS_BOUND 2
75 #define HOR_DIST_BMP_STRING 3
76 #define VER_DIST_BMP_STRING 3
80 #define DEFAULT_MAX_VIRT_WIDTH 200
81 #define DEFAULT_MAX_VIRT_HEIGHT 200
83 #define VIEWMODE_MASK (WB_ICON | WB_SMALLICON | WB_DETAILS)
104 #define GRID_NOT_FOUND (GridId(ULONG_MAX))
117 std::vector< std::unique_ptr<SvxIconChoiceCtrlEntry> >
maEntries;
178 return ((nVisibleRange*75)/100);
182 return nMaxBoundHeight / 2;
198 std::vector<tools::Rectangle>* pOtherRects
261 eSelectionMode = eMode;
264 void Clear(
bool bInCtor );
267 void InsertEntry( std::unique_ptr<SvxIconChoiceCtrlEntry>,
size_t nPos );
274 bool bAddToSelection =
false
312 bool bKeepPredecessors,
321 const Point* pPos =
nullptr,
322 const OUString* pStr =
nullptr
332 const Size& rBoundingSize
340 bBoundRectsDirty =
true;
364 std::vector<tools::Rectangle>* pSelectedRectList,
371 std::vector<tools::Rectangle>* pOtherRects
376 bool bInScrollBarEvent=
false
388 return maEntries[ nPos ].get();
392 return maEntries[ nPos ].get();
410 bool bKeepHighlightFlags
418 return aAccFactory.getFactory();
428 std::unique_ptr<IconChoiceMap>
xRows;
480 void GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY )
const;
497 _pGridMap[ nId ] =
true;
503 const Size& rSizePixel,
504 sal_uInt16 nGridWidth,
505 sal_uInt16 nGridHeight
void SetEntryPos(SvxIconChoiceCtrlEntry *pEntry, const Point &rPos)
void MakeVisible(const tools::Rectangle &rDocPos, bool bInScrollBarEvent=false)
::vcl::IAccessibleFactory & GetAccessibleFactory()
void CheckBoundingRects()
void DrawHighlightFrame(vcl::RenderContext &rRenderContext, const tools::Rectangle &rBmpRect)
SvxIconChoiceCtrlEntry * GoUpDown(SvxIconChoiceCtrlEntry *, bool bDown)
static bool IsOver(std::vector< tools::Rectangle > *pSelectedRectList, const tools::Rectangle &rEntryBoundRect)
void ShowFocus(tools::Rectangle const &rRect)
SvxIconChoiceCtrl_Impl(const SvxIconChoiceCtrl_Impl &)=delete
std::unique_ptr< IcnGridMap_Impl > pGridMap
tools::Long CalcBoundingWidth() const
static tools::Long GetScrollBarPageSize(tools::Long nVisibleRange)
GridId GetPredecessorGrid(const Point &rDocPos) const
void DeselectAllBut(SvxIconChoiceCtrlEntry const *)
void FindBoundingRect(SvxIconChoiceCtrlEntry *pEntry)
GridId GetGrid(const Point &rDocPos)
SvxIconChoiceCtrl_Impl * pView
SvxIconChoiceCtrlEntry * GetEntry(const Point &rDocPos, bool bHit=false)
std::unique_ptr< SvxIconChoiceCtrlColumnInfoMap > m_pColumns
void DrawFocusRect(vcl::RenderContext &rRenderContext)
SvxIconChoiceCtrl_Impl * _pView
SvxIconChoiceCtrlEntry * SearchRow(sal_uInt16 nRow, sal_uInt16 nLeft, sal_uInt16 nRight, bool bRight, bool bSimple)
void AddSelectedRect(const tools::Rectangle &)
static void PaintEmphasis(const tools::Rectangle &rRect1, bool bSelected, vcl::RenderContext &rRenderContext)
SvxIconChoiceCtrlPositionMode ePositionMode
void SetBoundingRect_Impl(SvxIconChoiceCtrlEntry *pEntry, const Point &rPos, const Size &rBoundingSize)
ImplSVEvent * nUserEventAdjustScrBars
const MapMode & GetMapMode() const
std::vector< SvxIconChoiceCtrlEntry * > maZOrderList
tools::Long nMaxVirtHeight
void MakeEntryVisible(SvxIconChoiceCtrlEntry *pEntry, bool bBound=true)
bool bHighlightFramePressed
::vcl::AccessibleFactoryAccess aAccFactory
std::map< sal_uInt16, SvxIconChoiceCtrlEntryPtrVec > IconChoiceMap
std::map< sal_uInt16, std::unique_ptr< SvxIconChoiceCtrlColumnInfo > > SvxIconChoiceCtrlColumnInfoMap
bool MouseMove(const MouseEvent &)
tools::Long nMaxBoundHeight
bool GetUpdateMode() const
sal_Int32 nSelectionCount
Size CalcBoundingSize() const
SvxIconChoiceCtrlEntry * SearchCol(sal_uInt16 nCol, sal_uInt16 nTop, sal_uInt16 nBottom, bool bDown, bool bSimple)
tools::Rectangle GetOutputRect() const
bool IsAutoArrange() const
SvxIconChoiceCtrlEntry * pHdlEntry
void CallEventListeners(VclEventId nEvent, void *pData)
VclPtr< ScrollBar > aHorSBar
void OccupyGrids(const SvxIconChoiceCtrlEntry *)
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos)
tools::Rectangle CalcFocusRect(SvxIconChoiceCtrlEntry *)
void RepaintSelectedEntries()
bool MouseButtonUp(const MouseEvent &)
void SetEntryTextMode(SvxIconChoiceCtrlTextMode, SvxIconChoiceCtrlEntry *pEntry)
void SetOrigin(const Point &)
DrawTextFlags nCurTextDrawFlags
SelectionMode eSelectionMode
static bool IsBoundingRectValid(const tools::Rectangle &rRect)
tools::Rectangle aCurSelectionRect
virtual void Start() override
Activates the timer task.
SvxIconChoiceCtrlEntry * pAnchor
void Scroll(tools::Long nDeltaX, tools::Long nDeltaY)
void SetCursor_Impl(SvxIconChoiceCtrlEntry *pOldCursor, SvxIconChoiceCtrlEntry *pNewCursor, bool bMod1, bool bShift)
size_t GetEntryCount() const
VclPtr< SvtIconChoiceCtrl > pView
void ClearSelectedRectList()
~SvxIconChoiceCtrl_Impl()
tools::Rectangle CalcMaxTextRect(const SvxIconChoiceCtrlEntry *pEntry) const
void ImpArrange(bool bKeepPredecessors)
void AdjustVirtSize(const tools::Rectangle &)
void SetColumn(sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo &)
SvxIconChoiceCtrlEntry * GoLeftRight(SvxIconChoiceCtrlEntry *, bool bRight)
sal_uInt16 GetSortListPos(SvxIconChoiceCtrlEntryPtrVec &rList, tools::Long nValue, bool bVertical)
void SetGrid(const Size &)
SvxIconChoiceCtrlTextMode eTextMode
SvxIconChoiceCtrlEntry * pCurHighlightFrame
SvxIconChoiceCtrlEntry * GetCurEntry() const
tools::Rectangle GetGridRect(GridId)
void EntrySelected(SvxIconChoiceCtrlEntry *pEntry, bool bSelect)
#define DBG_ASSERT(sCon, aError)
std::unique_ptr< bool[]> _pGridMap
static sal_uLong GetGridCount(const Size &rSizePixel, sal_uInt16 nGridWidth, sal_uInt16 nGridHeight)
std::unique_ptr< IcnCursor_Impl > pImpCursor
std::vector< std::unique_ptr< SvxIconChoiceCtrlEntry > > maEntries
VclPtr< ScrollBar > aVerSBar
bool MouseButtonDown(const MouseEvent &)
SvxIconChoiceCtrlEntry * GetFirstSelectedEntry() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
void OccupyGrid(GridId nId)
void SetStyle(WinBits nWinStyle)
void Command(const CommandEvent &rCEvt)
tools::Long GetScrollBarLineSize() const
std::unique_ptr< IconChoiceMap > xColumns
void InvalidateEntry(SvxIconChoiceCtrlEntry *)
void PaintEntry(SvxIconChoiceCtrlEntry *, const Point &, vcl::RenderContext &rRenderContext)
void PositionScrollBars(tools::Long nRealWidth, tools::Long nRealHeight)
SvxIconChoiceCtrlEntry * GoPageUpDown(SvxIconChoiceCtrlEntry *, bool bDown)
bool IsMnemonicChar(sal_Unicode cChar, sal_uLong &rPos) const
bool RequestHelp(const HelpEvent &rHEvt)
SvxIconChoiceCtrlEntry * GetEntry(size_t nPos) const
tools::Rectangle CalcTextRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr, const OUString *pStr=nullptr)
VclPtr< ScrollBarBox > aScrBarBox
void RemoveEntry(size_t nPos)
void ToDocPos(Point &rPosPixel)
const tools::Rectangle & GetEntryBoundRect(SvxIconChoiceCtrlEntry *)
void ShowCursor(bool bShow)
SvxIconChoiceCtrlTextMode
SvxIconChoiceCtrlEntry * pCursor
DECL_LINK(ScrollUpDownHdl, ScrollBar *, void)
SvxIconChoiceCtrlEntry * FindEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, const Point &)
tools::Long CalcBoundingHeight() const
SvxIconChoiceCtrl_Impl & operator=(const SvxIconChoiceCtrl_Impl &)=delete
tools::Long nMaxVirtWidth
void SetUpdateMode(bool bUpdate)
tools::Rectangle CalcBmpRect(SvxIconChoiceCtrlEntry *, const Point *pPos=nullptr)
void SelectEntry(SvxIconChoiceCtrlEntry *, bool bSelect, bool bAddToSelection=false)
SvxIconChoiceCtrlEntry * pCurEntry
tools::Long nVerSBarWidth
IcnGridMap_Impl(SvxIconChoiceCtrl_Impl *pView)
void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
const Point & GetOrigin() const
void SetEntryPredecessor(SvxIconChoiceCtrlEntry *pEntry, SvxIconChoiceCtrlEntry *pPredecessor)
std::vector< tools::Rectangle > aSelectedRectList
IcnCursor_Impl(SvxIconChoiceCtrl_Impl *pOwner)
void InsertEntry(std::unique_ptr< SvxIconChoiceCtrlEntry >, size_t nPos)
SvxIconChoiceCtrlEntry * pHead
void Center(SvxIconChoiceCtrlEntry *pEntry) const
void ClipAtVirtOutRect(tools::Rectangle &rRect) const
void SetEntryHighlightFrame(SvxIconChoiceCtrlEntry *pEntry, bool bKeepHighlightFlags)
sal_Int32 GetEntryListPos(SvxIconChoiceCtrlEntry const *) const
tools::Long nHorSBarHeight
void SelectRange(SvxIconChoiceCtrlEntry const *pStart, SvxIconChoiceCtrlEntry const *pEnd, bool bAdd)
void SetCursor(SvxIconChoiceCtrlEntry *)
void InvalidateBoundingRect(tools::Rectangle &rRect)
tools::Rectangle _aLastOccupiedGrid
std::unique_ptr< IconChoiceMap > xRows
const SvxIconChoiceCtrlColumnInfo * GetColumn(sal_uInt16 nIndex) const
void SetDefaultTextSize()
void ToggleSelection(SvxIconChoiceCtrlEntry *)
std::vector< SvxIconChoiceCtrlEntry * > SvxIconChoiceCtrlEntryPtrVec
void GetMinMapSize(sal_uInt16 &rDX, sal_uInt16 &rDY) const
void SetSelectionMode(SelectionMode eMode)
GridId GetUnoccupiedGrid()
SvxIconChoiceCtrlPositionMode
void PaintItem(const tools::Rectangle &rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry *pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext &rRenderContext)
bool HandleScrollCommand(const CommandEvent &rCmd)
bool KeyInput(const KeyEvent &)
void ToTop(SvxIconChoiceCtrlEntry *)
void Arrange(bool bKeepPredecessors, tools::Long nSetMaxVirtWidth, tools::Long nSetMaxVirtHeight)
An idle is a timer to be scheduled immediately.
void SelectRect(SvxIconChoiceCtrlEntry *pEntry1, SvxIconChoiceCtrlEntry *pEntry2, bool bAdd, std::vector< tools::Rectangle > *pOtherRects)
const Size & GetItemSize(IcnViewFieldType) const
sal_Int32 GetSelectionCount() const
void SetPositionMode(SvxIconChoiceCtrlPositionMode)
void RecalcAllBoundingRectsSmart()
void GetGridCoord(GridId, sal_uInt16 &rGridX, sal_uInt16 &rGridY)