39 #include <bitmaps.hlst>
43 #include <osl/diagnose.h>
48 #include <officecfg/Office/Common.hxx>
49 #include <boost/property_tree/ptree.hpp>
72 #define STYLE_RADIOBUTTON_MONO (sal_uInt16(0x0001)) // legacy
73 #define STYLE_CHECKBOX_MONO (sal_uInt16(0x0001)) // legacy
216 bool bDrawText = !aText.isEmpty();
217 bool bHasSymbol = pSymbolRect !=
nullptr;
220 if (!bDrawImage && !bDrawText && !bHasSymbol)
232 if (bHasSymbol && !bDrawImage && !bDrawText)
234 *pSymbolRect = aOutRect;
237 else if (bDrawText && !bDrawImage && !bHasSymbol)
239 aOutRect =
DrawControlText(*pDev, aOutRect, aText, nTextStyle,
nullptr,
nullptr);
263 Size aDeviceTextSize;
264 Point aImagePos = rPos;
265 Point aTextPos = rPos;
269 if (bDrawText || bHasSymbol)
284 nSymbolHeight = nSymbolHeight * 3 / 4;
289 aTSSize.
setWidth( 3 * nSymbolHeight / 2 );
298 aSymbolSize = aSymbol.
GetSize();
303 if ((eImageAlign == ImageAlign::LeftTop) ||
304 (eImageAlign == ImageAlign::Left ) ||
305 (eImageAlign == ImageAlign::LeftBottom) ||
306 (eImageAlign == ImageAlign::RightTop) ||
307 (eImageAlign == ImageAlign::Right) ||
308 (eImageAlign == ImageAlign::RightBottom))
312 else if ((eImageAlign == ImageAlign::TopLeft) ||
313 (eImageAlign == ImageAlign::Top) ||
314 (eImageAlign == ImageAlign::TopRight) ||
315 (eImageAlign == ImageAlign::BottomLeft) ||
316 (eImageAlign == ImageAlign::Bottom) ||
317 (eImageAlign == ImageAlign::BottomRight))
330 if (bAddImageSep && bDrawImage)
344 if ((eImageAlign == ImageAlign::Left) ||
345 (eImageAlign == ImageAlign::Right))
347 aImagePos.setY( rPos.Y() + (aMax.
Height() - aImageSize.
Height()) / 2 );
348 aTextPos.setY( rPos.Y() + (aMax.
Height() - aTSSize.
Height()) / 2 );
350 else if ((eImageAlign == ImageAlign::LeftBottom) ||
351 (eImageAlign == ImageAlign::RightBottom))
353 aImagePos.setY( rPos.Y() + aMax.
Height() - aImageSize.
Height() );
354 aTextPos.setY( rPos.Y() + aMax.
Height() - aTSSize.
Height() );
356 else if ((eImageAlign == ImageAlign::Top) ||
357 (eImageAlign == ImageAlign::Bottom))
359 aImagePos.setX( rPos.X() + (aMax.
Width() - aImageSize.
Width()) / 2 );
360 aTextPos.setX( rPos.X() + (aMax.
Width() - aTSSize.
Width()) / 2 );
362 else if ((eImageAlign == ImageAlign::TopRight) ||
363 (eImageAlign == ImageAlign::BottomRight))
365 aImagePos.setX( rPos.X() + aMax.
Width() - aImageSize.
Width() );
366 aTextPos.setX( rPos.X() + aMax.
Width() - aTSSize.
Width() );
369 if ((eImageAlign == ImageAlign::LeftTop) ||
370 (eImageAlign == ImageAlign::Left) ||
371 (eImageAlign == ImageAlign::LeftBottom))
373 aTextPos.setX( rPos.X() + aImageSize.
Width() + nImageSep );
375 else if ((eImageAlign == ImageAlign::RightTop) ||
376 (eImageAlign == ImageAlign::Right) ||
377 (eImageAlign == ImageAlign::RightBottom))
379 aImagePos.setX( rPos.X() + aTSSize.
Width() + nImageSep );
381 else if ((eImageAlign == ImageAlign::TopLeft) ||
382 (eImageAlign == ImageAlign::Top) ||
383 (eImageAlign == ImageAlign::TopRight))
385 aTextPos.setY( rPos.Y() + aImageSize.
Height() + nImageSep );
387 else if ((eImageAlign == ImageAlign::BottomLeft) ||
388 (eImageAlign == ImageAlign::Bottom) ||
389 (eImageAlign == ImageAlign::BottomRight))
391 aImagePos.setY( rPos.Y() + aTSSize.
Height() + nImageSep );
393 else if (eImageAlign == ImageAlign::Center)
395 aImagePos.setX( rPos.X() + (aMax.
Width() - aImageSize.
Width()) / 2 );
396 aImagePos.setY( rPos.Y() + (aMax.
Height() - aImageSize.
Height()) / 2 );
397 aTextPos.setX( rPos.X() + (aMax.
Width() - aTSSize.
Width()) / 2 );
398 aTextPos.setY( rPos.Y() + (aMax.
Height() - aTSSize.
Height()) / 2 );
428 if (nXOffset < 0) nXOffset = 0;
429 if (nYOffset < 0) nYOffset = 0;
431 aImagePos.AdjustX(nXOffset );
432 aImagePos.AdjustY(nYOffset );
433 aTextPos.AdjustX(nXOffset );
434 aTextPos.AdjustY(nYOffset );
438 rPos.AdjustX(nXOffset );
439 rPos.AdjustY(nYOffset );
445 Point aRightPos(aTextPos.X() + aTextSize.
Width() + aSymbolSize.
Width() / 2, aTextPos.Y());
451 aTextPos.AdjustX(3 * nSymbolHeight / 2 );
456 pSymbolRect->
SetPosY(aTextPos.Y() + nYOffset);
468 pDev->
DrawImage(aImagePos, aImageSize, *pImage, nStyle);
470 pDev->
DrawImage(aImagePos, *pImage, nStyle);
476 DrawControlText(*pDev, aTOutRect, aText, nTextStyle,
nullptr,
nullptr, &aDeviceTextSize);
497 if (aFocusRect.
Left() < aOutputRect.
Left())
499 if (aFocusRect.
Top() < aOutputRect.
Top())
545 if (rKey ==
"image-position")
548 if (rValue ==
"left")
549 eAlign = ImageAlign::Left;
550 else if (rValue ==
"right")
551 eAlign = ImageAlign::Right;
552 else if (rValue ==
"top")
553 eAlign = ImageAlign::Top;
554 else if (rValue ==
"bottom")
555 eAlign = ImageAlign::Bottom;
558 else if (rKey ==
"focus-on-click")
584 const char* symbolTypeName(
SymbolType eSymbolType)
630 css::uno::Sequence<sal_Int8>
aSeq( static_cast<sal_Int8 const *>(aOStm.
GetData()), aOStm.
Tell());
631 OUStringBuffer
aBuffer(
"data:image/png;base64,");
633 rJsonWriter.
put(
"image", aBuffer.makeStringAndClear());
638 rJsonWriter.
put(
"has_default",
true);
650 if (pButton ==
nullptr)
700 ((pPrevWindow->
GetType() != WindowType::PUSHBUTTON ) &&
701 (pPrevWindow->
GetType() != WindowType::OKBUTTON ) &&
702 (pPrevWindow->
GetType() != WindowType::CANCELBUTTON) &&
703 (pPrevWindow->
GetType() != WindowType::HELPBUTTON )) ) )
771 if (colorLuminance < 205)
775 aStyleSettings.
Set3DColors(controlBackgroundColorHighlighted);
784 rRenderContext.OutputDevice::SetSettings(aSettings);
786 rRenderContext.OutputDevice::SetSettings(aOldSettings);
870 if (nButtonFlags & DrawButtonFlags::Pressed)
872 else if (nButtonFlags & DrawButtonFlags::Highlight)
877 if (nButtonFlags & DrawButtonFlags::Pressed)
879 else if (nButtonFlags & DrawButtonFlags::Highlight)
883 else if (nButtonFlags & DrawButtonFlags::Default)
884 if (nButtonFlags & DrawButtonFlags::Pressed)
886 else if (nButtonFlags & DrawButtonFlags::Highlight)
891 if (nButtonFlags & DrawButtonFlags::Pressed)
893 else if (nButtonFlags & DrawButtonFlags::Highlight)
919 if (nSymbolSize > aSize.
Width() / 2)
920 nSymbolSize = aSize.
Width() / 2;
922 nSeparatorX = aInRect.
Right() - 2*nSymbolSize;
927 aSize.
setWidth(std::max(static_cast<tools::Long>(1), aSize.
getWidth() - nWidthAdjust));
931 aSymbolRect.
SetLeft( aSymbolRect.
Right() - nSymbolSize );
934 nTextStyle,
nullptr,
true );
938 if( bMenuBtnSep && nSeparatorX > 0 )
940 Point aStartPt( nSeparatorX, aSymbolRect.
Top()+nDistance );
941 Point aEndPt( nSeparatorX, aSymbolRect.
Bottom()-nDistance );
953 nTextStyle,
IsSymbol() ? &aSymbolRect :
nullptr,
true );
973 bool bNativeOK =
false;
983 case WindowType::LISTBOX:
984 case WindowType::MULTILISTBOX:
985 case WindowType::TREELISTBOX:
989 case WindowType::COMBOBOX:
990 case WindowType::PATTERNBOX:
991 case WindowType::NUMERICBOX:
992 case WindowType::METRICBOX:
993 case WindowType::CURRENCYBOX:
994 case WindowType::DATEBOX:
995 case WindowType::TIMEBOX:
996 case WindowType::LONGCURRENCYBOX:
1037 if (Window::IsEnabled())
1050 aControlValue, OUString());
1065 bDrawMenuSep =
false;
1088 if (Window::IsEnabled())
1132 aControlValue, OUString() );
1141 aInRect, bDrawMenuSep, nButtonStyle);
1179 int dLeft(0), dRight(0), dTop(0), dBottom(0);
1180 bool bSetPos =
false;
1196 dLeft = aCont.
Left() - aBound.
Left();
1197 dTop = aCont.
Top() - aBound.
Top();
1200 bSetPos = dLeft || dTop || dRight || dBottom;
1209 aPos.Move(-dLeft, -dTop);
1220 aPos.Move(dLeft, dTop);
1399 if (!!rCustomButtonImage)
1419 std::optional<StyleSettings> oOrigDevStyleSettings;
1431 oOrigDevStyleSettings = aStyleSettings;
1437 pDev->OutputDevice::SetSettings( aSettings );
1443 if ( nFlags & SystemTextColorFlags::Mono )
1447 aRect = aDecoView.
DrawButton( aRect, nButtonStyle );
1453 if (oOrigDevStyleSettings)
1457 pDev->OutputDevice::SetSettings( aSettings );
1502 if ( bIsDefButton != bWasDefButton )
1557 case WindowType::LISTBOX:
1558 case WindowType::MULTILISTBOX:
1559 case WindowType::TREELISTBOX:
1563 case WindowType::COMBOBOX:
1564 case WindowType::PATTERNBOX:
1565 case WindowType::NUMERICBOX:
1566 case WindowType::METRICBOX:
1567 case WindowType::CURRENCYBOX:
1568 case WindowType::DATEBOX:
1569 case WindowType::TIMEBOX:
1570 case WindowType::LONGCURRENCYBOX:
1660 if (rEvent.State.has<
bool>())
1692 aSize =
Size( 16, 12 );
1694 aSize =
Size( 26, 24 );
1713 if (eImageAlign == ImageAlign::Top || eImageAlign == ImageAlign::Bottom)
1742 if (rKey ==
"has-default")
1805 static_cast<SystemWindow*>(pParent)->Close();
1839 if ( static_cast<Dialog*>(pParent)->IsInExecute() )
1840 static_cast<Dialog*>(pParent)->EndDialog();
1842 else if ( !static_cast<Dialog*>(pParent)->IsInClose() )
1845 static_cast<Dialog*>(pParent)->Close();
1851 static_cast<SystemWindow*>(pParent)->Close();
1900 officecfg::Office::Common::Help::HelpRootURL::get().isEmpty())
1915 nStyle =
ImplInitStyle(getPreviousSibling(pParent), nStyle);
1924 (!pPrevWindow || (pPrevWindow->
GetType() != WindowType::RADIOBUTTON)) )
1980 bool bNativeOK =
false;
2002 nState, aControlValue, OUString());
2046 rRenderContext.
DrawRect(aImageRect);
2056 aImagePos.AdjustX((aImageRect.
GetWidth() - aImageSize.
Width()) / 2 );
2057 aImagePos.AdjustY((aImageRect.
GetHeight() - aImageSize.
Height()) / 2 );
2059 rRenderContext.
DrawImage(aImagePos, aImageSize, *pImage, nImageStyle);
2061 rRenderContext.
DrawImage(aImagePos, *pImage, nImageStyle);
2074 if ((aImageSize.
Width() >= 20) || (aImageSize.
Height() >= 20))
2081 rRenderContext.
DrawRect(aImageRect);
2086 rRenderContext.
DrawRect(aImageRect);
2096 const Point& rPos,
const Size& rSize,
2103 Size aSize( rSize );
2105 aPos.AdjustX(rImageSize.
Width() + nImageSep );
2115 aSize.
setWidth(std::max(static_cast<tools::Long>(1), aSize.
getWidth() - nWidthAdjust));
2130 rMouseRect.
SetLeft( rPos.X() );
2132 rStateRect.
SetLeft( rPos.X() );
2140 if( rStateRect.
Top() < 0 )
2152 const Point& rPos,
const Size& rSize,
2165 if (!aText.isEmpty() ||
HasImage())
2168 rPos, rSize, rImageSize,
2169 rStateRect, rMouseRect);
2173 rStateRect.
SetLeft( rPos.X() );
2179 rStateRect.
SetTop( rPos.Y() );
2182 rMouseRect = rStateRect;
2189 bool bTopImage = (nWinStyle &
WB_TOP) != 0;
2196 if (!aText.isEmpty())
2211 Point aTxtPos = rPos;
2214 aTxtPos.AdjustX((rSize.
Width()-nTextWidth)/2 );
2215 aTxtPos.AdjustY(aImageRect.
Bottom()+6 );
2219 aTxtPos.AdjustX(aImageRect.
Right()+8 );
2220 aTxtPos.AdjustY((rSize.
Height()-nTextHeight)/2 );
2222 pDev->
DrawCtrlText( aTxtPos, aText, 0, aText.getLength() );
2225 rMouseRect = aImageRect;
2226 rStateRect = aImageRect;
2257 if (&rOther ==
this)
2262 m_xGroup = std::make_shared<std::vector<VclPtr<RadioButton> >>();
2275 for (
auto const& elem : aOthers)
2301 std::vector< VclPtr<RadioButton> > aGroup;
2304 if (pRadioButton ==
this)
2306 aGroup.push_back(pRadioButton);
2311 std::vector<VclPtr<RadioButton>> aGroup;
2330 if( pFirst->
GetType() == WindowType::RADIOBUTTON )
2332 if( pFirst !=
this || bIncludeThis )
2333 aGroup.emplace_back(static_cast<RadioButton*>(pFirst) );
2349 if ( pWindow->IsChecked() )
2351 pWindow->SetState(
false );
2352 if ( pWindow->isDisposed() )
2357 pWindow->mpWindowImpl->mnStyle &= ~
WB_TABSTOP;
2388 , mbUsesExplicitGroup(bUsesExplicitGroup)
2514 MapMode aResMapMode( MapUnit::Map100thMM );
2531 if ( !aBrd1Size.
Width() )
2533 if ( !aBrd1Size.
Height() )
2535 if ( !aBrd2Size.
Width() )
2537 if ( !aBrd2Size.
Height() )
2549 ImplDraw( pDev, nFlags, aPos, aSize,
2550 aImageSize, aStateRect, aMouseRect );
2559 nRadX -= aBrd1Size.
Width();
2560 nRadY -= aBrd1Size.
Height();
2565 nRadX -= aBrd1Size.
Width();
2566 nRadY -= aBrd1Size.
Height();
2579 OSL_FAIL(
"RadioButton::Draw() - not implemented for RadioButton with Image" );
2724 if (rKey ==
"active")
2726 else if (rKey ==
"image-position")
2729 if (rValue ==
"left")
2734 else if (rValue ==
"right")
2739 else if (rValue ==
"top")
2744 else if (rValue ==
"bottom")
2794 bool bDefaultSize =
true;
2805 aBoundingRgn, aContentRgn ) )
2807 aSize = aContentRgn.
GetSize();
2808 bDefaultSize =
false;
2817 std::vector<Image>& rList,
const std::vector<OUString> &rResources)
2819 Color aColorAry1[6];
2820 Color aColorAry2[6];
2821 aColorAry1[0] =
Color( 0xC0, 0xC0, 0xC0 );
2822 aColorAry1[1] =
Color( 0xFF, 0xFF, 0x00 );
2823 aColorAry1[2] =
Color( 0xFF, 0xFF, 0xFF );
2824 aColorAry1[3] =
Color( 0x80, 0x80, 0x80 );
2825 aColorAry1[4] =
Color( 0x00, 0x00, 0x00 );
2826 aColorAry1[5] =
Color( 0x00, 0xFF, 0x00 );
2834 static_assert(
sizeof(aColorAry1) ==
sizeof(aColorAry2),
"aColorAry1 must match aColorAry2" );
2836 for (
const auto &
a : rResources)
2840 rList.emplace_back(aBmpEx);
2848 sal_uInt16 nStyle = 0;
2865 std::vector<OUString> aResources;
2868 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO1);
2869 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO2);
2870 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO3);
2871 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO4);
2872 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO5);
2873 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO6);
2877 aResources.emplace_back(SV_RESID_BITMAP_RADIO1);
2878 aResources.emplace_back(SV_RESID_BITMAP_RADIO2);
2879 aResources.emplace_back(SV_RESID_BITMAP_RADIO3);
2880 aResources.emplace_back(SV_RESID_BITMAP_RADIO4);
2881 aResources.emplace_back(SV_RESID_BITMAP_RADIO5);
2882 aResources.emplace_back(SV_RESID_BITMAP_RADIO6);
2926 aBoundingRgn, aContentRgn ) )
2960 if (!aText.isEmpty())
3015 for(
const auto& pButton : aGroup)
3016 sGroupId += pButton->get_id();
3018 if (!sGroupId.isEmpty())
3019 rJsonWriter.
put(
"group", sGroupId);
3026 css::uno::Sequence<sal_Int8>
aSeq( static_cast<sal_Int8 const *>(aOStm.
GetData()), aOStm.
Tell());
3027 OUStringBuffer
aBuffer(
"data:image/png;base64,");
3029 rJsonWriter.
put(
"image", aBuffer.makeStringAndClear());
3047 nStyle =
ImplInitStyle(getPreviousSibling(pParent), nStyle);
3058 (!pPrevWindow || (pPrevWindow->
GetType() != WindowType::CHECKBOX)) )
3131 nState, aControlValue, OUString());
3152 const Point& rPos,
const Size& rSize,
3162 if (!aText.isEmpty() ||
HasImage())
3165 rPos, rSize, rImageSize,
3166 rStateRect, rMouseRect);
3170 rStateRect.
SetLeft( rPos.X() );
3176 rStateRect.
SetTop( rPos.Y() );
3183 rStateRect.
Move( 1, 1 );
3184 rMouseRect = rStateRect;
3338 MapMode aResMapMode( MapUnit::Map100thMM );
3356 if ( !aBrd1Size.
Width() )
3358 if ( !aBrd1Size.
Height() )
3360 if ( !aBrd2Size.
Width() )
3362 if ( !aBrd2Size.
Height() )
3376 ImplDraw( pDev, nFlags, aPos, aSize,
3377 aImageSize, aStateRect, aMouseRect );
3402 Point aTempPos11( aPos11 );
3403 Point aTempPos12( aPos12 );
3404 Point aTempPos21( aPos21 );
3405 Point aTempPos22( aPos22 );
3412 aTempPos11.setX( aPos11.X()+nDX );
3413 aTempPos12.setX( aPos12.X()+nDX );
3414 aTempPos21.setX( aPos21.X()+nDX );
3415 aTempPos22.setX( aPos22.X()+nDX );
3420 aTempPos11.setX( aPos11.X()-nDX );
3421 aTempPos12.setX( aPos12.X()-nDX );
3422 aTempPos21.setX( aPos21.X()-nDX );
3423 aTempPos22.setX( aPos22.X()-nDX );
3425 pDev->
DrawLine( aTempPos11, aTempPos12 );
3426 pDev->
DrawLine( aTempPos21, aTempPos22 );
3591 if (rKey ==
"active")
3612 bool bDefaultSize =
true;
3623 aBoundingRgn, aContentRgn ) )
3625 aSize = aContentRgn.
GetSize();
3626 bDefaultSize =
false;
3638 sal_uInt16 nStyle = 0;
3655 std::vector<OUString> aResources;
3658 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO1);
3659 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO2);
3660 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO3);
3661 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO4);
3662 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO5);
3663 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO6);
3664 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO7);
3665 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO8);
3666 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO9);
3670 aResources.emplace_back(SV_RESID_BITMAP_CHECK1);
3671 aResources.emplace_back(SV_RESID_BITMAP_CHECK2);
3672 aResources.emplace_back(SV_RESID_BITMAP_CHECK3);
3673 aResources.emplace_back(SV_RESID_BITMAP_CHECK4);
3674 aResources.emplace_back(SV_RESID_BITMAP_CHECK5);
3675 aResources.emplace_back(SV_RESID_BITMAP_CHECK6);
3676 aResources.emplace_back(SV_RESID_BITMAP_CHECK7);
3677 aResources.emplace_back(SV_RESID_BITMAP_CHECK8);
3678 aResources.emplace_back(SV_RESID_BITMAP_CHECK9);
3728 aBoundingRgn, aContentRgn ) )
3745 nMaxWidth -= aSize.
Width();
3748 if (!aText.isEmpty())
static bool toBool(std::string_view rValue)
virtual Point GetPosPixel() const
BitmapEx GetBitmapEx(BitmapEx const &rBitmapEx, DrawModeFlags nDrawMode)
#define LINK(Instance, Class, Member)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Size GetSizePixel() const
const Color & GetShadowColor() const
bool IsControlBackground() const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
SAL_DLLPRIVATE void ImplInitCheckBoxData()
bool ImplCallEventListenersAndHandler(VclEventId nEvent, std::function< void()> const &callHandler)
this calls both our event listeners, and a specified handler
CheckBox(const CheckBox &)=delete
Point GetPointerPosPixel()
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...
virtual Size GetOptimalSize() const override
const Color & GetActionButtonTextColor() const
virtual bool Close() override
void setWidth(tools::Long nWidth)
void Replace(const Color &rSearchColor, const Color &rReplaceColor)
Replace all pixel having the search color with the specified color.
tools::Rectangle maStateRect
virtual void MouseButtonDown(const MouseEvent &rMEvt)
OUString GetStandardText(StandardButtonType eButton)
std::optional< vcl::ControlLayoutData > mxLayoutData
void EndDialog(tools::Long nResult=RET_CANCEL)
void SetStyleSettings(const StyleSettings &rSet)
static SAL_DLLPRIVATE WinBits ImplInitStyle(const vcl::Window *pPrevWindow, WinBits nStyle)
const Color & GetDefaultButtonTextColor() const
Link< CheckBox &, void > maToggleHdl
virtual void FillLayoutData() const override
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
Gets the application's settings.
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
SAL_DLLPRIVATE void ImplDraw(OutputDevice *pDev, SystemTextColorFlags nSystemTextColorFlags, const Point &rPos, const Size &rSize, const Size &rImageSize, tools::Rectangle &rStateRect, tools::Rectangle &rMouseRect)
sal_uInt8 GetLuminance() const
const Color & GetFaceColor() const
const vcl::Font & GetRadioCheckFont() const
virtual void StateChanged(StateChangedType nStateChange) override
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
SAL_DLLPRIVATE void ImplGrabFocus(GetFocusFlags nFlags)
const OUString & GetQuickHelpText() const
void DrawPolygon(const tools::Polygon &rPoly)
Render the given polygon.
const Color & GetDefaultButtonPressedRolloverTextColor() const
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
virtual void SetSizePixel(const Size &rNewSize)
SAL_DLLPRIVATE WindowImpl * ImplGetWindowImpl() const
SAL_DLLPRIVATE void CompatStateChanged(StateChangedType nStateChange)
bool mbNoFocusRectsForFlatButtons
tools::Rectangle maMouseRect
sal_uInt16 GetCode() const
void SetParentClipMode(ParentClipMode nMode=ParentClipMode::NONE)
void setTristateVal(ButtonValue nTristate)
WinBits GetPrevStyle() const
DataChangedEventType GetType() const
void IntersectClipRegion(const tools::Rectangle &rRect)
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
tools::Rectangle DrawControlText(OutputDevice &_rTargetDevice, const tools::Rectangle &_rRect, const OUString &_rStr, DrawTextFlags _nStyle, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize=nullptr) const
draws the given text onto the given device
const Color & GetControlBackground() const
void SetState(TriState eState)
tools::Rectangle DrawButton(const tools::Rectangle &rRect, DrawButtonFlags nStyle)
constexpr sal_uInt16 KEY_SPACE
void SetQuickHelpText(const OUString &rHelpText)
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
ImplSVCtrlData maCtrlData
const Color & GetHighlightColor() const
bool IsTrackingRepeat() const
The invalidated area is painted with the background color/pattern.
tools::Rectangle GetControlTextRect(OutputDevice &_rTargetDevice, const tools::Rectangle &rRect, const OUString &_rStr, DrawTextFlags _nStyle, Size *o_pDeviceSize=nullptr) const
constexpr tools::Long Width() const
WinBits const WB_NOPOINTERFOCUS
virtual void KeyInput(const KeyEvent &rKEvt) override
const Color & GetRadioCheckTextColor() const
virtual bool set_property(const OString &rKey, const OUString &rValue) override
void Enable(bool bEnable=true, bool bChild=true)
const Color & GetDefaultButtonRolloverTextColor() const
sal_uInt16 GetButtons() const
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
WinBits const WB_DEFBUTTON
virtual void GetFocus() override
void ImplAdjustNWFSizes() override
bool IsControlForeground() const
bool IsEnterWindow() const
bool dispatchCommand(const OUString &rCommand, const uno::Reference< css::frame::XFrame > &rFrame, const css::uno::Sequence< css::beans::PropertyValue > &rArguments, const uno::Reference< css::frame::XDispatchResultListener > &rListener)
void EndTracking(TrackingEventFlags nFlags=TrackingEventFlags::NONE)
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const override
AllSettingsFlags GetFlags() const
const Color & GetLightColor() const
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
sal_uInt16 GetModifier() const
tools::Long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
virtual OUString GetText() const
static Image GetCheckImage(const AllSettings &rSettings, DrawButtonFlags nFlags)
static void encode(OUStringBuffer &aStrBuffer, const css::uno::Sequence< sal_Int8 > &aPass)
static SAL_DLLPRIVATE void ImplCalcSymbolRect(tools::Rectangle &rRect)
void IncreaseLuminance(sal_uInt8 cLumInc)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
WinBits const WB_BEVELBUTTON
bool IsChildTransparentModeEnabled() const
SAL_DLLPRIVATE void ImplCheck()
void DrawRect(const tools::Rectangle &rRect)
virtual bool PreNotify(NotifyEvent &rNEvt) override
const Color & GetControlForeground() const
#define SAL_N_ELEMENTS(arr)
WinBits const WB_NOLIGHTBORDER
const Color & GetDarkShadowColor() const
ImplSVData * ImplGetSVData()
Size CalcWindowSize(const Size &rOutSz) const
const Color & GetActionButtonRolloverTextColor() const
const vcl::Font & GetPushButtonFont() const
virtual void ShowFocus(const tools::Rectangle &rRect) override
virtual bool PreNotify(NotifyEvent &rNEvt)
void SetInputContext(const InputContext &rInputContext)
void DecreaseLuminance(sal_uInt8 cLumDec)
bool IsLeaveWindow() const
const Color & GetActionButtonPressedRolloverTextColor() const
bool IsSystemWindow() const
virtual void Tracking(const TrackingEvent &rTEvt) override
virtual void SetText(const OUString &rStr) override
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
SAL_DLLPRIVATE Size ImplGetCheckImageSize() const
void EnableTriState(bool bTriState=true)
bool IsUpdateMode() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const AllSettings & GetSettings() const
const Color & GetFieldColor() 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)
std::unique_ptr< WindowImpl > mpWindowImpl
WinBits const WB_SMALLSTYLE
WinBits const WB_RECTSTYLE
virtual void KeyUp(const KeyEvent &rKEvt) override
MouseNotifyEvent GetType() const
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.
sal_uInt16 GetFontSize(sal_uInt16 nPos)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
const AllSettings & GetSettings() const
void SetPaintTransparent(bool bTransparent)
virtual bool set_property(const OString &rKey, const OUString &rValue)
void DumpAsPropertyTree(tools::JsonWriter &) override
Button has additional stuff that we need to dump too.
void DrawCtrlText(const Point &rPos, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, DrawTextFlags nStyle=DrawTextFlags::Mnemonic, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr)
Point ScreenToOutputPixel(const Point &rPos) const
virtual void ShowFocus(const tools::Rectangle &rRect)
vcl::Window * GetParent() const
const Color & GetDefaultActionButtonPressedRolloverTextColor() const
bool IsTrackingEnded() const
void SetStyle(WinBits nStyle)
void DrawSeparator(const Point &rStart, const Point &rStop, bool bVertical=true)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
virtual void Draw(OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags) override
constexpr sal_uInt16 KEY_RETURN
const Color & GetButtonRolloverTextColor() const
const Color & GetDefaultActionButtonRolloverTextColor() const
StyleSettingsOptions GetOptions() const
vcl::Window * GetWindow(GetWindowType nType) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) 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)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)