85 const Size &rOutSize,
const Size &rBorderOutSize)
const;
92 DECL_LINK( ImplSelectionChangedHdl, sal_Int32,
void );
107 rSelectedPos.insert(
nPos );
115 m_pImpl->ImplInitComboBoxData();
127 m_pImpl->m_pSubEdit.disposeAndClear();
133 m_pImpl->m_pFloatWin.disposeAndClear();
134 m_pImpl->m_pBtn.disposeAndClear();
157 sal_Int32 nLeft, nTop, nRight, nBottom;
158 GetBorder( nLeft, nTop, nRight, nBottom );
159 m_pImpl->m_nDDHeight =
static_cast<sal_uInt16
>(
m_pImpl->m_pSubEdit->GetTextHeight() + nTop + nBottom + 4);
171 aBoundRegion, aContentRegion ) )
174 if (
m_pImpl->m_nDDHeight < nNCHeight)
175 m_pImpl->m_nDDHeight = sal::static_int_cast<sal_uInt16>(nNCHeight);
184 nStyle &= ~WB_BORDER;
203 m_pImpl->m_pFloatWin->RequestDoubleBuffering(
true);
204 m_pImpl->m_pFloatWin->SetAutoWidth(
true );
213 nListStyle &= ~WB_BORDER;
221 nListStyle &= ~WB_NOBORDER;
227 m_pImpl->m_pSubEdit->EnableRTL(
false );
235 pLBParent =
m_pImpl->m_pFloatWin;
266 m_pImpl->m_isMatchCase = bMatchCase;
276 return m_pImpl->m_pSubEdit->GetAutocompleteHdl().IsSet();
282 m_pSubEdit->GrabFocus();
283 if (!m_pImplLB->GetEntryList().GetMRUCount())
284 ImplUpdateFloatSelection();
286 m_pImplLB->SelectEntry( 0 ,
true );
287 m_pBtn->SetPressed(
true );
289 m_pFloatWin->StartFloat(
true );
292 m_rThis.ImplClearLayoutData();
294 m_pImplLB->GetMainWindow()->ImplClearLayoutData();
299 if (m_pFloatWin->IsPopupModeCanceled())
301 if (!m_pImplLB->GetEntryList().IsEntryPosSelected(
302 m_pFloatWin->GetPopupModeStartSaveSelection()))
304 m_pImplLB->SelectEntry(m_pFloatWin->GetPopupModeStartSaveSelection(),
true);
305 bool bTravelSelect = m_pImplLB->IsTravelSelect();
306 m_pImplLB->SetTravelSelect(
true );
308 m_pImplLB->SetTravelSelect( bTravelSelect );
312 m_rThis.ImplClearLayoutData();
314 m_pImplLB->GetMainWindow()->ImplClearLayoutData();
316 m_pBtn->SetPressed(
false );
325 OUString aFullText = rEdit.GetText();
326 OUString aStartText = aFullText.copy( 0,
static_cast<sal_Int32
>(aSel.
Max()) );
327 sal_Int32 nStart = m_pImplLB->GetCurrentPos();
336 nPos = m_pImplLB->GetEntryList().FindMatchingEntry(aStartText, nStart,
true);
339 nPos = m_pImplLB->GetEntryList().FindMatchingEntry(aStartText, 0,
true);
344 nPos = m_pImplLB->GetEntryList().FindMatchingEntry(aStartText, nStart,
false);
347 nPos = m_pImplLB->GetEntryList().FindMatchingEntry(aStartText, 0,
false);
351 OUString aText = m_pImplLB->GetEntryList().GetEntryText(
nPos );
352 Selection aSelection( aText.getLength(), aStartText.getLength() );
353 rEdit.SetText( aText, aSelection );
360 bool bPopup = m_rThis.IsInDropDown();
361 bool bCallSelect =
false;
362 if (m_pImplLB->IsSelectionChanged() ||
bPopup)
365 if (m_rThis.IsMultiSelectionEnabled())
367 aText = m_pSubEdit->GetText();
373 sal_Int32 nPrevIndex =
nIndex;
375 sal_Int32 nTokenLen = aToken.size();
377 sal_Int32 nP = m_pImplLB->GetEntryList().FindEntry( aToken );
380 aText = aText.replaceAt( nPrevIndex, nTokenLen,
u"" );
382 sal_Int32 nSepCount=0;
383 if ((nPrevIndex+nSepCount < aText.getLength()) && (aText[nPrevIndex+nSepCount] == m_cMultiSep))
388 aText = aText.replaceAt( nPrevIndex, nSepCount,
u"" );
394 ::std::set< sal_Int32 > aSelInText;
396 sal_Int32 nSelectedEntries = m_pImplLB->GetEntryList().GetSelectedEntryCount();
397 for ( sal_Int32
n = 0;
n < nSelectedEntries;
n++ )
399 sal_Int32 nP = m_pImplLB->GetEntryList().GetSelectedEntryPos(
n );
400 if ( !aSelInText.count( nP ) )
402 if (!aText.isEmpty() && (aText[aText.getLength()-1] != m_cMultiSep))
403 aText += OUStringChar(m_cMultiSep);
404 if ( !aText.isEmpty() )
406 aText += m_pImplLB->GetEntryList().GetEntryText( nP ) +
407 OUStringChar(m_cMultiSep);
414 aText = m_pImplLB->GetEntryList().GetSelectedEntry( 0 );
417 m_pSubEdit->SetText( aText );
420 if (m_rThis.IsMultiSelectionEnabled())
428 bool bMenuSelect =
bPopup && !m_pImplLB->IsTravelSelect() && (!m_rThis.IsMultiSelectionEnabled() || !m_pImplLB->GetSelectModifier());
431 m_pFloatWin->EndPopupMode();
437 m_isKeyBoardModify = !bMenuSelect;
438 m_pSubEdit->SetModifyFlag();
439 m_isSyntheticModify =
true;
441 m_isSyntheticModify =
false;
443 m_isKeyBoardModify =
false;
449 return m_pImpl->m_isSyntheticModify;
454 return m_pImpl->m_isKeyBoardModify;
464 if (m_rThis.IsInDropDown())
465 m_pFloatWin->EndPopupMode();
470 if (!m_pImplLB->IsTrackingSelect())
472 if (!m_pSubEdit->IsReadOnly() && m_pImplLB->GetEntryList().IsEntryPosSelected(nChanged))
473 m_pSubEdit->SetText(m_pImplLB->GetEntryList().GetEntryText(nChanged));
479 m_rThis.DoubleClick();
487 if (
m_pImpl->m_pFloatWin->IsInPopupMode())
488 m_pImpl->m_pFloatWin->EndPopupMode();
491 m_pImpl->m_pSubEdit->GrabFocus();
492 if (!
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount())
493 m_pImpl->ImplUpdateFloatSelection();
495 m_pImpl->m_pImplLB->SelectEntry( 0 ,
true );
497 m_pImpl->m_pBtn->SetPressed(
true );
499 m_pImpl->m_pFloatWin->StartFloat(
true );
518 m_pImpl->m_isDDAutoSize = bAuto;
521 if (bAuto && !
m_pImpl->m_pFloatWin->GetDropDownLineCount())
528 m_pImpl->m_pFloatWin->SetDropDownLineCount( 0 );
536 m_pImpl->m_pFloatWin->SetDropDownLineCount( nLines );
551 sal_uInt16 nLines = 0;
553 nLines =
m_pImpl->m_pFloatWin->GetDropDownLineCount();
562 Size aPrefSz =
m_pImpl->m_pFloatWin->GetPrefSize();
567 m_pImpl->m_pFloatWin->SetPrefSize( aPrefSz );
570 nHeight =
m_pImpl->m_nDDHeight;
585 ComboBoxBounds aBounds(
m_pImpl->calcComboBoxDropDownComponentBounds(aOutSz,
587 m_pImpl->m_pSubEdit->SetPosSizePixel(aBounds.aSubEditPos, aBounds.aSubEditSize);
588 m_pImpl->m_pBtn->SetPosSizePixel(aBounds.aButtonPos, aBounds.aButtonSize);
596 m_pImpl->ImplUpdateFloatSelection();
603 m_pImpl->m_pFloatWin->SetSizePixel(
m_pImpl->m_pFloatWin->CalcFloatSize());
612 m_pImpl->m_pSubEdit->SetLayoutDataParent(
this );
617 if (
m_pImpl->m_pFloatWin->IsReallyVisible())
732 m_pImpl->ImplUpdateFloatSelection();
734 && !
m_pImpl->m_pFloatWin->IsInPopupMode()
738 m_pImpl->m_pBtn->SetPressed(
true );
739 if (
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount())
740 m_pImpl->m_pImplLB->SelectEntry( 0 ,
true );
742 m_pImpl->m_pFloatWin->StartFloat(
false );
747 &&
m_pImpl->m_pFloatWin->IsInPopupMode()
750 m_pImpl->m_pFloatWin->EndPopupMode();
755 bDone =
m_pImpl->m_pImplLB->ProcessKeyInput( aKeyEvt );
764 m_pImpl->m_pImplLB->ProcessKeyInput( aKeyEvt );
773 if (
m_pImpl->m_pFloatWin->HasChildPathFocus())
774 m_pImpl->m_pSubEdit->GrabFocus();
776 m_pImpl->m_pFloatWin->EndPopupMode();
799 m_pImpl->m_pSubEdit->GrabFocus();
810 m_pImpl->ImplUpdateFloatSelection();
818 m_pImpl->ImplUpdateFloatSelection();
823 if (!
m_pImpl->m_isSyntheticModify)
824 m_pImpl->ImplUpdateFloatSelection();
831 if (!m_pImplLB || !m_pSubEdit)
835 m_pImplLB->SetCallSelectionChangedHdl(
false );
836 if (!m_rThis.IsMultiSelectionEnabled())
838 OUString aSearchStr( m_pSubEdit->GetText() );
844 OUString aCurrent = m_pImplLB->GetEntryList().GetEntryText(
845 m_pImplLB->GetCurrentPos());
846 if ( aCurrent == aSearchStr )
847 nSelect = m_pImplLB->GetCurrentPos();
851 nSelect = m_pImplLB->GetEntryList().FindEntry( aSearchStr );
854 nSelect = m_pImplLB->GetEntryList().FindMatchingEntry( aSearchStr, 0,
true );
860 if (!m_pImplLB->IsVisible(nSelect))
861 m_pImplLB->ShowProminentEntry( nSelect );
862 m_pImplLB->SelectEntry( nSelect, bSelect );
866 nSelect = m_pImplLB->GetEntryList().GetSelectedEntryPos( 0 );
868 m_pImplLB->SelectEntry( nSelect,
false );
869 m_pImplLB->ResetCurrentPos();
874 ::std::set< sal_Int32 > aSelInText;
877 m_pImplLB->SelectEntry(
n, aSelInText.count(
n ) != 0 );
879 m_pImplLB->SetCallSelectionChangedHdl(
true );
891 const sal_Int32 nMRUCount =
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount();
893 nRealPos =
nPos + nMRUCount;
896 nRealPos =
m_pImpl->m_pImplLB->InsertEntry( nRealPos, rStr );
897 nRealPos -=
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount();
903 const OUString& rStr,
const Image& rImage, sal_Int32
const nPos)
912 const sal_Int32 nMRUCount =
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount();
914 nRealPos =
nPos + nMRUCount;
917 nRealPos =
m_pImpl->m_pImplLB->InsertEntry( nRealPos, rStr, rImage );
918 nRealPos -=
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount();
925 const sal_Int32 nMRUCount =
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount();
927 m_pImpl->m_pImplLB->RemoveEntry(
nPos + nMRUCount );
941 if (
m_pImpl->m_pImplLB->GetEntryList().HasEntryImage(
nPos))
942 return m_pImpl->m_pImplLB->GetEntryList().GetEntryImage(
nPos );
948 sal_Int32
nPos =
m_pImpl->m_pImplLB->GetEntryList().FindEntry( rStr );
950 nPos -=
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount();
956 const sal_Int32 nMRUCount =
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount();
960 return m_pImpl->m_pImplLB->GetEntryList().GetEntryText(
nPos + nMRUCount );
967 return m_pImpl->m_pImplLB->GetEntryList().GetEntryCount() -
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount();
972 return m_pImpl->m_pImplLB->IsTravelSelect();
979 return m_pImpl->m_pFloatWin &&
m_pImpl->m_pFloatWin->IsInPopupMode() &&
m_pImpl->m_pFloatWin->ImplIsInPrivatePopupMode();
984 return m_pImpl->m_pImplLB->IsMultiSelectionEnabled();
993 m_pImpl->m_pSubEdit->SetActivateHdl(rLink);
1020 return std::max(nScrollBarWidth, nButtonDownWidth);
1032 aSz =
m_pImpl->m_pImplLB->CalcSize(
m_pImpl->m_pImplLB->GetEntryList().GetEntryCount() );
1039 if (
m_pImpl->m_nWidthInChars!= -1)
1045 if (
m_pImpl->m_nMaxWidthChars != -1)
1054 ComboBoxBounds aBounds(
m_pImpl->calcComboBoxDropDownComponentBounds(
1055 Size(0xFFFF, 0xFFFF),
Size(0xFFFF, 0xFFFF)));
1066 Size aSz = rPrefSize;
1067 sal_Int32 nLeft, nTop, nRight, nBottom;
1131 return m_pImpl->m_pImplLB->GetEntryHeight();
1140 rnCols = (nCharWidth > 0) ?
static_cast<sal_uInt16
>(aOutSz.
Width()/nCharWidth) : 1;
1145 Size aOutSz =
m_pImpl->m_pSubEdit->GetOutputSizePixel();
1146 rnCols = (nCharWidth > 0) ?
static_cast<sal_uInt16
>(aOutSz.
Width()/nCharWidth) : 1;
1168 if ( bBorder || bBackground )
1188 tools::Long nEditHeight = nTextHeight + 6*nOnePixel;
1192 Size aOrigSize(
m_pImpl->m_pSubEdit->GetSizePixel());
1194 m_pImpl->m_pSubEdit->Draw( pDev, rPos, nFlags );
1195 m_pImpl->m_pSubEdit->SetSizePixel(aOrigSize);
1224 sal_Int32 nLines =
static_cast<sal_Int32
>( nTextHeight > 0 ? (aSize.
Height()-nEditHeight)/nTextHeight : 1 );
1233 aTextRect.
AdjustTop(nEditHeight + nOnePixel );
1237 for ( sal_Int32
n = 0;
n < nLines; ++
n )
1239 pDev->
DrawText( aTextRect,
m_pImpl->m_pImplLB->GetEntryList().GetEntryText(
n+nTEntry ), nTextStyle );
1250 Size aOrigSize(
m_pImpl->m_pSubEdit->GetSizePixel());
1252 m_pImpl->m_pSubEdit->Draw( pDev, rPos, nFlags );
1253 m_pImpl->m_pSubEdit->SetSizePixel(aOrigSize);
1260 m_pImpl->m_pImplLB->SetUserDrawHdl(rLink);
1285 m_pImpl->m_pImplLB->AddSeparator(
n );
1290 m_pImpl->m_pImplLB->SetMRUEntries( rEntries,
';' );
1295 return m_pImpl->m_pImplLB ?
m_pImpl->m_pImplLB->GetMRUEntries(
';' ) : OUString();
1300 m_pImpl->m_pImplLB->SetMaxMRUCount(
n );
1305 return m_pImpl->m_pImplLB ?
m_pImpl->m_pImplLB->GetMaxMRUCount() : 0;
1310 return m_pImpl->m_pImplLB ?
m_pImpl->m_pImplLB->GetDisplayLineCount() : 0;
1315 m_pImpl->m_pImplLB->SetEntryData(
nPos +
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount(), pNewData );
1320 return m_pImpl->m_pImplLB->GetEntryList().GetEntryData(
1321 nPos +
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount() );
1327 if (nPos < m_pImpl->m_pImplLB->GetEntryList().GetMRUCount())
1335 ?
m_pImpl->m_pFloatWin->GetWindowExtentsRelative(*
this)
1341 if (!
m_pImpl->m_pSubEdit->IsBackground())
1355 return m_pImpl->m_pImplLB->GetEntryList().GetSelectedEntryCount();
1360 sal_Int32
nPos =
m_pImpl->m_pImplLB->GetEntryList().GetSelectedEntryPos(
nIndex );
1363 if (nPos < m_pImpl->m_pImplLB->GetEntryList().GetMRUCount())
1364 nPos =
m_pImpl->m_pImplLB->GetEntryList().FindEntry(
m_pImpl->m_pImplLB->GetEntryList().GetEntryText(
nPos));
1365 nPos = sal::static_int_cast<sal_Int32>(
nPos -
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount());
1372 return m_pImpl->m_pImplLB->GetEntryList().IsEntryPosSelected(
1373 nPos +
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount() );
1378 if (nPos < m_pImpl->m_pImplLB->GetEntryList().GetEntryCount())
1379 m_pImpl->m_pImplLB->SelectEntry(
1380 nPos +
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount(), bSelect);
1385 m_pImpl->m_pImplLB->SetNoSelection();
1386 m_pImpl->m_pSubEdit->SetText( OUString() );
1399 Window::SetBorderStyle( nBorderStyle );
1402 m_pImpl->m_pSubEdit->SetBorderStyle( nBorderStyle );
1403 m_pImpl->m_pImplLB->SetBorderStyle( nBorderStyle );
1419 m_pImpl->m_pSubEdit->SetSettings(aSettings);
1421 m_pImpl->m_pImplLB->SetHighlightColor(rColor);
1436 m_pImpl->m_pSubEdit->SetSettings(aSettings);
1438 m_pImpl->m_pImplLB->SetHighlightTextColor(rColor);
1443 return m_pImpl->m_pImplLB->GetMainWindow();
1481 const Size &rOutSz,
const Size &rBorderOutSz)
const
1483 ComboBoxBounds aBounds;
1501 aContent.
Move(-aPoint.
X(), -aPoint.
Y());
1503 aBounds.aButtonPos =
Point(aContent.
Left(), nTop);
1511 aContent.
Move(-aPoint.
X(), -aPoint.
Y());
1514 aBounds.aSubEditPos = aContent.
TopLeft();
1515 aBounds.aSubEditSize = aContent.
GetSize();
1525 tools::Long nSBWidth = m_rThis.GetSettings().GetStyleSettings().GetScrollBarSize();
1526 nSBWidth = m_rThis.CalcZoom( nSBWidth );
1527 aBounds.aSubEditSize =
Size(rOutSz.
Width() - nSBWidth, rOutSz.
Height());
1528 aBounds.aButtonPos =
Point(rOutSz.
Width() - nSBWidth, nTop);
1529 aBounds.aButtonSize =
Size(nSBWidth, (nBottom-nTop));
1536 if (nWidthInChars !=
m_pImpl->m_nWidthInChars)
1538 m_pImpl->m_nWidthInChars = nWidthInChars;
1545 if (nWidth !=
m_pImpl->m_nMaxWidthChars)
1547 m_pImpl->m_nMaxWidthChars = nWidth;
1554 if (rKey ==
"width-chars")
1556 else if (rKey ==
"max-width-chars")
1558 else if (rKey ==
"can-focus")
1570 else if (rKey ==
"placeholder-text")
1587 auto entriesNode = rJsonWriter.
startArray(
"entries");
1595 auto selectedNode = rJsonWriter.
startArray(
"selectedEntries");
static bool toBool(std::string_view rValue)
const StyleSettings & GetStyleSettings() const
void SetStyleSettings(const StyleSettings &rSet)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
A widget used to choose from a list of items and which has an entry.
sal_Int32 InsertEntryWithImage(const OUString &rStr, const Image &rImage, sal_Int32 nPos=COMBOBOX_APPEND)
void SetEntryActivateHdl(const Link< Edit &, bool > &rLink)
SAL_DLLPRIVATE tools::Long getMaxWidthScrollBarAndDownButton() const
virtual void SetText(const OUString &rStr) override
void RemoveEntryAt(sal_Int32 nPos)
bool IsTravelSelect() const
bool IsEntryPosSelected(sal_Int32 nPos) const
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
Size CalcAdjustedSize(const Size &rPrefSize) const
void SetMaxMRUCount(sal_Int32 n)
OUString GetMRUEntries() const
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All) override
virtual FactoryFunction GetUITestFactory() const override
Image GetEntryImage(sal_Int32 nPos) const
Size CalcBlockSize(sal_uInt16 nColumns, sal_uInt16 nLines) const
void AdaptDropDownLineCountToMaximum()
void SetUserDrawHdl(const Link< UserDrawEvent *, void > &rLink)
virtual bool set_property(const OUString &rKey, const OUString &rValue) override
ImplListBoxWindow * GetMainWindow() const
tools::Rectangle GetDropDownPosSizePixel() const
std::unique_ptr< Impl > m_pImpl
virtual const Wallpaper & GetDisplayBackground() const override
void GetMaxVisColumnsAndLines(sal_uInt16 &rnCols, sal_uInt16 &rnLines) const
virtual ~ComboBox() override
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
void SetEntryData(sal_Int32 nPos, void *pNewData)
virtual void Modify() override
SAL_DLLPRIVATE void ImplCalcEditHeight()
bool IsInDropDown() const
virtual void StateChanged(StateChangedType nType) override
void SetUserItemSize(const Size &rSz)
void EnableAutocomplete(bool bEnable, bool bMatchCase=false)
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
sal_Int32 GetEntryPos(std::u16string_view rStr) const
bool IsMultiSelectionEnabled() const
void SetHighlightColor(const Color &rColor)
sal_Int32 GetEntryCount() const
bool IsDropDownBox() const
void SetBorderStyle(WindowBorderStyle nBorderStyle)
Size CalcMinimumSize() const override
sal_uInt16 GetDropDownLineCount() const
void SetWidthInChars(sal_Int32 nWidthInChars)
static SAL_DLLPRIVATE WinBits ImplInitStyle(WinBits nStyle)
void EnableUserDraw(bool bUserDraw)
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
tools::Long GetIndexForPoint(const Point &rPoint, sal_Int32 &rPos) const
sal_uInt16 GetDisplayLineCount() const
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
tools::Rectangle GetBoundingRectangle(sal_Int32 nItem) const
void DrawEntry(const UserDrawEvent &rEvt)
void AddSeparator(sal_Int32 n)
Adds a new separator at the given position n.
void SetDropDownLineCount(sal_uInt16 nLines)
void EnableAutoSize(bool bAuto)
virtual Size GetOptimalSize() const override
void SetSelectHdl(const Link< ComboBox &, void > &rLink)
bool IsUserDrawEnabled() const
OUString GetEntry(sal_Int32 nPos) const
sal_Int32 InsertEntry(const OUString &rStr, sal_Int32 nPos=COMBOBOX_APPEND)
tools::Long GetDropDownEntryHeight() const
virtual void Draw(OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags) override
bool IsSyntheticModify() const
void * GetEntryData(sal_Int32 nPos) const
sal_Int32 GetSelectedEntryCount() const
bool IsModifyByKeyboard() const
void SetMRUEntries(std::u16string_view rEntries)
sal_Int32 GetTopEntry() const
ComboBox(vcl::Window *pParent, WinBits nStyle=0)
virtual void FillLayoutData() const override
sal_Int32 GetMaxMRUCount() const
void SetHighlightTextColor(const Color &rColor)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
bool IsAutoSizeEnabled() const
void setMaxWidthChars(sal_Int32 nWidth)
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual void Resize() override
bool IsAutocompleteEnabled() const
CommandEventId GetCommand() const
std::optional< vcl::ControlLayoutData > mxLayoutData
tools::Long GetIndexForPoint(const Point &rPoint) const
tools::Long ToRelativeLineIndex(tools::Long nIndex) const
ToRelativeLineIndex changes a layout data index to a count relative to its line.
bool ImplCallEventListenersAndHandler(VclEventId nEvent, std::function< void()> const &callHandler)
this calls both our event listeners, and a specified handler
void SetLayoutDataParent(const Control *pParent) const
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual void Resize() override
bool HasLayoutData() const
determines whether we currently have layout data
void AppendLayoutData(const Control &rSubControl) const
SAL_DLLPRIVATE void ImplDrawFrame(OutputDevice *pDev, tools::Rectangle &rRect)
draws a frame around the give rectangle, onto the given device
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
void SetPlaceholderText(const OUString &rStr)
virtual void SetText(const OUString &rStr) override
SAL_DLLPRIVATE tools::Long ImplGetExtraXOffset() const
virtual void SetSelection(const Selection &rSelection)
void SetSubEdit(Edit *pEdit)
virtual Size CalcMinimumSizeForText(const OUString &rString) const
virtual bool IsReadOnly() const
virtual void StateChanged(StateChangedType nType) override
virtual OUString GetText() const override
sal_Int32 FindEntry(std::u16string_view rStr, bool bSearchMRUArea=false) const
void AllowGrabFocus(bool b)
sal_Int32 GetEntryPosForPoint(const Point &rPoint) const
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
tools::Rectangle GetBoundingRectangle(sal_Int32 nItem) const
void DrawEntry(vcl::RenderContext &rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText)
void EnableUserDraw(bool bUserDraw)
void SetUserItemSize(const Size &rSz)
bool IsUserDrawEnabled() const
const vcl::KeyCode & GetKeyCode() const
const KeyEvent * GetKeyEvent() const
vcl::Window * GetWindow() const
const CommandEvent * GetCommandEvent() const
NotifyEventType GetType() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
void SetFont(const vcl::Font &rNewFont)
void DrawRect(const tools::Rectangle &rRect)
void SetTextColor(const Color &rColor)
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
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)
void IntersectClipRegion(const tools::Rectangle &rRect)
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
sal_Int32 GetScrollBarSize() const
void SetHighlightTextColor(const Color &rColor)
void SetHighlightColor(const Color &rColor)
const Color & GetDisableColor() const
Event to pass information for UserDraw() handling eg. in comboboxes.
vcl::RenderContext * GetRenderContext() const
sal_uInt16 GetItemId() const
static VclPtr< reference_type > Create(Arg &&... arg)
A construction helper for VclPtr.
sal_uInt16 GetCode() const
Point AbsoluteScreenToOutputPixel(const Point &rPos) const
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.
void SetStyle(WinBits nStyle)
bool IsReallyVisible() const
bool HasChildPathFocus(bool bSystemWindow=false) const
Point LogicToPixel(const Point &rLogicPt) const
virtual const Wallpaper & GetDisplayBackground() const
float approximate_digit_width() const
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
vcl::Window * GetWindow(GetWindowType nType) const
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
const Color & GetControlForeground() const
bool IsUpdateMode() const
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
vcl::Font GetDrawPixelFont(::OutputDevice const *pDev) const
const Fraction & GetZoom() const
const AllSettings & GetSettings() const
Size CalcWindowSize(const Size &rOutSz) const
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
vcl::Font GetControlFont() const
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
SAL_DLLPRIVATE float approximate_char_width() const
void SetSettings(const AllSettings &rSettings)
tools::Long GetDrawPixel(::OutputDevice const *pDev, tools::Long nPixels) const
const Color & GetTextColor() const
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
bool IsRTLEnabled() const
Point PixelToLogic(const Point &rDevicePt) const
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
bool IsControlBackground() const
virtual void DataChanged(const DataChangedEvent &rDCEvt)
const Color & GetControlBackground() const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
virtual bool set_property(const OUString &rKey, const OUString &rValue)
Point ScreenToOutputPixel(const Point &rPos) const
tools::Rectangle GetWindowExtentsRelative(const vcl::Window &rRelativeWindow) const
void SetCompoundControl(bool bCompound)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
IMPL_LINK(ComboBox::Impl, ImplAutocompleteHdl, Edit &, rEdit, void)
IMPL_LINK_NOARG(ComboBox::Impl, ImplClickBtnHdl, void *, void)
static void lcl_GetSelectedEntries(::std::set< sal_Int32 > &rSelectedPos, std::u16string_view rText, sal_Unicode cTokenSep, const ImplEntryList &rEntryList)
#define COMBOBOX_MAX_ENTRIES
ESelection aNewSelection(GetSelection())
void ImplInitDropDownButton(PushButton *pButton)
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_PAGEUP
#define LINK(Instance, Class, Member)
#define LISTBOX_ENTRY_NOTFOUND
OString strip(const OString &rIn, char c)
OString stripEnd(const OString &rIn, char c)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
VclPtr< ImplListBox > m_pImplLB
DECL_LINK(ImplSelectionChangedHdl, sal_Int32, void)
sal_Int32 m_nMaxWidthChars
DECL_LINK(ImplPopupModeEndHdl, FloatingWindow *, void)
DECL_LINK(ImplSelectHdl, LinkParamNone *, void)
sal_Int32 m_nWidthInChars
DECL_LINK(ImplCancelHdl, LinkParamNone *, void)
Link< ComboBox &, void > m_SelectHdl
void ImplInitComboBoxData()
void ImplUpdateFloatSelection()
VclPtr< ImplListBoxFloatingWindow > m_pFloatWin
VclPtr< Edit > m_pSubEdit
DECL_LINK(ImplAutocompleteHdl, Edit &, void)
DECL_LINK(ImplListItemSelectHdl, LinkParamNone *, void)
DECL_LINK(ImplDoubleClickHdl, ImplListBoxWindow *, void)
ComboBoxBounds calcComboBoxDropDownComponentBounds(const Size &rOutSize, const Size &rBorderOutSize) const
DECL_LINK(ImplClickBtnHdl, void *, void)
WinBits const WB_DROPDOWN
WinBits const WB_NOTABSTOP
WinBits const WB_SIMPLEMODE
WinBits const WB_AUTOHSCROLL
WinBits const WB_NOLIGHTBORDER
WinBits const WB_NOBORDER
WinBits const WB_RECTSTYLE