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))
73#define STYLE_CHECKBOX_MONO (sal_uInt16(0x0001))
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();
330 if (bAddImageSep && bDrawImage)
373 aTextPos.
setX( rPos.
X() + aImageSize.
Width() + nImageSep );
379 aImagePos.
setX( rPos.
X() + aTSSize.
Width() + nImageSep );
385 aTextPos.
setY( rPos.
Y() + aImageSize.
Height() + nImageSep );
391 aImagePos.
setY( rPos.
Y() + aTSSize.
Height() + nImageSep );
428 if (nXOffset < 0) nXOffset = 0;
429 if (nYOffset < 0) nYOffset = 0;
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")
550 else if (rValue ==
"right")
552 else if (rValue ==
"top")
554 else if (rValue ==
"bottom")
558 else if (rKey ==
"focus-on-click")
561 nBits &= ~WB_NOPOINTERFOCUS;
584std::string_view symbolTypeName(
SymbolType eSymbolType)
631 OStringBuffer
aBuffer(
"data:image/png;base64,");
638 rJsonWriter.
put(
"has_default",
true);
647 rJsonWriter.
put(
"isToggle",
true);
652 if (pButton ==
nullptr)
773 if (colorLuminance < 205)
777 aStyleSettings.
Set3DColors(controlBackgroundColorHighlighted);
786 rRenderContext.OutputDevice::SetSettings(aSettings);
788 rRenderContext.OutputDevice::SetSettings(aOldSettings);
900#if defined(MACOSX) || defined(IOS)
905 if (pParent->
get_id() ==
"ExtraButton")
938 if (nSymbolSize > aSize.
Width() / 2)
939 nSymbolSize = aSize.
Width() / 2;
941 nSeparatorX = aInRect.
Right() - 2*nSymbolSize;
950 aSymbolRect.
SetLeft( aSymbolRect.
Right() - nSymbolSize );
953 nTextStyle,
nullptr,
true );
957 if( bMenuBtnSep && nSeparatorX > 0 )
959 Point aStartPt( nSeparatorX, aSymbolRect.
Top()+nDistance );
960 Point aEndPt( nSeparatorX, aSymbolRect.
Bottom()-nDistance );
972 nTextStyle,
IsSymbol() ? &aSymbolRect :
nullptr,
true );
992 bool bNativeOK =
false;
1059 if (Window::IsEnabled())
1072 aControlValue, OUString());
1087 bDrawMenuSep =
false;
1110 if (Window::IsEnabled())
1152 aControlValue, OUString() );
1161 aInRect, bDrawMenuSep, nButtonStyle);
1198 int dLeft(0), dRight(0), dTop(0), dBottom(0);
1199 bool bSetPos =
false;
1215 dLeft = aCont.
Left() - aBound.
Left();
1216 dTop = aCont.
Top() - aBound.
Top();
1219 bSetPos = dLeft || dTop || dRight || dBottom;
1228 aPos.
Move(-dLeft, -dTop);
1239 aPos.
Move(dLeft, dTop);
1418 if (!!rCustomButtonImage)
1438 std::optional<StyleSettings> oOrigDevStyleSettings;
1450 oOrigDevStyleSettings = aStyleSettings;
1456 pDev->OutputDevice::SetSettings( aSettings );
1466 aRect = aDecoView.
DrawButton( aRect, nButtonStyle );
1472 if (oOrigDevStyleSettings)
1476 pDev->OutputDevice::SetSettings( aSettings );
1521 if ( bIsDefButton != bWasDefButton )
1679 if (rEvent.State.has<
bool>())
1711 aSize =
Size( 16, 12 );
1713 aSize =
Size( 26, 24 );
1761 if (rKey ==
"has-default")
1764 nBits &= ~WB_DEFBUTTON;
1858 if (
static_cast<Dialog*
>(pParent)->IsInExecute() )
1919 officecfg::Office::Common::Help::HelpRootURL::get().isEmpty())
1934 nStyle =
ImplInitStyle(getPreviousSibling(pParent), nStyle);
1950 nStyle &= ~WB_TABSTOP;
1999 bool bNativeOK =
false;
2021 nState, aControlValue, OUString());
2065 rRenderContext.
DrawRect(aImageRect);
2078 rRenderContext.
DrawImage(aImagePos, aImageSize, *pImage, nImageStyle);
2080 rRenderContext.
DrawImage(aImagePos, *pImage, nImageStyle);
2093 if ((aImageSize.
Width() >= 20) || (aImageSize.
Height() >= 20))
2100 rRenderContext.
DrawRect(aImageRect);
2105 rRenderContext.
DrawRect(aImageRect);
2122 Size aSize( rSize );
2159 if( rStateRect.
Top() < 0 )
2184 if (!aText.isEmpty() ||
HasImage())
2187 rPos, rSize, rImageSize,
2188 rStateRect, rMouseRect);
2198 rStateRect.
SetTop( rPos.
Y() );
2201 rMouseRect = rStateRect;
2208 bool bTopImage = (nWinStyle &
WB_TOP) != 0;
2215 if (!aText.isEmpty())
2230 Point aTxtPos = rPos;
2241 pDev->
DrawCtrlText( aTxtPos, aText, 0, aText.getLength() );
2244 rMouseRect = aImageRect;
2245 rStateRect = aImageRect;
2276 if (&rOther ==
this)
2281 m_xGroup = std::make_shared<std::vector<VclPtr<RadioButton> >>();
2294 for (
auto const& elem : aOthers)
2320 std::vector< VclPtr<RadioButton> > aGroup;
2323 if (pRadioButton ==
this)
2325 aGroup.push_back(pRadioButton);
2330 std::vector<VclPtr<RadioButton>> aGroup;
2351 if( pFirst !=
this || bIncludeThis )
2352 aGroup.emplace_back(
static_cast<RadioButton*
>(pFirst) );
2368 if ( pWindow->IsChecked() )
2370 pWindow->SetState(
false );
2371 if ( pWindow->isDisposed() )
2376 pWindow->mpWindowImpl->mnStyle &= ~WB_TABSTOP;
2407 , mbUsesExplicitGroup(bUsesExplicitGroup)
2533 MapMode aResMapMode( MapUnit::Map100thMM );
2549 if ( !aBrd1Size.
Width() )
2551 if ( !aBrd1Size.
Height() )
2553 if ( !aBrd2Size.
Width() )
2555 if ( !aBrd2Size.
Height() )
2567 ImplDraw( pDev, nFlags, rPos, aSize,
2568 aImageSize, aStateRect, aMouseRect );
2577 nRadX -= aBrd1Size.
Width();
2578 nRadY -= aBrd1Size.
Height();
2583 nRadX -= aBrd1Size.
Width();
2584 nRadY -= aBrd1Size.
Height();
2597 OSL_FAIL(
"RadioButton::Draw() - not implemented for RadioButton with Image" );
2742 if (rKey ==
"active")
2744 else if (rKey ==
"image-position")
2747 if (rValue ==
"left")
2752 else if (rValue ==
"right")
2757 else if (rValue ==
"top")
2762 else if (rValue ==
"bottom")
2812 bool bDefaultSize =
true;
2823 aBoundingRgn, aContentRgn ) )
2825 aSize = aContentRgn.
GetSize();
2826 bDefaultSize =
false;
2835 std::vector<Image>& rList,
const std::vector<OUString> &rResources)
2837 Color aColorAry1[6];
2838 Color aColorAry2[6];
2839 aColorAry1[0] =
Color( 0xC0, 0xC0, 0xC0 );
2840 aColorAry1[1] =
Color( 0xFF, 0xFF, 0x00 );
2841 aColorAry1[2] =
Color( 0xFF, 0xFF, 0xFF );
2842 aColorAry1[3] =
Color( 0x80, 0x80, 0x80 );
2843 aColorAry1[4] =
Color( 0x00, 0x00, 0x00 );
2844 aColorAry1[5] =
Color( 0x00, 0xFF, 0x00 );
2852 static_assert(
sizeof(aColorAry1) ==
sizeof(aColorAry2),
"aColorAry1 must match aColorAry2" );
2854 for (
const auto &
a : rResources)
2858 rList.emplace_back(aBmpEx);
2866 sal_uInt16 nStyle = 0;
2883 std::vector<OUString> aResources;
2886 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO1);
2887 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO2);
2888 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO3);
2889 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO4);
2890 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO5);
2891 aResources.emplace_back(SV_RESID_BITMAP_RADIOMONO6);
2895 aResources.emplace_back(SV_RESID_BITMAP_RADIO1);
2896 aResources.emplace_back(SV_RESID_BITMAP_RADIO2);
2897 aResources.emplace_back(SV_RESID_BITMAP_RADIO3);
2898 aResources.emplace_back(SV_RESID_BITMAP_RADIO4);
2899 aResources.emplace_back(SV_RESID_BITMAP_RADIO5);
2900 aResources.emplace_back(SV_RESID_BITMAP_RADIO6);
2944 aBoundingRgn, aContentRgn ) )
2978 if (!aText.isEmpty())
3033 for(
const auto& pButton : aGroup)
3034 sGroupId += pButton->get_id();
3036 if (!sGroupId.isEmpty())
3037 rJsonWriter.
put(
"group", sGroupId);
3045 OStringBuffer
aBuffer(
"data:image/png;base64,");
3065 nStyle =
ImplInitStyle(getPreviousSibling(pParent), nStyle);
3149 nState, aControlValue, OUString());
3180 if (!aText.isEmpty() ||
HasImage())
3183 rPos, rSize, rImageSize,
3184 rStateRect, rMouseRect);
3194 rStateRect.
SetTop( rPos.
Y() );
3201 rStateRect.
Move( 1, 1 );
3202 rMouseRect = rStateRect;
3356 MapMode aResMapMode( MapUnit::Map100thMM );
3373 if ( !aBrd1Size.
Width() )
3375 if ( !aBrd1Size.
Height() )
3377 if ( !aBrd2Size.
Width() )
3379 if ( !aBrd2Size.
Height() )
3393 ImplDraw( pDev, nFlags, rPos, aSize,
3394 aImageSize, aStateRect, aMouseRect );
3419 Point aTempPos11( aPos11 );
3420 Point aTempPos12( aPos12 );
3421 Point aTempPos21( aPos21 );
3422 Point aTempPos22( aPos22 );
3429 aTempPos11.
setX( aPos11.
X()+nDX );
3430 aTempPos12.
setX( aPos12.
X()+nDX );
3431 aTempPos21.
setX( aPos21.
X()+nDX );
3432 aTempPos22.
setX( aPos22.
X()+nDX );
3437 aTempPos11.
setX( aPos11.
X()-nDX );
3438 aTempPos12.
setX( aPos12.
X()-nDX );
3439 aTempPos21.
setX( aPos21.
X()-nDX );
3440 aTempPos22.
setX( aPos22.
X()-nDX );
3442 pDev->
DrawLine( aTempPos11, aTempPos12 );
3443 pDev->
DrawLine( aTempPos21, aTempPos22 );
3608 if (rKey ==
"active")
3629 bool bDefaultSize =
true;
3640 aBoundingRgn, aContentRgn ) )
3642 aSize = aContentRgn.
GetSize();
3643 bDefaultSize =
false;
3655 sal_uInt16 nStyle = 0;
3672 std::vector<OUString> aResources;
3675 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO1);
3676 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO2);
3677 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO3);
3678 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO4);
3679 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO5);
3680 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO6);
3681 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO7);
3682 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO8);
3683 aResources.emplace_back(SV_RESID_BITMAP_CHECKMONO9);
3687 aResources.emplace_back(SV_RESID_BITMAP_CHECK1);
3688 aResources.emplace_back(SV_RESID_BITMAP_CHECK2);
3689 aResources.emplace_back(SV_RESID_BITMAP_CHECK3);
3690 aResources.emplace_back(SV_RESID_BITMAP_CHECK4);
3691 aResources.emplace_back(SV_RESID_BITMAP_CHECK5);
3692 aResources.emplace_back(SV_RESID_BITMAP_CHECK6);
3693 aResources.emplace_back(SV_RESID_BITMAP_CHECK7);
3694 aResources.emplace_back(SV_RESID_BITMAP_CHECK8);
3695 aResources.emplace_back(SV_RESID_BITMAP_CHECK9);
3745 aBoundingRgn, aContentRgn ) )
3762 nMaxWidth -= aSize.
Width();
3765 if (!aText.isEmpty())
static bool toBool(std::string_view rValue)
const StyleSettings & GetStyleSettings() const
void SetStyleSettings(const StyleSettings &rSet)
static const AllSettings & GetSettings()
Gets the application's settings.
static vcl::Window * GetFocusWindow()
Get the currently focused window.
void Replace(const Color &rSearchColor, const Color &rReplaceColor)
Replace all pixel having the search color with the specified color.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
CheckBox(const CheckBox &)=delete
void DumpAsPropertyTree(tools::JsonWriter &) override
Button has additional stuff that we need to dump too.
virtual void StateChanged(StateChangedType nType) override
SAL_DLLPRIVATE void ImplCheck()
virtual void KeyUp(const KeyEvent &rKEvt) override
tools::Rectangle maStateRect
static Image GetCheckImage(const AllSettings &rSettings, DrawButtonFlags nFlags)
void EnableTriState(bool bTriState=true)
virtual Size GetOptimalSize() const override
SAL_DLLPRIVATE void ImplInitCheckBoxData()
virtual void GetFocus() override
virtual void Resize() override
virtual bool PreNotify(NotifyEvent &rNEvt) override
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual void Tracking(const TrackingEvent &rTEvt) override
virtual void LoseFocus() override
virtual FactoryFunction GetUITestFactory() const override
virtual void ShowFocus(const tools::Rectangle &rRect) override
virtual bool set_property(const OUString &rKey, const OUString &rValue) override
void ImplAdjustNWFSizes() override
virtual void KeyInput(const KeyEvent &rKEvt) override
Link< CheckBox &, void > maToggleHdl
tools::Rectangle maMouseRect
void SetState(TriState eState)
Size CalcMinimumSize(tools::Long nMaxWidth=0) const
SAL_DLLPRIVATE void ImplDrawCheckBox(vcl::RenderContext &rRenderContext)
virtual void Draw(OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags) override
virtual void ImplDrawCheckBoxState(vcl::RenderContext &rRenderContext)
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const override
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
SAL_DLLPRIVATE void ImplDraw(OutputDevice *pDev, SystemTextColorFlags nSystemTextColorFlags, const Point &rPos, const Size &rSize, const Size &rImageSize, tools::Rectangle &rStateRect, tools::Rectangle &rMouseRect)
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const override
static SAL_DLLPRIVATE WinBits ImplInitStyle(const vcl::Window *pPrevWindow, WinBits nStyle)
SAL_DLLPRIVATE Size ImplGetCheckImageSize() const
virtual void FillLayoutData() const override
sal_uInt8 GetLuminance() const
void DecreaseLuminance(sal_uInt8 cLumDec)
void IncreaseLuminance(sal_uInt8 cLumInc)
std::optional< vcl::ControlLayoutData > mxLayoutData
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
bool ImplCallEventListenersAndHandler(VclEventId nEvent, std::function< void()> const &callHandler)
this calls both our event listeners, and a specified handler
tools::Rectangle GetControlTextRect(OutputDevice &_rTargetDevice, const tools::Rectangle &rRect, const OUString &_rStr, DrawTextFlags _nStyle, Size *o_pDeviceSize=nullptr) const
virtual void StateChanged(StateChangedType nStateChange) override
virtual void Resize() override
virtual void SetText(const OUString &rStr) override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
tools::Rectangle DrawButton(const tools::Rectangle &rRect, DrawButtonFlags nStyle)
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
void DrawSeparator(const Point &rStart, const Point &rStop, bool bVertical=true)
SAL_DLLPRIVATE bool IsInClose() const
void EndDialog(tools::Long nResult=RET_CANCEL)
virtual bool Close() override
SAL_DLLPRIVATE bool ImplUseNativeBorder(vcl::RenderContext const &rRenderContext, WinBits nStyle) const
static SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle(WinBits nWinBits)
static ErrCode Export(SvStream &rOStm, const Graphic &rGraphic, ConvertDataFormat nFormat)
BitmapEx GetBitmapEx() const
Size GetSizePixel() const
void setTristateVal(ButtonValue nTristate)
const vcl::KeyCode & GetKeyCode() const
bool IsEnterWindow() const
bool IsLeaveWindow() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
bool IsModifierChanged() const
const MouseEvent * GetMouseEvent() const
NotifyEventType GetType() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
tools::Long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
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)
void SetFont(const vcl::Font &rNewFont)
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void DrawPolygon(const tools::Polygon &rPoly)
Render the given polygon.
void SetTextColor(const Color &rColor)
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...
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
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.
const AllSettings & GetSettings() const
void IntersectClipRegion(const tools::Rectangle &rRect)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
constexpr tools::Long Y() const
void setX(tools::Long nX)
void Move(tools::Long nHorzMove, tools::Long nVertMove)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
constexpr tools::Long getWidth() const
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetDarkShadowColor() const
void SetFaceColor(const Color &rColor)
const Color & GetWindowColor() const
const Color & GetActionButtonPressedRolloverTextColor() const
const Color & GetFlatButtonPressedRolloverTextColor() const
void Set3DColors(const Color &rColor)
const Color & GetShadowColor() const
const Color & GetFieldColor() const
StyleSettingsOptions GetOptions() const
const Color & GetFlatButtonTextColor() const
const Color & GetRadioCheckTextColor() const
const vcl::Font & GetRadioCheckFont() const
const Color & GetWindowTextColor() const
const Color & GetActionButtonRolloverTextColor() const
const vcl::Font & GetPushButtonFont() const
const Color & GetLightColor() const
const Color & GetDefaultButtonTextColor() const
const Color & GetDefaultActionButtonRolloverTextColor() const
const Color & GetDefaultButtonPressedRolloverTextColor() const
const Color & GetDefaultActionButtonPressedRolloverTextColor() const
const Color & GetHighlightColor() const
const Color & GetDefaultActionButtonTextColor() const
const Color & GetActionButtonTextColor() const
const Color & GetFlatButtonRolloverTextColor() const
const Color & GetFaceColor() const
const Color & GetButtonTextColor() const
const Color & GetDefaultButtonRolloverTextColor() const
const Color & GetButtonRolloverTextColor() const
const Color & GetButtonPressedRolloverTextColor() const
bool IsTrackingEnded() const
bool IsTrackingRepeat() const
bool IsTrackingCanceled() const
const MouseEvent & GetMouseEvent() const
static void encode(OUStringBuffer &aStrBuffer, const css::uno::Sequence< sal_Int8 > &aPass)
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
Point OutputToScreenPixel(const Point &rPos) const
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
const Wallpaper & GetBackground() const
void SetStyle(WinBits nStyle)
SAL_DLLPRIVATE void ImplGrabFocus(GetFocusFlags nFlags)
void SetInputContext(const InputContext &rInputContext)
bool IsReallyVisible() const
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
vcl::Window * GetParent() const
virtual void RequestHelp(const HelpEvent &rHEvt)
WinBits GetPrevStyle() const
void EndTracking(TrackingEventFlags nFlags=TrackingEventFlags::NONE)
const OUString & get_id() const
Get the ID of the window.
WindowType GetType() const
virtual void SetSizePixel(const Size &rNewSize)
tools::Long CalcZoom(tools::Long n) const
vcl::Window * GetWindow(GetWindowType nType) const
void SetParentClipMode(ParentClipMode nMode=ParentClipMode::NONE)
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
const Color & GetControlForeground() const
void set_id(const OUString &rID)
Sets an ID.
bool IsUpdateMode() const
bool IsChildTransparentModeEnabled() const
virtual void MouseButtonDown(const MouseEvent &rMEvt)
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)
Point GetLastPointerPosPixel()
virtual Point GetPosPixel() const
vcl::Font GetDrawPixelFont(::OutputDevice const *pDev) const
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
void Enable(bool bEnable=true, bool bChild=true)
bool IsControlForeground() const
const AllSettings & GetSettings() const
virtual void KeyInput(const KeyEvent &rKEvt)
Size CalcWindowSize(const Size &rOutSz) const
virtual bool PreNotify(NotifyEvent &rNEvt)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
::OutputDevice const * GetOutDev() const
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
const vcl::Font & GetFont() const
SAL_DLLPRIVATE WindowImpl * ImplGetWindowImpl() const
tools::Long GetDrawPixel(::OutputDevice const *pDev, tools::Long nPixels) const
const Color & GetTextColor() const
std::unique_ptr< WindowImpl > mpWindowImpl
virtual void ShowFocus(const tools::Rectangle &rRect)
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
bool IsSystemWindow() const
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
bool IsControlBackground() const
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Point GetPointerPosPixel()
const Color & GetControlBackground() const
sal_Int32 get_width_request() const
void SetPaintTransparent(bool bTransparent)
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual void KeyUp(const KeyEvent &rKEvt)
void SetQuickHelpText(const OUString &rHelpText)
virtual OUString GetText() const
static SAL_DLLPRIVATE void ImplCalcSymbolRect(tools::Rectangle &rRect)
virtual bool set_property(const OUString &rKey, const OUString &rValue)
Point ScreenToOutputPixel(const Point &rPos) const
const OUString & GetQuickHelpText() const
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
void EnableChildTransparentMode(bool bEnable=true)
SAL_DLLPRIVATE void CompatStateChanged(StateChangedType nStateChange)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
virtual void EndDialog(sal_Int32 nResult) override
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_SPACE
vcl::Window * getNonLayoutParent(vcl::Window *pWindow)
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
#define SAL_N_ELEMENTS(arr)
sal_uInt16 GetFontSize(sal_uInt16 nPos)
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)
BitmapEx GetBitmapEx(BitmapEx const &rBitmapEx, DrawModeFlags nDrawMode)
OUString GetStandardText(StandardButtonType eButton)
std::vector< Image > maCheckImgList
std::vector< Image > maRadioImgList
ImplSVCtrlData maCtrlData
bool mbNoFocusRectsForFlatButtons
ImplSVData * ImplGetSVData()
@ NoErase
The invalidated area is painted with the background color/pattern.
WinBits const WB_CLOSEABLE
WinBits const WB_NOTABSTOP
WinBits const WB_NOPOINTERFOCUS
WinBits const WB_FLATBUTTON
WinBits const WB_WORDBREAK
WinBits const WB_SMALLSTYLE
WinBits const WB_DEFBUTTON
WinBits const WB_NOLIGHTBORDER
WinBits const WB_RECTSTYLE
std::unique_ptr< char[]> aBuffer