85 const Size &rOutSize,
const Size &rBorderOutSize)
const;
90 DECL_LINK( ImplClickBtnHdl,
void*,
void );
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);
199 if( nStyle & WB_DROPDOWN )
203 m_pImpl->m_pFloatWin->RequestDoubleBuffering(
true);
204 m_pImpl->m_pFloatWin->SetAutoWidth(
true );
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();
371 while ( nIndex >= 0 )
373 sal_Int32 nPrevIndex = nIndex;
374 std::u16string_view aToken =
o3tl::getToken(aText, 0, m_cMultiSep, nIndex );
375 sal_Int32 nTokenLen = aToken.size();
377 sal_Int32 nP = m_pImplLB->GetEntryList().FindEntry( aToken );
380 aText = aText.replaceAt( nPrevIndex, nTokenLen,
u"" );
381 nIndex = nIndex - nTokenLen;
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;
876 for (sal_Int32
n = 0;
n < m_pImplLB->GetEntryList().GetEntryCount();
n++)
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);
1015 nButtonDownWidth = aContent.
getWidth();
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;
1169 if ( bBorder || bBackground )
1189 tools::Long nEditHeight = nTextHeight + 6*nOnePixel;
1193 Size aOrigSize(
m_pImpl->m_pSubEdit->GetSizePixel());
1195 m_pImpl->m_pSubEdit->Draw( pDev, aPos, nFlags );
1196 m_pImpl->m_pSubEdit->SetSizePixel(aOrigSize);
1225 sal_Int32 nLines =
static_cast<sal_Int32
>( nTextHeight > 0 ? (aSize.
Height()-nEditHeight)/nTextHeight : 1 );
1234 aTextRect.
AdjustTop(nEditHeight + nOnePixel );
1238 for ( sal_Int32
n = 0;
n < nLines; ++
n )
1240 pDev->
DrawText( aTextRect,
m_pImpl->m_pImplLB->GetEntryList().GetEntryText(
n+nTEntry ), nTextStyle );
1251 Size aOrigSize(
m_pImpl->m_pSubEdit->GetSizePixel());
1253 m_pImpl->m_pSubEdit->Draw( pDev, rPos, nFlags );
1254 m_pImpl->m_pSubEdit->SetSizePixel(aOrigSize);
1261 m_pImpl->m_pImplLB->SetUserDrawHdl(rLink);
1286 m_pImpl->m_pImplLB->AddSeparator( n );
1291 m_pImpl->m_pImplLB->SetMRUEntries( rEntries,
';' );
1296 return m_pImpl->m_pImplLB ?
m_pImpl->m_pImplLB->GetMRUEntries(
';' ) : OUString();
1301 m_pImpl->m_pImplLB->SetMaxMRUCount( n );
1306 return m_pImpl->m_pImplLB ?
m_pImpl->m_pImplLB->GetMaxMRUCount() : 0;
1311 return m_pImpl->m_pImplLB ?
m_pImpl->m_pImplLB->GetDisplayLineCount() : 0;
1316 m_pImpl->m_pImplLB->SetEntryData( nPos +
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount(), pNewData );
1321 return m_pImpl->m_pImplLB->GetEntryList().GetEntryData(
1322 nPos +
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount() );
1328 if (nPos < m_pImpl->m_pImplLB->GetEntryList().GetMRUCount())
1336 ?
m_pImpl->m_pFloatWin->GetWindowExtentsRelative(
this)
1342 if (!
m_pImpl->m_pSubEdit->IsBackground())
1356 return m_pImpl->m_pImplLB->GetEntryList().GetSelectedEntryCount();
1361 sal_Int32
nPos =
m_pImpl->m_pImplLB->GetEntryList().GetSelectedEntryPos( nIndex );
1364 if (nPos < m_pImpl->m_pImplLB->GetEntryList().GetMRUCount())
1365 nPos =
m_pImpl->m_pImplLB->GetEntryList().FindEntry(
m_pImpl->m_pImplLB->GetEntryList().GetEntryText(nPos));
1366 nPos = sal::static_int_cast<sal_Int32>(nPos -
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount());
1373 return m_pImpl->m_pImplLB->GetEntryList().IsEntryPosSelected(
1374 nPos +
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount() );
1379 if (nPos < m_pImpl->m_pImplLB->GetEntryList().GetEntryCount())
1380 m_pImpl->m_pImplLB->SelectEntry(
1381 nPos +
m_pImpl->m_pImplLB->GetEntryList().GetMRUCount(), bSelect);
1386 m_pImpl->m_pImplLB->SetNoSelection();
1387 m_pImpl->m_pSubEdit->SetText( OUString() );
1400 Window::SetBorderStyle( nBorderStyle );
1403 m_pImpl->m_pSubEdit->SetBorderStyle( nBorderStyle );
1404 m_pImpl->m_pImplLB->SetBorderStyle( nBorderStyle );
1410 return m_pImpl->m_pImplLB->GetMainWindow();
1448 const Size &rOutSz,
const Size &rBorderOutSz)
const
1450 ComboBoxBounds aBounds;
1468 aContent.
Move(-aPoint.X(), -aPoint.Y());
1470 aBounds.aButtonPos =
Point(aContent.
Left(), nTop);
1471 aBounds.aButtonSize =
Size(aContent.
getWidth(), (nBottom-nTop));
1478 aContent.
Move(-aPoint.X(), -aPoint.Y());
1481 aBounds.aSubEditPos = aContent.
TopLeft();
1482 aBounds.aSubEditSize = aContent.
GetSize();
1492 tools::Long nSBWidth = m_rThis.GetSettings().GetStyleSettings().GetScrollBarSize();
1493 nSBWidth = m_rThis.CalcZoom( nSBWidth );
1494 aBounds.aSubEditSize =
Size(rOutSz.
Width() - nSBWidth, rOutSz.
Height());
1495 aBounds.aButtonPos =
Point(rOutSz.
Width() - nSBWidth, nTop);
1496 aBounds.aButtonSize =
Size(nSBWidth, (nBottom-nTop));
1503 if (nWidthInChars !=
m_pImpl->m_nWidthInChars)
1505 m_pImpl->m_nWidthInChars = nWidthInChars;
1512 if (nWidth !=
m_pImpl->m_nMaxWidthChars)
1514 m_pImpl->m_nMaxWidthChars = nWidth;
1521 if (rKey ==
"width-chars")
1523 else if (rKey ==
"max-width-chars")
1525 else if (rKey ==
"can-focus")
1537 else if (rKey ==
"placeholder-text")
1554 auto entriesNode = rJsonWriter.
startArray(
"entries");
1562 auto selectedNode = rJsonWriter.
startArray(
"selectedEntries");
static bool toBool(std::string_view rValue)
OString stripEnd(const OString &rIn, char c)
#define LINK(Instance, Class, Member)
virtual FactoryFunction GetUITestFactory() const override
bool IsControlBackground() const
virtual const Wallpaper & GetDisplayBackground() const
void SetUserDrawHdl(const Link< UserDrawEvent *, void > &rLink)
bool ImplCallEventListenersAndHandler(VclEventId nEvent, std::function< void()> const &callHandler)
this calls both our event listeners, and a specified handler
Size CalcBlockSize(sal_uInt16 nColumns, sal_uInt16 nLines) const
bool IsSyntheticModify() const
SAL_DLLPRIVATE void ImplCalcEditHeight()
Link< ComboBox &, void > m_SelectHdl
tools::Rectangle GetBoundingRectangle(sal_Int32 nItem) const
void setWidth(tools::Long nWidth)
void SetUserItemSize(const Size &rSz)
bool IsAutoSizeEnabled() const
const CommandEvent * GetCommandEvent() const
virtual void StateChanged(StateChangedType nType) override
std::optional< vcl::ControlLayoutData > mxLayoutData
SAL_DLLPRIVATE void ImplDrawFrame(OutputDevice *pDev, tools::Rectangle &rRect)
draws a frame around the give rectangle, onto the given device
SAL_DLLPRIVATE float approximate_char_width() const
void ImplUpdateFloatSelection()
void AllowGrabFocus(bool b)
virtual Size CalcMinimumSizeForText(const OUString &rString) const
Point AbsoluteScreenToOutputPixel(const Point &rPos) const
sal_Int32 GetEntryPos(std::u16string_view rStr) const
sal_Int32 m_nWidthInChars
OUString GetMRUEntries() const
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
const StyleSettings & GetStyleSettings() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
float approximate_digit_width() const
static void lcl_GetSelectedEntries(::std::set< sal_Int32 > &rSelectedPos, std::u16string_view rText, sal_Unicode cTokenSep, const ImplEntryList &rEntryList)
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
sal_Int32 GetEntryPosForPoint(const Point &rPoint) const
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
tools::Long GetDropDownEntryHeight() const
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
void SetMaxMRUCount(sal_Int32 n)
sal_uInt16 GetCode() const
sal_Int32 FindEntry(std::u16string_view rStr, bool bSearchMRUArea=false) const
DataChangedEventType GetType() const
const KeyEvent * GetKeyEvent() const
void IntersectClipRegion(const tools::Rectangle &rRect)
struct SAL_DLLPRIVATE Impl
void SetPlaceholderText(const OUString &rStr)
void AppendLayoutData(const Control &rSubControl) const
bool IsTravelSelect() const
const Color & GetControlBackground() const
bool IsRTLEnabled() const
bool HasChildPathFocus(bool bSystemWindow=false) const
VclPtr< ImplListBoxFloatingWindow > m_pFloatWin
sal_Int32 GetMaxMRUCount() const
void SetBorderStyle(WindowBorderStyle nBorderStyle)
constexpr sal_uInt16 KEY_UP
#define LISTBOX_ENTRY_NOTFOUND
VclPtr< ImplListBox > m_pImplLB
DECL_LINK(ImplSelectHdl, LinkParamNone *, void)
void SetEntryData(sal_Int32 nPos, void *pNewData)
const Fraction & GetZoom() const
constexpr tools::Long Width() const
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
OUString GetEntry(sal_Int32 nPos) const
sal_uInt16 GetDisplayLineCount() const
vcl::Window * GetWindow() const
bool IsEntryPosSelected(sal_Int32 nPos) const
ESelection aNewSelection(GetSelection())
bool IsMultiSelectionEnabled() const
void EnableUserDraw(bool bUserDraw)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Image GetEntryImage(sal_Int32 nPos) const
void SetSelectHdl(const Link< ComboBox &, void > &rLink)
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
sal_uInt16 GetDropDownLineCount() const
std::unique_ptr< Impl > m_pImpl
AllSettingsFlags GetFlags() const
constexpr sal_uInt16 KEY_PAGEUP
bool IsInDropDown() const
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
void SetCompoundControl(bool bCompound)
ComboBox(vcl::Window *pParent, WinBits nStyle=0)
tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const
void AdaptDropDownLineCountToMaximum()
virtual void SetSelection(const Selection &rSelection)
void DrawRect(const tools::Rectangle &rRect)
void SetWidthInChars(sal_Int32 nWidthInChars)
const Color & GetControlForeground() const
static SAL_DLLPRIVATE WinBits ImplInitStyle(WinBits nStyle)
void SetUserItemSize(const Size &rSz)
constexpr sal_uInt16 KEY_DOWN
virtual Size GetOptimalSize() const override
WinBits const WB_NOLIGHTBORDER
Size CalcWindowSize(const Size &rOutSz) const
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
sal_Int32 GetScrollBarSize() const
bool IsDropDownBox() const
const Color & GetDisableColor() const
vcl::RenderContext * GetRenderContext() const
Point LogicToPixel(const Point &rLogicPt) const
void SetEntryActivateHdl(const Link< Edit &, bool > &rLink)
virtual void Draw(OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags) override
void setMaxWidthChars(sal_Int32 nWidth)
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
virtual void StateChanged(StateChangedType nType) override
WinBits const WB_SIMPLEMODE
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual OUString GetText() const override
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
bool IsUpdateMode() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const AllSettings & GetSettings() const
CommandEventId GetCommand() const
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
void SetTextColor(const Color &rColor)
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)
constexpr sal_uInt16 KEY_PAGEDOWN
WinBits const WB_RECTSTYLE
void RemoveEntryAt(sal_Int32 nPos)
MouseNotifyEvent GetType() const
IMPL_LINK_NOARG(ComboBox::Impl, ImplClickBtnHdl, void *, void)
SAL_DLLPRIVATE tools::Long ImplGetExtraXOffset() const
void SetSubEdit(Edit *pEdit)
WinBits const WB_DROPDOWN
virtual ~ComboBox() override
Point PixelToLogic(const Point &rDevicePt) const
virtual bool set_property(const OString &rKey, const OUString &rValue)
void DrawEntry(vcl::RenderContext &rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText)
Point ScreenToOutputPixel(const Point &rPos) const
IMPL_LINK(ComboBox::Impl, ImplAutocompleteHdl, Edit &, rEdit, void)
void SetStyle(WinBits nStyle)
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
constexpr sal_uInt16 KEY_RETURN
WinBits const WB_NOBORDER
sal_uInt16 GetItemId() const
void EnableAutocomplete(bool bEnable, bool bMatchCase=false)
vcl::Window * GetWindow(GetWindowType nType) const
void GetMaxVisColumnsAndLines(sal_uInt16 &rnCols, sal_uInt16 &rnLines) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void ImplInitComboBoxData()
tools::Rectangle GetDropDownPosSizePixel() const
virtual const Wallpaper & GetDisplayBackground() const override
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
const vcl::KeyCode & GetKeyCode() const
bool IsUserDrawEnabled() const
virtual bool set_property(const OString &rKey, const OUString &rValue) override
virtual void Resize() override
tools::Long GetIndexForPoint(const Point &rPoint) const
VclPtr< Edit > m_pSubEdit
sal_Int32 GetEntryCount() const
constexpr tools::Long Height() const
SAL_DLLPRIVATE tools::Long getMaxWidthScrollBarAndDownButton() const
void SetFont(const vcl::Font &rNewFont)
bool IsAutocompleteEnabled() const
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
#define COMBOBOX_MAX_ENTRIES
vcl::Font GetDrawPixelFont(::OutputDevice const *pDev) const
sal_Int32 GetTopEntry() const
OString strip(const OString &rIn, char c)
tools::Long AdjustWidth(tools::Long n)
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
Size CalcAdjustedSize(const Size &rPrefSize) const
const Color & GetTextColor() const
tools::Long GetDrawPixel(::OutputDevice const *pDev, tools::Long nPixels) const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
bool IsModifyByKeyboard() const
WinBits const WB_AUTOHSCROLL
tools::Long AdjustHeight(tools::Long n)
sal_Int32 GetSelectedEntryCount() const
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All) override
void * GetEntryData(sal_Int32 nPos) const
Size GetOutputSizePixel() const
virtual void FillLayoutData() const override
void DrawEntry(const UserDrawEvent &rEvt)
void setHeight(tools::Long nHeight)
A widget used to choose from a list of items and which has an entry.
sal_Int32 m_nMaxWidthChars
Event to pass information for UserDraw() handling eg. in comboboxes.
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 SetDropDownLineCount(sal_uInt16 nLines)
sal_Int32 InsertEntryWithImage(const OUString &rStr, const Image &rImage, sal_Int32 nPos=COMBOBOX_APPEND)
ImplListBoxWindow * GetMainWindow() const
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
sal_Int32 InsertEntry(const OUString &rStr, sal_Int32 nPos=COMBOBOX_APPEND)
virtual bool IsReadOnly() const
void ImplInitDropDownButton(PushButton *pButton)
virtual void SetText(const OUString &rStr) override
void EnableUserDraw(bool bUserDraw)
tools::Long GetIndexForPoint(const Point &rPoint, sal_Int32 &rPos) const
bool IsReallyVisible() const
void SetMRUEntries(std::u16string_view rEntries)
vcl::Font GetControlFont() const
virtual void SetText(const OUString &rStr) override
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 AddSeparator(sal_Int32 n)
Adds a new separator at the given position n.
WinBits const WB_NOTABSTOP
Size CalcMinimumSize() const override
void EnableAutoSize(bool bAuto)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
bool HasLayoutData() const
determines whether we currently have layout data
virtual void Resize() override
ComboBoxBounds calcComboBoxDropDownComponentBounds(const Size &rOutSize, const Size &rBorderOutSize) const
tools::Long ToRelativeLineIndex(tools::Long nIndex) const
ToRelativeLineIndex changes a layout data index to a count relative to its line.
tools::Rectangle GetBoundingRectangle(sal_Int32 nItem) const
virtual void DataChanged(const DataChangedEvent &rDCEvt)
bool IsUserDrawEnabled() const
bool m_bDetectedRangeSegmentation false
virtual void Modify() override
void SetLayoutDataParent(const Control *pParent) const
virtual bool EventNotify(NotifyEvent &rNEvt) override