34 #include <com/sun/star/accessibility/AccessibleRole.hpp>
39 #include <osl/diagnose.h>
45 #define MULTILINE_ENTRY_DRAW_FLAGS ( DrawTextFlags::WordBreak | DrawTextFlags::MultiLine | DrawTextFlags::VCenter )
93 std::vector<std::unique_ptr<ImplEntryType> >::iterator iter =
maEntries.begin()+nPos;
95 if ( ( (*iter)->mbIsSelected != bSelect ) &&
98 (*iter)->mbIsSelected = bSelect;
121 return rSorter.
compare(rA, rB);
133 sal_Int32 insPos = 0;
134 const sal_Int32 nEntriesSize =
static_cast<sal_Int32
>(
maEntries.size());
138 if (0 <= nPos && nPos < nEntriesSize)
141 maEntries.insert(
maEntries.begin() + nPos, std::unique_ptr<ImplEntryType>(pNewEntry) );
145 insPos = nEntriesSize;
146 maEntries.push_back(std::unique_ptr<ImplEntryType>(pNewEntry));
153 const OUString& rStr = pNewEntry->
maStr;
164 insPos = nEntriesSize;
165 maEntries.push_back(std::unique_ptr<ImplEntryType>(pNewEntry));
186 nMid =
static_cast<sal_Int32
>((nLow + nHigh) / 2);
201 while ( nLow <= nHigh );
211 catch (uno::RuntimeException& )
230 std::vector<std::unique_ptr<ImplEntryType> >::iterator iter =
maEntries.begin()+ nPos;
232 if ( !!(*iter)->maImage )
241 const sal_Int32 nEntries =
static_cast<sal_Int32
>(
maEntries.size());
242 for ( sal_Int32
n = bSearchMRUArea ? 0 :
GetMRUCount();
n < nEntries;
n++ )
245 if ( aComp == rString )
257 for ( sal_Int32
n = nStart;
n < nEntryCount; )
267 bMatch = pImplEntry->
maStr.startsWith(rStr);
284 sal_Int32 nStart = std::min(i_nEndIndex, i_nBeginIndex);
285 sal_Int32 nStop = std::max(i_nEndIndex, i_nBeginIndex);
290 if( nStop > nEntryCount-1 )
291 nStop = nEntryCount-1;
294 else if( nStart > nEntryCount-1 )
295 nStart = nEntryCount-1;
297 sal_Int32
nIndex = nStart;
301 if (nHeight > ::std::numeric_limits<tools::Long>::max() - nPosHeight)
303 SAL_WARN(
"vcl",
"ImplEntryList::GetAddedHeight: truncated");
306 nHeight += nPosHeight;
312 return i_nEndIndex > i_nBeginIndex ? nHeight : -nHeight;
326 aEntryText = pImplEntry->
maStr;
335 bImage = !!pImplEntry->
maImage;
358 return pImplEntry ? pImplEntry->
mpUserData :
nullptr;
370 sal_Int32 nSelCount = 0;
391 for ( sal_Int32
n = 0;
n < nEntryCount;
n++ )
396 if ( nSel == nIndex )
449 maQuickSelectionEngine( *this )
568 struct ImplEntryMetrics
592 std::unique_ptr<SalLayout> pLayout = pOutputDevice->
ImplLayout(
605 ImplEntryMetrics aMetrics;
606 aMetrics.bText = !rEntry.
maStr.isEmpty();
607 aMetrics.bImage = !!rEntry.
maImage;
608 aMetrics.nEntryWidth = 0;
609 aMetrics.nEntryHeight = 0;
610 aMetrics.nTextWidth = 0;
611 aMetrics.nImgWidth = 0;
612 aMetrics.nImgHeight = 0;
614 if ( aMetrics.bText )
625 aMetrics.nTextWidth = aTextRect.
GetWidth();
643 if ( aMetrics.bImage )
646 aMetrics.nImgWidth =
static_cast<sal_uInt16
>(
CalcZoom( aImgSz.
Width() ));
647 aMetrics.nImgHeight =
static_cast<sal_uInt16
>(
CalcZoom( aImgSz.
Height() ));
655 aMetrics.nEntryHeight = std::max( aMetrics.nImgHeight, aMetrics.nEntryHeight );
660 if (bIsUserDrawEnabled || aMetrics.bImage)
663 if (!bIsUserDrawEnabled && aMetrics.bText)
666 aMetrics.nEntryHeight );
669 if (!aMetrics.bText && !aMetrics.bImage && !bIsUserDrawEnabled)
681 rEntry.
mnHeight = aMetrics.nEntryHeight;
693 if ( nFirstMatchingEntryPos || !nMRUCount )
695 bool bSelectNewEntry =
false;
696 if ( nFirstMatchingEntryPos < nMRUCount )
700 if ( nFirstMatchingEntryPos == nSelected )
701 bSelectNewEntry =
true;
703 else if ( nMRUCount ==
GetEntryList().GetMaxMRUCount() )
783 sal_Int32 nSelect =
mnTop;
788 if (rPoint.Y() <= nEntryHeight + nY)
793 if( pEntry ==
nullptr )
803 if( i_nEntry >=
mnTop )
830 if( nDiff > nWindowHeight && nPos >
mnTop )
983 bool bSelectionChanged =
false;
987 bool bFocusChanged =
false;
993 if( nSelect != nDeselect )
997 bFocusChanged =
true;
998 bSelectionChanged =
true;
1007 bool bSelect =
nPos == nSelect;
1011 bFocusChanged =
true;
1012 bSelectionChanged =
true;
1030 bFocusChanged =
true;
1031 bSelectionChanged =
true;
1037 bFocusChanged =
true;
1047 sal_Int32 nStart = std::min( nSelect, nAnchor );
1048 sal_Int32 nEnd = std::max( nSelect, nAnchor );
1049 for ( sal_Int32
n = nStart;
n <= nEnd;
n++ )
1054 bSelectionChanged =
true;
1062 if ( ( nLast > nSelect ) && ( nLast > nAnchor ) )
1064 for ( sal_Int32
n = nSelect+1;
n <= nLast;
n++ )
1069 bSelectionChanged =
true;
1073 else if ( ( nLast < nSelect ) && ( nLast < nAnchor ) )
1075 for ( sal_Int32
n = nLast;
n < nSelect;
n++ )
1080 bSelectionChanged =
true;
1092 bFocusChanged =
true;
1097 bFocusChanged =
true;
1100 if( bSelectionChanged )
1112 if (bSelectPosChange)
1119 return bSelectionChanged;
1158 bool bTrackOrQuickClick =
mbTrack;
1169 bTrackOrQuickClick =
true;
1174 if( bTrackOrQuickClick )
1178 bool bShift = aMEvt.
IsShift();
1179 bool bCtrl = aMEvt.
IsMod1();
1187 if( nSelect <
mnTop )
1256 bool bShift = aKeyCode.
IsShift();
1258 bool bMod2 = aKeyCode.
IsMod2();
1260 bool bHandleKey =
false;
1325 (
mnTop-nCurVis) : 0 );
1327 else if ( !bCtrl && !bMod2 )
1356 else if ( !bCtrl && !bMod2 )
1366 sal_Int32 nTmp = std::min( nCurVis, nCount );
1370 tools::Long nTmp2 = std::min( static_cast<tools::Long>(nCount-nCurVis), static_cast<tools::Long>(static_cast<tools::Long>(
mnTop)+static_cast<tools::Long>(nCurVis)-1) );
1372 nTmp =
static_cast<sal_Int32
>(nTmp2+(nCurVis-1) );
1408 else if ( !bCtrl && !bMod2 )
1419 if( nCount > nCurVis )
1430 if ( !bCtrl && !bMod2 )
1441 if ( !bCtrl && !bMod2 )
1486 for( sal_Int32
i = 0;
i < nEntryCount;
i++ )
1524 if (nSelect >= nCount)
1528 if(
SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange))
1548 if ( _nPos >= nEntryCount )
1560 return static_cast< sal_Int32
>(
reinterpret_cast< sal_Int64
>( _entry ) ) - 1;
1571 sal_Int32 nNextPos = lcl_getEntryPos( _currentEntry ) + 1;
1572 return lcl_getEntry(
GetEntryList(), nNextPos, _out_entryText );
1577 sal_Int32 nSelect = lcl_getEntryPos( _entry );
1588 if (nSelect >= nCount)
1642 UserDrawEvent aUDEvt(&rRenderContext, aRect, nPos, bSelected);
1648 DrawEntry(rRenderContext, nPos,
true,
true);
1677 rRenderContext.
DrawImage(aPtImg, aImage);
1683 rRenderContext.
DrawImage(aPtImg, aImgSz, aImage);
1689 if (nEdgeBlendingPercent && aImgSz.
Width() && aImgSz.
Height())
1693 const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
1707 if (!
aStr.isEmpty())
1715 Size(nMaxWidth, nEntryHeight));
1737 Point aStartPos(0, nY);
1740 Point aEndPos(aStartPos);
1742 rRenderContext.
DrawLine(aStartPos, aEndPos);
1768 if (nY + nEntryHeight >= rRect.
Top() &&
1803 if( nEntries > nCount )
1804 nEntries =
static_cast<sal_uInt16
>(nCount);
1814 if ( bShowFocusRect )
1823 if ( bShowFocusRect )
1856 if( nTop > nLastEntry )
1862 if ( nTop ==
mnTop )
1879 sal_Int32
nPos = nEntryPos;
1906 nDiff = - std::min(
mnLeft, nAbs );
1913 mnLeft = sal::static_int_cast<sal_uInt16>(
mnLeft + nDiff);
2038 Control( pParent, nWinStyle ),
2042 SetType( WindowType::LISTBOXWINDOW );
2150 if( nSet > mpVScrollBar->GetRangeMax() )
2151 mpVScrollBar->SetRangeMax( GetEntryList().GetEntryCount() );
2152 mpVScrollBar->SetThumbPos( GetTopEntry() );
2154 mpHScrollBar->SetThumbPos( GetLeftIndent() );
2156 maScrollHdl.Call(
this );
2161 sal_uInt16
nPos =
static_cast<sal_uInt16
>(pSB->GetThumbPos());
2162 if( pSB == mpVScrollBar )
2163 SetTopEntry( nPos );
2164 else if( pSB == mpHScrollBar )
2165 SetLeftIndent( nPos );
2172 bool bArrange =
false;
2179 if( nEntries > nMaxVisEntries )
2208 if( nWidth < nMaxWidth )
2217 if( nEntries > nMaxVisEntries )
2232 sal_uInt16 nMaxLI =
static_cast<sal_uInt16
>(nMaxWidth - nWidth);
2282 Size aInnerSz( aOutSz );
2288 Point aWinPos( 0, 0 );
2402 return bDone || Window::EventNotify( rNEvt );
2436 sal_Int32 nMRUCount = 0;
2449 while ( nIndex >= 0 );
2466 aEntries.append(cSep);
2468 return aEntries.makeStringAndClear();
2481 Control ( pParent, nWinStyle )
2535 bool bNativeOK =
false;
2559 sal_Int32 nLeft, nTop, nRight, nBottom;
2560 pWin->
GetBorder( nLeft, nTop, nRight, nBottom );
2561 Point aPoint( -nLeft, -nTop );
2564 bool bMouseOver =
false;
2583 nState, aControlValue, OUString() );
2587 nState, aControlValue, OUString());
2592 if (bHasFocus && !
ImplGetSVData()->maNWFData.mbDDListBoxNoTextArea)
2666 if (bImage && !bLayout)
2678 rRenderContext.
DrawImage( aPtImg, *pImage, nStyle );
2684 rRenderContext.
DrawImage( aPtImg, aImgSz, *pImage, nStyle );
2687 const sal_uInt16 nEdgeBlendingPercent(
GetEdgeBlending() ? rStyleSettings.GetEdgeBlending() : 0);
2689 if(nEdgeBlendingPercent)
2691 const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor());
2692 const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor());
2693 const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
2707 if ( bImage && !bLayout )
2723 std::vector< tools::Rectangle >* pVector = bLayout ? &
mxLayoutData->m_aUnicodeBoundRects :
nullptr;
2724 OUString* pDisplayText = bLayout ? &
mxLayoutData->m_aDisplayText :
nullptr;
2725 rRenderContext.
DrawText( aTextRect,
maString, nTextStyle, pVector, pDisplayText );
2802 SetType( WindowType::LISTBOXWINDOW );
2890 sal_Int32 nLeft, nTop, nRight, nBottom;
2891 GetBorder( nLeft, nTop, nRight, nBottom );
2910 if ( ( aFloatSz.
Height() < nMaxHeight ) || (
mnDDLineCount && ( mnDDLineCount < mpImplLB->GetEntryList().GetEntryCount() ) ) )
2918 if (aFloatSz.
Width() > nDesktopWidth)
2920 aFloatSz.
setWidth( nDesktopWidth );
2923 if ( aFloatSz.
Height() > nMaxHeight )
2939 if ( nInnerHeight % nEntryHeight )
2941 nInnerHeight /= nEntryHeight;
2943 nInnerHeight *= nEntryHeight;
2944 aFloatSz.
setHeight( nInnerHeight + nTop + nBottom );
2979 const sal_Int32 nLeft = 4, nTop = 4, nRight = 4, nBottom = 4;
2980 aPos.AdjustX(nLeft );
2981 aPos.AdjustY(nTop );
2994 pGrandparentOutDev->
ReMirror( aRect );
3002 if( bStartTracking )
virtual Point GetPosPixel() const
tools::Rectangle maFocusRect
#define LINK(Instance, Class, Member)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
void SelectEntry(sal_Int32 nPos, bool bSelect)
Size GetSizePixel() const
bool IsControlBackground() const
bool GetEdgeBlending() const
virtual void EnableRTL(bool bEnable=true) override
virtual void ShowFocus(const tools::Rectangle &rRect) override
bool IsInPopupMode() const
virtual const Wallpaper & GetDisplayBackground() const
WinBits const WB_NOSHADOW
virtual void LoseFocus() override
Link< sal_Int32, void > maFocusHdl
sal_Int32 NaturalSortCompare(const OUString &rA, const OUString &rB)
void StartPopupMode(const tools::Rectangle &rRect, FloatWinPopupFlags nFlags)
SalLayoutGlyphs maStrGlyphs
virtual void Resize() override
virtual void LoseFocus() override
bool HandleKeyEvent(const KeyEvent &_rKEvt)
WinBits const WB_SYSTEMWINDOW
bool HasEntryImage(sal_Int32 nPos) const
Size CalcFloatSize() const
virtual void StateChanged(StateChangedType nType) override
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void SetSelectionAnchor(sal_Int32 nPos)
static OUString filterFormattingChars(const OUString &)
virtual void FillLayoutData() const override
void setWidth(tools::Long nWidth)
const ImplEntryList & GetEntryList() const
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All) override
sal_Int32 GetSelectedEntryPos(sal_Int32 nIndex) const
void SetUserItemSize(const Size &rSz)
const CommandEvent * GetCommandEvent() const
const Color & GetHighlightTextColor() const
BitmapEx createBlendFrame(const Size &rSize, sal_uInt8 nAlpha, Color aColorTopLeft, Color aColorBottomRight)
Create a blend frame as BitmapEx.
void SetEntryFlags(sal_Int32 nPos, ListBoxEntryFlags nFlags)
virtual ~ImplListBoxWindow() override
std::optional< vcl::ControlLayoutData > mxLayoutData
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for refer...
void ScrollHorz(tools::Long nDiff)
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
std::unique_ptr< sal_Int32[]> pData
SAL_DLLPRIVATE void ImplClearLayoutData() const
tools::Rectangle maFocusRect
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
constexpr sal_uInt16 KEY_A
tools::Long mnMaxImgWidth
Maximum width of an image item.
bool mbSelectionChanged
Do not call Select() too often ...
void ImplResizeControls()
virtual void StateChanged(StateChangedType nStateChange) override
SAL_DLLPRIVATE vcl::Window * ImplGetBorderWindow() const
Link< ImplListBoxWindow *, void > maScrollHdl
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
void EnableMouseMoveSelect(bool bMouseMoveSelect)
sal_Int32 GetTopEntry() const
virtual Size GetSizePixel() const
virtual void SetSizePixel(const Size &rNewSize)
constexpr tools::Long gnBorder
SAL_DLLPRIVATE WindowImpl * ImplGetWindowImpl() const
sal_Int32 GetEntryPosForPoint(const Point &rPoint) const
sal_Int32 GetLastSelected() const
SAL_DLLPRIVATE void CompatStateChanged(StateChangedType nStateChange)
bool MatchString(const OUString &rStr1, const OUString &rStr2) const
void SetMRUCount(sal_Int32 n)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
const Color & GetFieldRolloverTextColor() const
sal_uInt16 GetCode() const
void SelectEntry(sal_Int32 nPos, bool bSelect)
sal_Int32 FindEntry(std::u16string_view rStr, bool bSearchMRUArea=false) const
sal_Int32 GetSelectedEntryCount() const
DataChangedEventType GetType() const
The invalidated area is updated immediately.
tools::Rectangle GetDesktopRectPixel() const
bool mbMouseMoveSelect
Select at MouseMove.
sal_Int32 mnTop
output from line on
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
sal_uInt16 GetDisplayLineCount() const
const Color & GetControlBackground() const
const CommandWheelData * GetWheelData() const
constexpr sal_uInt16 KEY_SPACE
void SetSeparatorPos(sal_Int32 n)
Removes existing separators, and sets the position of the one and only separator. ...
void SetType(WindowType nType)
bool mbCenter
center Text output
sal_Int32 GetSelectionAnchor() const
bool HandleScrollCommand(const CommandEvent &rCmd, ScrollBar *pHScrl, ScrollBar *pVScrl)
void SetEntryFlags(sal_Int32 nPos, ListBoxEntryFlags nFlags)
virtual void Tracking(const TrackingEvent &rTEvt) override
bool IsRTLEnabled() const
static Point ImplCalcPos(vcl::Window *pWindow, const tools::Rectangle &rRect, FloatWinPopupFlags nFlags, sal_uInt16 &rArrangeIndex, Point *pLOKTwipsPos=nullptr)
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
bool HasChildPathFocus(bool bSystemWindow=false) const
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
const vcl::Font & GetFieldFont() const
tools::Long GetLeftIndent() const
const Color & GetFieldTextColor() const
void ImplUpdateEntryMetrics(ImplEntryType &rEntry)
constexpr sal_uInt16 KEY_UP
#define LISTBOX_ENTRY_NOTFOUND
const Color & GetHighlightColor() const
VclPtr< ImplListBoxWindow > maLBWindow
ImplEntryList(vcl::Window *pWindow)
The invalidated area is painted with the background color/pattern.
void ImplInitScrollBars()
Link< void *, void > maMBDownHdl
sal_Int32 GetTopEntry() const
constexpr sal_uInt16 KEY_END
void RemoveEntry(sal_Int32 nPos)
const Fraction & GetZoom() const
void * GetEntryData(sal_Int32 nPos) const
constexpr tools::Long Width() const
tools::Long mnMaxWidth
Maximum width of an entry.
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
tools::Long mnTextHeight
text height
tools::Long GetMaxEntryWidth() const
sal_uInt16 GetEdgeBlending() const
sal_uInt16 GetClicks() const
VclPtr< vcl::Window > mpWindow
For getting the current locale when matching strings.
IMPL_LINK_NOARG(ImplListBox, MRUChanged, LinkParamNone *, void)
bool IsTravelSelect() const
std::set< sal_Int32 > maSeparators
Separator positions.
virtual bool PreNotify(NotifyEvent &rNEvt) override
void RemoveEntry(sal_Int32 nPos)
tools::Long mnMaxImgTxtWidth
Maximum width of a text item.
void Enable(bool bEnable=true, bool bChild=true)
SAL_DLLPRIVATE void ReMirror(Point &rPoint) const
this flags lets the item be drawn disabled (e.g.
VclPtr< ImplListBox > mpImplLB
virtual void StateChanged(StateChangedType nType) override
virtual ~ImplListBoxFloatingWindow() override
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
bool IsControlForeground() const
bool IsEnterWindow() const
void SetMRUChangedHdl(const Link< LinkParamNone *, void > &rLink)
AllSettingsFlags GetFlags() const
constexpr sal_uInt16 KEY_PAGEUP
virtual const Wallpaper & GetDisplayBackground() const override
bool mbIsDropdown
Listbox is actually a dropdown (either combobox, or popup window treated as dropdown) ...
tools::Long mnMaxTxtWidth
Maximum width of a text item.
tools::Long getHeightWithMargin() const
virtual void Resize() override
sal_uInt16 GetModifier() const
void SetMRUEntries(std::u16string_view rEntries, sal_Unicode cSep)
const void * StringEntryIdentifier
Link< LinkParamNone *, void > maListItemSelectHdl
ImplWin(vcl::Window *pParent, WinBits nWinStyle)
bool mbSimpleMode
SimpleMode for MultiListBox.
void DrawLine(const Point &rStartPt, const Point &rEndPt)
const Color & GetEdgeBlendingBottomRightColor() const
Image GetEntryImage(sal_Int32 nPos) const
ImplListBoxWindow * GetMainWindow()
void DrawRect(const tools::Rectangle &rRect)
sal_Int32 mnTrackingSaveSelection
Selection before Tracking();.
void SetEntryFlags(sal_Int32 nPos, ListBoxEntryFlags nFlags)
const Color & GetControlForeground() const
this flag disables a selection of an entry completely.
void SetTopEntry(sal_Int32 nTop)
constexpr sal_uInt16 KEY_DOWN
void RemoveEntry(sal_Int32 nPos)
void SetScrollHdl(const Link< ImplListBoxWindow *, void > &rLink)
Link< void *, void > maMBDownHdl
ImplListBoxFloatingWindow(vcl::Window *pParent)
sal_Int32 GetSeparatorPos() const
Gets the position of the separator which was added first.
sal_Int32 GetMRUCount() const
void ShowProminentEntry(sal_Int32 nPos)
ImplSVData * ImplGetSVData()
bool ProcessKeyInput(const KeyEvent &rKEvt)
this flag can be used to make an entry multiline capable A normal entry is single line and will there...
sal_Int32 GetScrollBarSize() const
virtual void KeyInput(const KeyEvent &rKEvt) override
const Color & GetDisableColor() const
ImplEntryType * GetMutableEntryPtr(sal_Int32 nPos) const
virtual bool PreNotify(NotifyEvent &rNEvt) override
std::vector< std::unique_ptr< ImplEntryType > > maEntries
virtual bool PreNotify(NotifyEvent &rNEvt)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
bool IsLeaveWindow() const
virtual void Resize() override
bool IsEntryPosSelected(sal_Int32 nIndex) const
bool IsNativeWidgetEnabled() const
ImplBtn(vcl::Window *pParent, WinBits nWinStyle)
virtual void Resize() override
constexpr sal_uInt16 KEY_HOME
virtual ~ImplListBox() override
void SetControlBackground()
virtual bool PreNotify(NotifyEvent &rNEvt) override
WinBits const WB_SIMPLEMODE
IMPL_LINK(ImplListBox, ScrollBarHdl, ScrollBar *, pSB, void)
bool mbMulti
MultiListBox.
tools::Long mnLeft
output from column on
void ImplCheckScrollBars()
Link< ImplListBoxWindow *, void > maDoubleClickHdl
void SetControlForeground()
CommandWheelMode GetMode() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
SAL_DLLPRIVATE bool ImplIsAntiparallel() const
void SetUpdateMode(bool bUpdate)
sal_Int32 mnSelectionAnchor
ImplListBox(vcl::Window *pParent, WinBits nWinStyle)
bool IsUpdateMode() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_GRAY
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const AllSettings & GetSettings() const
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
const Color & GetFieldColor() const
tools::Long GetEntryHeightWithMargin() const
CommandEventId GetCommand() const
const Color & GetLineColor() const
VclPtr< ScrollBarBox > mpScrollBarBox
void SetZoom(const Fraction &rZoom)
sal_uInt16 GetModifier() const
Size CalcSize(sal_Int32 nMaxLines) const
void SetTextColor(const Color &rColor)
void SetLastSelected(sal_Int32 nPos)
constexpr sal_uInt16 KEY_PAGEDOWN
DrawTextFlags ImplGetTextStyle() const
void SetEdgeBlending(bool bNew)
void ImplDoPaint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
MouseNotifyEvent GetType() const
void SetLeftIndent(tools::Long n)
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor=COL_AUTO)
Request rendering of a particular control and/or part.
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
WinBits const WB_DROPDOWN
const AllSettings & GetSettings() const
vcl::QuickSelectionEngine maQuickSelectionEngine
bool GetEdgeBlending() const
Point PixelToLogic(const Point &rDevicePt) const
VclPtr< ScrollBar > mpHScrollBar
bool HandleWheelAsCursorTravel(const CommandEvent &rCEvt, Control &rControl)
void ApplyControlForeground(vcl::RenderContext &rRenderContext, const Color &rDefaultColor)
Link< LinkParamNone *, void > maCancelHdl
sal_uInt16 GetModifier() const
bool mbSort
ListBox sorted.
bool GetEdgeBlending() const
void DrawEntry(vcl::RenderContext &rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText)
Link< UserDrawEvent *, void > maUserDrawHdl
virtual void ShowFocus(const tools::Rectangle &rRect)
bool mbTravelSelect
TravelSelect.
vcl::Window * GetParent() const
ListBoxEntryFlags mnFlags
sal_Int32 FindMatchingEntry(const OUString &rStr, sal_Int32 nStart, bool bLazy) const
void SetLeftIndent(sal_uInt16 n)
void ImplPaint(vcl::RenderContext &rRenderContext, sal_Int32 nPos)
bool IsTrackingEnded() const
Link< LinkParamNone *, void > maMRUChangedHdl
virtual void MouseMove(const MouseEvent &rMEvt) override
void DrawEntry(vcl::RenderContext &rRenderContext, bool bLayout)
Size CalcSize(sal_Int32 nMaxLines) const
constexpr sal_uInt16 KEY_RETURN
WinBits const WB_NOBORDER
const Color & GetButtonRolloverTextColor() const
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
vcl::Window * GetWindow(GetWindowType nType) const
constexpr sal_uInt16 KEY_RIGHT
#define MULTILINE_ENTRY_DRAW_FLAGS
sal_Int32 mnCurrentPos
Position (Focus)
bool mbUserDrawEnabled
UserDraw possible.
VclPtr< ScrollBar > mpVScrollBar
tools::Long const nBorder
bool IsMouseMoveSelect() const
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
virtual void KeyInput(const KeyEvent &rKEvt)
const LanguageTag & getLocale()
const vcl::I18nHelper & GetLocaleI18nHelper() const
tools::Long mnMaxTxtHeight
Maximum height of a text item.
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
const vcl::KeyCode & GetKeyCode() const
tools::Long GetAddedHeight(sal_Int32 nEndIndex, sal_Int32 nBeginIndex) const
helper: add up heights up to index nEndIndex.
bool IsUserDrawEnabled() const
virtual void Resize() override
ImplEntryType * GetEntry(sal_Int32 nPos) const
bool ProcessKeyInput(const KeyEvent &rKEvt)
virtual void Scroll(tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
const ImplEntryType * GetEntryPtr(sal_Int32 nPos) const
bool IsEntrySelectable(sal_Int32 nPos) const
An Entry is selectable if its mnFlags does not have the ListBoxEntryFlags::DisableSelection flag set...
#define LISTBOX_MAX_ENTRIES
const Color & GetButtonTextColor() const
sal_Int32 mnItemPos
because of UserDraw I have to know which item I draw
#define SAL_WARN_IF(condition, area, stream)
constexpr tools::Long Height() const
const MouseEvent * GetMouseEvent() const
virtual void GetFocus() override
tools::Long GetEntryHeightWithMargin() const
virtual vcl::StringEntryIdentifier CurrentEntry(OUString &_out_entryText) const override
returns the current entry in the list of searchable strings.
sal_Int32 mnPopupModeStartSaveSelection
void SetSeparatorPos(sal_Int32 n)
Removes existing separators, and sets the position of the one and only separator. ...
bool SelectEntries(sal_Int32 nSelect, LB_EVENT_TYPE eLET, bool bShift=false, bool bCtrl=false, bool bSelectPosChange=false)
sal_Int32 FindFirstSelectable(sal_Int32 nPos, bool bForward=true) const
sal_uInt16 mnSelectModifier
Modifiers.
::OutputDevice const * GetOutDev() const
tools::Long AdjustWidth(tools::Long n)
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
tools::Long mnMaxImgHeight
Maximum height of an image item.
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
Reference< XComponentContext > getProcessComponentContext()
tools::Long CalcZoom(tools::Long n) const
ImplListBoxWindow(vcl::Window *pParent, WinBits nWinStyle)
bool IsGrabFocusAllowed() const
const Point & GetPosPixel() const
WinBits const WB_AUTOHSCROLL
tools::Long AdjustHeight(tools::Long n)
virtual void GetFocus() override
tools::Long GetEntryHeight(sal_Int32 nPos) const
sal_Int32 InsertEntry(sal_Int32 nPos, ImplEntryType *pNewEntry)
Size GetOutputSizePixel() const
void setHeight(tools::Long nHeight)
virtual bool EventNotify(NotifyEvent &rNEvt) override
Event to pass information for UserDraw() handling eg. in comboboxes.
tools::Long GetDelta() const
sal_Int32 InsertEntry(sal_Int32 nPos, const OUString &rStr)
bool isSeparator(const sal_Int32 &n) const
Checks if the given number n is an element of the separator positions set.
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
ScXMLEditAttributeMap::Entry const aEntries[]
#define SAL_WARN(area, stream)
OUString GetSelectedEntry(sal_Int32 nIndex) const
void SetTopEntry(sal_Int32 nTop)
bool IsTrackingCanceled() const
OUString GetMRUEntries(sal_Unicode cSep) const
std::unique_ptr< SalLayout > ImplLayout(const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), tools::Long nLogicWidth=0, o3tl::span< const sal_Int32 > pLogicDXArray={}, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::text::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
void SelectEntry(sal_Int32 nPos, bool bSelect)
Link< sal_Int32, void > maSelectionChangedHdl
sal_Int32 mnUserDrawEntry
virtual void FillLayoutData() const override
void ApplyControlFont(vcl::RenderContext &rRenderContext, const vcl::Font &rDefaultFont)
OUString GetEntryText(sal_Int32 nPos) const
constexpr sal_uInt16 KEY_LEFT
Point OutputToScreenPixel(const Point &rPos) const
void StartFloat(bool bStartTracking)
sal_Int32 GetLastVisibleEntry() const
void SetEntryData(sal_Int32 nPos, void *pNewData)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
void ImplInitDropDownButton(PushButton *pButton)
sal_Int32 compare(const OUString &rLHS, const OUString &rRHS) const
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void SetAccessibleRole(sal_uInt16 nRole)
bool mbInUserDraw
In UserDraw.
const MouseEvent & GetMouseEvent() const
bool IsReallyVisible() const
vcl::Font GetControlFont() const
bool mbGrabFocus
Grab focus at MBDown.
virtual vcl::StringEntryIdentifier NextEntry(vcl::StringEntryIdentifier _currentEntry, OUString &_out_entryText) const override
returns the next entry in the list.
SalLayoutGlyphs * GetTextGlyphs(const OutputDevice *pOutputDevice)
Computes maStr's text layout (glyphs), cached in maStrGlyphs.
const Wallpaper & GetBackground() const
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
const Color & GetEdgeBlendingTopLeftColor() const
void SetEdgeBlending(bool bNew)
WinBits const WB_WORDBREAK
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly...
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
tools::Long mnMaxHeight
Maximum height of an entry.
void ShowProminentEntry(sal_Int32 nEntryPos)
ShowProminentEntry will set the entry corresponding to nEntryPos either at top or in the middle depen...
void EndPopupMode(FloatWinPopupEndFlags nFlags=FloatWinPopupEndFlags::NONE)
sal_Int32 InsertEntry(sal_Int32 nPos, ImplEntryType *pNewEntry, bool bSort)
virtual void SetPosPixel(const Point &rNewPos)
virtual void Resize() override
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
virtual void GetFocus() override
bool mbCallSelectionChangedHdl
sal_Int32 GetEntryCount() const
tools::Rectangle GetBoundingRectangle(sal_Int32 nItem) const
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Link< LinkParamNone *, void > maSelectHdl
void ImplDraw(vcl::RenderContext &rRenderContext, bool bLayout=false)
bool mbTrackingSelect
Selected at a MouseMove.
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
ImplEntryList maEntryList
EntryList.
const ImplEntryList & GetEntryList() const
bool mbRight
right align Text output