37 #include <bitmaps.hlst>
42 #include <osl/diagnose.h>
46 #include <officecfg/Office/Common.hxx>
47 #include <boost/property_tree/ptree.hpp>
69 #define STYLE_RADIOBUTTON_MONO (sal_uInt16(0x0001)) // legacy
70 #define STYLE_CHECKBOX_MONO (sal_uInt16(0x0001)) // legacy
212 bool bDrawText = !aText.isEmpty();
213 bool bHasSymbol = pSymbolRect !=
nullptr;
216 if (!bDrawImage && !bDrawText && !bHasSymbol)
228 if (bHasSymbol && !bDrawImage && !bDrawText)
230 *pSymbolRect = aOutRect;
233 else if (bDrawText && !bDrawImage && !bHasSymbol)
235 aOutRect =
DrawControlText(*pDev, aOutRect, aText, nTextStyle,
nullptr,
nullptr);
254 Size aDeviceTextSize;
255 Point aImagePos = rPos;
256 Point aTextPos = rPos;
260 if (bDrawText || bHasSymbol)
275 nSymbolHeight = nSymbolHeight * 3 / 4;
280 aTSSize.
setWidth( 3 * nSymbolHeight / 2 );
289 aSymbolSize = aSymbol.
GetSize();
294 if ((eImageAlign == ImageAlign::LeftTop) ||
295 (eImageAlign == ImageAlign::Left ) ||
296 (eImageAlign == ImageAlign::LeftBottom) ||
297 (eImageAlign == ImageAlign::RightTop) ||
298 (eImageAlign == ImageAlign::Right) ||
299 (eImageAlign == ImageAlign::RightBottom))
303 else if ((eImageAlign == ImageAlign::TopLeft) ||
304 (eImageAlign == ImageAlign::Top) ||
305 (eImageAlign == ImageAlign::TopRight) ||
306 (eImageAlign == ImageAlign::BottomLeft) ||
307 (eImageAlign == ImageAlign::Bottom) ||
308 (eImageAlign == ImageAlign::BottomRight))
321 if (bAddImageSep && bDrawImage)
335 if ((eImageAlign == ImageAlign::Left) ||
336 (eImageAlign == ImageAlign::Right))
338 aImagePos.setY( rPos.Y() + (aMax.
Height() - aImageSize.
Height()) / 2 );
339 aTextPos.setY( rPos.Y() + (aMax.
Height() - aTSSize.
Height()) / 2 );
341 else if ((eImageAlign == ImageAlign::LeftBottom) ||
342 (eImageAlign == ImageAlign::RightBottom))
344 aImagePos.setY( rPos.Y() + aMax.
Height() - aImageSize.
Height() );
345 aTextPos.setY( rPos.Y() + aMax.
Height() - aTSSize.
Height() );
347 else if ((eImageAlign == ImageAlign::Top) ||
348 (eImageAlign == ImageAlign::Bottom))
350 aImagePos.setX( rPos.X() + (aMax.
Width() - aImageSize.
Width()) / 2 );
351 aTextPos.setX( rPos.X() + (aMax.
Width() - aTSSize.
Width()) / 2 );
353 else if ((eImageAlign == ImageAlign::TopRight) ||
354 (eImageAlign == ImageAlign::BottomRight))
356 aImagePos.setX( rPos.X() + aMax.
Width() - aImageSize.
Width() );
357 aTextPos.setX( rPos.X() + aMax.
Width() - aTSSize.
Width() );
360 if ((eImageAlign == ImageAlign::LeftTop) ||
361 (eImageAlign == ImageAlign::Left) ||
362 (eImageAlign == ImageAlign::LeftBottom))
364 aTextPos.setX( rPos.X() + aImageSize.
Width() + nImageSep );
366 else if ((eImageAlign == ImageAlign::RightTop) ||
367 (eImageAlign == ImageAlign::Right) ||
368 (eImageAlign == ImageAlign::RightBottom))
370 aImagePos.setX( rPos.X() + aTSSize.
Width() + nImageSep );
372 else if ((eImageAlign == ImageAlign::TopLeft) ||
373 (eImageAlign == ImageAlign::Top) ||
374 (eImageAlign == ImageAlign::TopRight))
376 aTextPos.setY( rPos.Y() + aImageSize.
Height() + nImageSep );
378 else if ((eImageAlign == ImageAlign::BottomLeft) ||
379 (eImageAlign == ImageAlign::Bottom) ||
380 (eImageAlign == ImageAlign::BottomRight))
382 aImagePos.setY( rPos.Y() + aTSSize.
Height() + nImageSep );
384 else if (eImageAlign == ImageAlign::Center)
386 aImagePos.setX( rPos.X() + (aMax.
Width() - aImageSize.
Width()) / 2 );
387 aImagePos.setY( rPos.Y() + (aMax.
Height() - aImageSize.
Height()) / 2 );
388 aTextPos.setX( rPos.X() + (aMax.
Width() - aTSSize.
Width()) / 2 );
389 aTextPos.setY( rPos.Y() + (aMax.
Height() - aTSSize.
Height()) / 2 );
419 if (nXOffset < 0) nXOffset = 0;
420 if (nYOffset < 0) nYOffset = 0;
422 aImagePos.AdjustX(nXOffset );
423 aImagePos.AdjustY(nYOffset );
424 aTextPos.AdjustX(nXOffset );
425 aTextPos.AdjustY(nYOffset );
429 rPos.AdjustX(nXOffset );
430 rPos.AdjustY(nYOffset );
436 Point aRightPos(aTextPos.X() + aTextSize.
Width() + aSymbolSize.
Width() / 2, aTextPos.Y());
442 aTextPos.AdjustX(3 * nSymbolHeight / 2 );
447 pSymbolRect->
setY(aTextPos.Y() + nYOffset);
459 pDev->
DrawImage(aImagePos, aImageSize, *pImage, nStyle);
461 pDev->
DrawImage(aImagePos, *pImage, nStyle);
467 DrawControlText(*pDev, aTOutRect, aText, nTextStyle,
nullptr,
nullptr, &aDeviceTextSize);
488 if (aFocusRect.
Left() < aOutputRect.
Left())
490 if (aFocusRect.
Top() < aOutputRect.
Top())
536 if (rKey ==
"image-position")
539 if (rValue ==
"left")
540 eAlign = ImageAlign::Left;
541 else if (rValue ==
"right")
542 eAlign = ImageAlign::Right;
543 else if (rValue ==
"top")
544 eAlign = ImageAlign::Top;
545 else if (rValue ==
"bottom")
546 eAlign = ImageAlign::Bottom;
549 else if (rKey ==
"focus-on-click")
580 if (pButton ==
nullptr)
630 ((pPrevWindow->
GetType() != WindowType::PUSHBUTTON ) &&
631 (pPrevWindow->
GetType() != WindowType::OKBUTTON ) &&
632 (pPrevWindow->
GetType() != WindowType::CANCELBUTTON) &&
633 (pPrevWindow->
GetType() != WindowType::HELPBUTTON )) ) )
701 rRenderContext.OutputDevice::SetSettings(aSettings);
703 rRenderContext.OutputDevice::SetSettings(aOldSettings);
791 if (nButtonFlags & DrawButtonFlags::Pressed)
793 else if (nButtonFlags & DrawButtonFlags::Highlight)
798 if (nButtonFlags & DrawButtonFlags::Pressed)
800 else if (nButtonFlags & DrawButtonFlags::Highlight)
804 else if (nButtonFlags & DrawButtonFlags::Default)
805 if (nButtonFlags & DrawButtonFlags::Pressed)
807 else if (nButtonFlags & DrawButtonFlags::Highlight)
812 if (nButtonFlags & DrawButtonFlags::Pressed)
814 else if (nButtonFlags & DrawButtonFlags::Highlight)
841 nSeparatorX = aInRect.
Right() - 2*nSymbolSize;
846 aSymbolRect.
SetLeft( aSymbolRect.
Right() - nSymbolSize );
849 nTextStyle,
nullptr,
true );
853 if( bMenuBtnSep && nSeparatorX > 0 )
855 Point aStartPt( nSeparatorX, aSymbolRect.
Top()+nDistance );
856 Point aEndPt( nSeparatorX, aSymbolRect.
Bottom()-nDistance );
868 nTextStyle,
IsSymbol() ? &aSymbolRect :
nullptr,
true );
888 bool bNativeOK =
false;
898 case WindowType::LISTBOX:
899 case WindowType::MULTILISTBOX:
900 case WindowType::TREELISTBOX:
904 case WindowType::COMBOBOX:
905 case WindowType::PATTERNBOX:
906 case WindowType::NUMERICBOX:
907 case WindowType::METRICBOX:
908 case WindowType::CURRENCYBOX:
909 case WindowType::DATEBOX:
910 case WindowType::TIMEBOX:
911 case WindowType::LONGCURRENCYBOX:
952 if (Window::IsEnabled())
965 aControlValue, OUString());
980 bDrawMenuSep =
false;
1003 if (Window::IsEnabled())
1047 aControlValue, OUString() );
1056 aInRect, bDrawMenuSep, nButtonStyle);
1094 int dLeft(0), dRight(0), dTop(0), dBottom(0);
1095 bool bSetPos =
false;
1111 dLeft = aCont.
Left() - aBound.
Left();
1112 dTop = aCont.
Top() - aBound.
Top();
1115 bSetPos = dLeft || dTop || dRight || dBottom;
1124 aPos.Move(-dLeft, -dTop);
1135 aPos.Move(dLeft, dTop);
1314 if (!!rCustomButtonImage)
1349 pDev->OutputDevice::SetSettings( aSettings );
1355 if ( nFlags & DrawFlags::Mono )
1359 aRect = aDecoView.
DrawButton( aRect, nButtonStyle );
1404 if ( bIsDefButton != bWasDefButton )
1459 case WindowType::LISTBOX:
1460 case WindowType::MULTILISTBOX:
1461 case WindowType::TREELISTBOX:
1465 case WindowType::COMBOBOX:
1466 case WindowType::PATTERNBOX:
1467 case WindowType::NUMERICBOX:
1468 case WindowType::METRICBOX:
1469 case WindowType::CURRENCYBOX:
1470 case WindowType::DATEBOX:
1471 case WindowType::TIMEBOX:
1472 case WindowType::LONGCURRENCYBOX:
1562 if (rEvent.State.has<
bool>())
1594 aSize =
Size( 16, 12 );
1596 aSize =
Size( 26, 24 );
1631 if (rKey ==
"has-default")
1694 static_cast<SystemWindow*>(pParent)->Close();
1728 if ( static_cast<Dialog*>(pParent)->IsInExecute() )
1729 static_cast<Dialog*>(pParent)->EndDialog();
1731 else if ( !static_cast<Dialog*>(pParent)->IsInClose() )
1734 static_cast<Dialog*>(pParent)->Close();
1740 static_cast<SystemWindow*>(pParent)->Close();
1789 officecfg::Office::Common::Help::HelpRootURL::get().isEmpty())
1804 nStyle =
ImplInitStyle(getPreviousSibling(pParent), nStyle);
1813 (!pPrevWindow || (pPrevWindow->
GetType() != WindowType::RADIOBUTTON)) )
1869 bool bNativeOK =
false;
1891 nState, aControlValue, OUString());
1935 rRenderContext.
DrawRect(aImageRect);
1945 aImagePos.AdjustX((aImageRect.
GetWidth() - aImageSize.
Width()) / 2 );
1946 aImagePos.AdjustY((aImageRect.
GetHeight() - aImageSize.
Height()) / 2 );
1948 rRenderContext.
DrawImage(aImagePos, aImageSize, *pImage, nImageStyle);
1950 rRenderContext.
DrawImage(aImagePos, *pImage, nImageStyle);
1963 if ((aImageSize.
Width() >= 20) || (aImageSize.
Height() >= 20))
1970 rRenderContext.
DrawRect(aImageRect);
1975 rRenderContext.
DrawRect(aImageRect);
1984 const Point& rPos,
const Size& rSize,
1997 if (!aText.isEmpty() ||
HasImage())
2002 Size aSize( rSize );
2004 aPos.AdjustX(rImageSize.
Width() + nImageSep );
2021 rMouseRect.
SetTop(rPos.Y());
2023 rStateRect.
SetLeft( rPos.X() );
2031 if( rStateRect.
Top() < 0 )
2043 rStateRect.
SetLeft( rPos.X() );
2049 rStateRect.
SetTop( rPos.Y() );
2052 rMouseRect = rStateRect;
2059 bool bTopImage = (nWinStyle &
WB_TOP) != 0;
2066 if (!aText.isEmpty())
2081 Point aTxtPos = rPos;
2084 aTxtPos.AdjustX((rSize.
Width()-nTextWidth)/2 );
2085 aTxtPos.AdjustY(aImageRect.
Bottom()+6 );
2089 aTxtPos.AdjustX(aImageRect.
Right()+8 );
2090 aTxtPos.AdjustY((rSize.
Height()-nTextHeight)/2 );
2092 pDev->
DrawCtrlText( aTxtPos, aText, 0, aText.getLength() );
2095 rMouseRect = aImageRect;
2096 rStateRect = aImageRect;
2127 if (&rOther ==
this)
2132 m_xGroup = std::make_shared<std::vector<VclPtr<RadioButton> >>();
2145 for (
auto const& elem : aOthers)
2171 std::vector< VclPtr<RadioButton> > aGroup;
2174 if (pRadioButton ==
this)
2176 aGroup.push_back(pRadioButton);
2181 std::vector<VclPtr<RadioButton>> aGroup;
2200 if( pFirst->
GetType() == WindowType::RADIOBUTTON )
2202 if( pFirst !=
this || bIncludeThis )
2203 aGroup.emplace_back(static_cast<RadioButton*>(pFirst) );
2219 if ( pWindow->IsChecked() )
2221 pWindow->SetState(
false );
2222 if ( pWindow->IsDisposed() )
2227 pWindow->mpWindowImpl->mnStyle &= ~
WB_TABSTOP;
2258 , mbUsesExplicitGroup(bUsesExplicitGroup)
2384 MapMode aResMapMode( MapUnit::Map100thMM );
2401 if ( !aBrd1Size.
Width() )
2403 if ( !aBrd1Size.
Height() )
2405 if ( !aBrd2Size.
Width() )
2407 if ( !aBrd2Size.
Height() )
2419 ImplDraw( pDev, nFlags, aPos, aSize,
2420 aImageSize, aStateRect, aMouseRect );
2429 nRadX -= aBrd1Size.
Width();
2430 nRadY -= aBrd1Size.
Height();
2435 nRadX -= aBrd1Size.
Width();
2436 nRadY -= aBrd1Size.
Height();
2449 OSL_FAIL(
"RadioButton::Draw() - not implemented for RadioButton with Image" );
2594 if (rKey ==
"active")
2596 else if (rKey ==
"image-position")
2599 if (rValue ==
"left")
2604 else if (rValue ==
"right")
2609 else if (rValue ==
"top")
2614 else if (rValue ==
"bottom")
2664 bool bDefaultSize =
true;
2675 aBoundingRgn, aContentRgn ) )
2677 aSize = aContentRgn.
GetSize();
2678 bDefaultSize =
false;
2687 std::vector<Image>& rList,
const std::vector<OUString> &rResources)
2689 Color aColorAry1[6];
2690 Color aColorAry2[6];
2691 aColorAry1[0] =
Color( 0xC0, 0xC0, 0xC0 );
2692 aColorAry1[1] =
Color( 0xFF, 0xFF, 0x00 );
2693 aColorAry1[2] =
Color( 0xFF, 0xFF, 0xFF );
2694 aColorAry1[3] =
Color( 0x80, 0x80, 0x80 );
2695 aColorAry1[4] =
Color( 0x00, 0x00, 0x00 );
2696 aColorAry1[5] =
Color( 0x00, 0xFF, 0x00 );
2704 static_assert(
sizeof(aColorAry1) ==
sizeof(aColorAry2),
"aColorAry1 must match aColorAry2" );
2706 for (
const auto &
a : rResources)
2710 rList.emplace_back(aBmpEx);
2718 sal_uInt16 nStyle = 0;
2735 std::vector<OUString> aResources;
2738 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO1);
2739 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO2);
2740 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO3);
2741 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO4);
2742 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO5);
2743 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO6);
2747 aResources.emplace_back(SV_RESID_BITMAP_RADIO1);
2748 aResources.emplace_back(SV_RESID_BITMAP_RADIO2);
2749 aResources.emplace_back(SV_RESID_BITMAP_RADIO3);
2750 aResources.emplace_back(SV_RESID_BITMAP_RADIO4);
2751 aResources.emplace_back(SV_RESID_BITMAP_RADIO5);
2752 aResources.emplace_back(SV_RESID_BITMAP_RADIO6);
2796 aBoundingRgn, aContentRgn ) )
2830 if (!aText.isEmpty())
2897 nStyle =
ImplInitStyle(getPreviousSibling(pParent), nStyle);
2908 (!pPrevWindow || (pPrevWindow->
GetType() != WindowType::CHECKBOX)) )
2981 nState, aControlValue, OUString());
3002 const Point& rPos,
const Size& rSize,
3012 if (!aText.isEmpty() ||
HasImage())
3017 Size aSize( rSize );
3019 aPos.AdjustX(rImageSize.
Width() + nImageSep );
3035 rMouseRect.
SetLeft( rPos.X() );
3036 rStateRect.
SetLeft( rPos.X() );
3044 if( rStateRect.
Top() < 0 )
3055 rStateRect.
SetLeft( rPos.X() );
3061 rStateRect.
SetTop( rPos.Y() );
3068 rStateRect.
Move( 1, 1 );
3069 rMouseRect = rStateRect;
3223 MapMode aResMapMode( MapUnit::Map100thMM );
3241 if ( !aBrd1Size.
Width() )
3243 if ( !aBrd1Size.
Height() )
3245 if ( !aBrd2Size.
Width() )
3247 if ( !aBrd2Size.
Height() )
3261 ImplDraw( pDev, nFlags, aPos, aSize,
3262 aImageSize, aStateRect, aMouseRect );
3287 Point aTempPos11( aPos11 );
3288 Point aTempPos12( aPos12 );
3289 Point aTempPos21( aPos21 );
3290 Point aTempPos22( aPos22 );
3297 aTempPos11.setX( aPos11.X()+nDX );
3298 aTempPos12.setX( aPos12.X()+nDX );
3299 aTempPos21.setX( aPos21.X()+nDX );
3300 aTempPos22.setX( aPos22.X()+nDX );
3305 aTempPos11.setX( aPos11.X()-nDX );
3306 aTempPos12.setX( aPos12.X()-nDX );
3307 aTempPos21.setX( aPos21.X()-nDX );
3308 aTempPos22.setX( aPos22.X()-nDX );
3310 pDev->
DrawLine( aTempPos11, aTempPos12 );
3311 pDev->
DrawLine( aTempPos21, aTempPos22 );
3476 if (rKey ==
"active")
3504 bool bDefaultSize =
true;
3515 aBoundingRgn, aContentRgn ) )
3517 aSize = aContentRgn.
GetSize();
3518 bDefaultSize =
false;
3530 sal_uInt16 nStyle = 0;
3547 std::vector<OUString> aResources;
3550 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO1);
3551 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO2);
3552 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO3);
3553 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO4);
3554 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO5);
3555 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO6);
3556 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO7);
3557 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO8);
3558 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO9);
3562 aResources.emplace_back(SV_RESID_BITMAP_CHECK1);
3563 aResources.emplace_back(SV_RESID_BITMAP_CHECK2);
3564 aResources.emplace_back(SV_RESID_BITMAP_CHECK3);
3565 aResources.emplace_back(SV_RESID_BITMAP_CHECK4);
3566 aResources.emplace_back(SV_RESID_BITMAP_CHECK5);
3567 aResources.emplace_back(SV_RESID_BITMAP_CHECK6);
3568 aResources.emplace_back(SV_RESID_BITMAP_CHECK7);
3569 aResources.emplace_back(SV_RESID_BITMAP_CHECK8);
3570 aResources.emplace_back(SV_RESID_BITMAP_CHECK9);
3620 aBoundingRgn, aContentRgn ) )
3637 nMaxWidth -= aSize.
Width();
3640 if (!aText.isEmpty())
static bool toBool(std::string_view rValue)
virtual Point GetPosPixel() const
#define LINK(Instance, Class, Member)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Size GetSizePixel() const
const Color & GetTextColor() 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()
const Wallpaper & GetBackground() const
SAL_DLLPRIVATE tools::Long ImplGetImageToTextDistance() 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...
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
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)
virtual void MouseButtonDown(const MouseEvent &rMEvt)
OUString GetStandardText(StandardButtonType eButton)
void EndDialog(tools::Long nResult=RET_CANCEL)
void SetStyleSettings(const StyleSettings &rSet)
static SAL_DLLPRIVATE WinBits ImplInitStyle(const vcl::Window *pPrevWindow, WinBits nStyle)
void DrawCtrlText(const Point &rPos, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, DrawTextFlags nStyle=DrawTextFlags::Mnemonic, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr)
tools::Long getWidth() const
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.
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
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)
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
WinBits const WB_NOPOINTERFOCUS
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
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
const vcl::Font & GetFont() const
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 SAL_DLLPRIVATE void ImplCalcSymbolRect(tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
WinBits const WB_BEVELBUTTON
bool IsChildTransparentModeEnabled() const
SAL_DLLPRIVATE void ImplCheck()
tools::Rectangle DrawControlText(OutputDevice &_rTargetDevice, const tools::Rectangle &_rRect, const OUString &_rStr, DrawTextFlags _nStyle, MetricVector *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize=nullptr) const
draws the given text onto the given device
void DrawRect(const tools::Rectangle &rRect)
virtual bool PreNotify(NotifyEvent &rNEvt) override
const Color & GetControlForeground() const
#define SAL_N_ELEMENTS(arr)
SAL_DLLPRIVATE bool ImplUseNativeBorder(vcl::RenderContext const &rRenderContext, WinBits nStyle)
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)
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
tools::Long Width() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const Color & GetFieldColor() const
void SetTextColor(const Color &rColor)
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.
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)
Size GetOutputSizePixel() const
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.
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)
virtual void Draw(OutputDevice *pDev, const Point &rPos, DrawFlags nFlags) override
void DrawSeparator(const Point &rStart, const Point &rStop, bool bVertical=true)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
constexpr sal_uInt16 KEY_RETURN
const Color & GetButtonRolloverTextColor() const
const Color & GetDefaultActionButtonRolloverTextColor() const
StyleSettingsOptions GetOptions() const
vcl::Window * GetWindow(GetWindowType nType) const
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)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
bool IsModifierChanged() const
void set_id(const OUString &rID)
Sets an ID.
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const override
virtual void ImplDrawCheckBoxState(vcl::RenderContext &rRenderContext)
const vcl::KeyCode & GetKeyCode() const
static vcl::Window * GetFocusWindow()
Get the currently focused window.
SAL_DLLPRIVATE void ImplDraw(OutputDevice *pDev, DrawFlags nDrawFlags, const Point &rPos, const Size &rSize, const Size &rImageSize, tools::Rectangle &rStateRect, tools::Rectangle &rMouseRect)
void SetFaceColor(const Color &rColor)
static SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle(WinBits nWinBits)
virtual void Resize() override
std::vector< Image > maCheckImgList
virtual void Resize() override
const Color & GetButtonTextColor() const
const Color & GetDefaultActionButtonTextColor() const
constexpr sal_uInt16 KEY_ESCAPE
void SetFont(const vcl::Font &rNewFont)
std::vector< Image > maRadioImgList
const MouseEvent * GetMouseEvent() const
std::unique_ptr< vcl::ImplControlData > mpControlData
SAL_DLLPRIVATE void ImplDrawCheckBox(vcl::RenderContext &rRenderContext)
const Color & GetFlatButtonRolloverTextColor() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
sal_Int32 get_width_request() const
const Color & GetFlatButtonPressedRolloverTextColor() const
vcl::Font GetDrawPixelFont(::OutputDevice const *pDev) const
::OutputDevice const * GetOutDev() const
virtual FactoryFunction GetUITestFactory() const override
void EnableChildTransparentMode(bool bEnable=true)
tools::Long AdjustWidth(tools::Long n)
tools::Long Height() const
tools::Long CalcZoom(tools::Long n) const
tools::Long GetDrawPixel(::OutputDevice const *pDev, tools::Long nPixels) const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK