1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
13 #include "widgetdraw/WidgetDefinition.hxx"
15 #include "WidgetDrawInterface.hxx"
19 class FileDefinitionWidgetDraw final
: public vcl::WidgetDrawInterface
22 SalGraphics
& m_rGraphics
;
25 std::shared_ptr
<WidgetDefinition
> m_pWidgetDefinition
;
27 bool resolveDefinition(ControlType eType
, ControlPart ePart
, ControlState eState
,
28 const ImplControlValue
& rValue
, tools::Long nX
, tools::Long nY
,
29 tools::Long nWidth
, tools::Long nHeight
);
32 FileDefinitionWidgetDraw(SalGraphics
& rGraphics
);
34 bool isActive() const { return m_bIsActive
; }
36 bool isNativeControlSupported(ControlType eType
, ControlPart ePart
) override
;
38 bool hitTestNativeControl(ControlType eType
, ControlPart ePart
,
39 const tools::Rectangle
& rBoundingControlRegion
, const Point
& aPos
,
40 bool& rIsInside
) override
;
42 bool drawNativeControl(ControlType eType
, ControlPart ePart
,
43 const tools::Rectangle
& rBoundingControlRegion
, ControlState eState
,
44 const ImplControlValue
& aValue
, const OUString
& aCaptions
,
45 const Color
& rBackgroundColor
) override
;
47 bool getNativeControlRegion(ControlType eType
, ControlPart ePart
,
48 const tools::Rectangle
& rBoundingControlRegion
, ControlState eState
,
49 const ImplControlValue
& aValue
, const OUString
& aCaption
,
50 tools::Rectangle
& rNativeBoundingRegion
,
51 tools::Rectangle
& rNativeContentRegion
) override
;
53 bool updateSettings(AllSettings
& rSettings
) override
;
55 static void drawPolyPolygon(SalGraphics
& rGraphics
,
56 const basegfx::B2DHomMatrix
& rObjectToDevice
,
57 const basegfx::B2DPolyPolygon
& i_rPolyPolygon
,
58 double i_fTransparency
);
60 static void drawPolyLine(SalGraphics
& rGraphics
, const basegfx::B2DHomMatrix
& rObjectToDevice
,
61 const basegfx::B2DPolygon
& i_rPolygon
, double i_fTransparency
,
62 double i_fLineWidth
, const std::vector
<double>* i_pStroke
,
63 basegfx::B2DLineJoin i_eLineJoin
, css::drawing::LineCap i_eLineCap
,
64 double i_fMiterMinimumAngle
, bool bPixelSnapHairline
);
66 static void drawBitmap(SalGraphics
& rGraphics
, const SalTwoRect
& rPosAry
,
67 const SalBitmap
& rSalBitmap
);
69 static void drawBitmap(SalGraphics
& rGraphics
, const SalTwoRect
& rPosAry
,
70 const SalBitmap
& rSalBitmap
, const SalBitmap
& rTransparentBitmap
);
72 static void implDrawGradient(SalGraphics
& rGraphics
,
73 const basegfx::B2DPolyPolygon
& rPolyPolygon
,
74 const SalGradient
& rGradient
);
77 } // end vcl namespace
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */