18 SwEditWin* pEditWin,
const std::shared_ptr<SwContentControl>& pContentControl)
20 , m_pContentControl(pContentControl)
39 m_xPopup->popup_at_rect(pParent, aRect);
62 int nPadding = aBoxSize.
Height() / 4;
63 aBoxPos.AdjustX(-nPadding / 2);
98 Color aFillColor = aLineColor;
103 Point aPos(nPadding, nPadding);
118 rRenderContext.
DrawRect(aButtonRect);
124 Point aCenter(aButtonPos.X() + (aButtonSize.
Width() / 2),
125 aButtonPos.Y() + (aButtonSize.
Height() / 2));
128 Size aArrowSize(std::max(aButtonSize.
Width() / 4, nMinWidth),
129 std::max(aButtonSize.
Height() / 10, nMinHeight));
142 if (aResult != WindowHitTest::Inside)
147 : WindowHitTest::Transparent;
void IncreaseLuminance(sal_uInt8 cLumInc)
virtual void dispose() override
void DrawRect(const tools::Rectangle &rRect)
void DrawPolygon(const tools::Polygon &rPoly)
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)
constexpr tools::Long Width() const
This button is shown when the cursor is inside a content control with drop-down capability.
virtual void dispose() override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual WindowHitTest ImplHitTest(const Point &rFramePos) override
virtual void LaunchPopup()
void CalcPosAndSize(const SwRect &rPortionPaintArea)
tools::Rectangle m_aFramePixel
SwContentControlButton(SwEditWin *pEditWin, const std::shared_ptr< SwContentControl > &pContentControl)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
virtual ~SwContentControlButton() override
std::unique_ptr< weld::Builder > m_xPopupBuilder
virtual void DestroyPopup()
std::unique_ptr< weld::Popover > m_xPopup
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Of course Writer needs its own rectangles.
void Pos(const Point &rNew)
void SSize(const Size &rNew)
vcl::Window * GetParent() const
Point LogicToPixel(const Point &rLogicPt) const
void SetParentClipMode(ParentClipMode nMode=ParentClipMode::NONE)
virtual Point GetPosPixel() const
virtual Size GetSizePixel() const
virtual WindowHitTest ImplHitTest(const Point &rFramePos)
void SetPaintTransparent(bool bTransparent)
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
void EnableChildTransparentMode(bool bEnable=true)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
IMPL_LINK_NOARG(SwContentControlButton, PopupModeEndHdl, weld::Popover &, void)
#define LINK(Instance, Class, Member)
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
WinBits const WB_DIALOGCONTROL