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/.
11 #ifndef INCLUDED_VCL_INC_FILEDEFINITIONWIDGETDRAW_HXX
12 #define INCLUDED_VCL_INC_FILEDEFINITIONWIDGETDRAW_HXX
14 #include "widgetdraw/WidgetDefinition.hxx"
16 #include "WidgetDrawInterface.hxx"
20 class FileDefinitionWidgetDraw final
: public vcl::WidgetDrawInterface
23 SalGraphics
& m_rGraphics
;
26 std::shared_ptr
<WidgetDefinition
> m_pWidgetDefinition
;
28 bool resolveDefinition(ControlType eType
, ControlPart ePart
, ControlState eState
,
29 const ImplControlValue
& rValue
, tools::Long nX
, tools::Long nY
,
30 tools::Long nWidth
, tools::Long nHeight
);
33 FileDefinitionWidgetDraw(SalGraphics
& rGraphics
);
35 bool isActive() const { return m_bIsActive
; }
37 bool isNativeControlSupported(ControlType eType
, ControlPart ePart
) override
;
39 bool hitTestNativeControl(ControlType eType
, ControlPart ePart
,
40 const tools::Rectangle
& rBoundingControlRegion
, const Point
& aPos
,
41 bool& rIsInside
) override
;
43 bool drawNativeControl(ControlType eType
, ControlPart ePart
,
44 const tools::Rectangle
& rBoundingControlRegion
, ControlState eState
,
45 const ImplControlValue
& aValue
, const OUString
& aCaptions
,
46 const Color
& rBackgroundColor
) override
;
48 bool getNativeControlRegion(ControlType eType
, ControlPart ePart
,
49 const tools::Rectangle
& rBoundingControlRegion
, ControlState eState
,
50 const ImplControlValue
& aValue
, const OUString
& aCaption
,
51 tools::Rectangle
& rNativeBoundingRegion
,
52 tools::Rectangle
& rNativeContentRegion
) override
;
54 bool updateSettings(AllSettings
& rSettings
) override
;
56 static void drawPolyPolygon(SalGraphics
& rGraphics
,
57 const basegfx::B2DHomMatrix
& rObjectToDevice
,
58 const basegfx::B2DPolyPolygon
& i_rPolyPolygon
,
59 double i_fTransparency
);
61 static void drawPolyLine(SalGraphics
& rGraphics
, const basegfx::B2DHomMatrix
& rObjectToDevice
,
62 const basegfx::B2DPolygon
& i_rPolygon
, double i_fTransparency
,
63 double i_fLineWidth
, const std::vector
<double>* i_pStroke
,
64 basegfx::B2DLineJoin i_eLineJoin
, css::drawing::LineCap i_eLineCap
,
65 double i_fMiterMinimumAngle
, bool bPixelSnapHairline
);
67 static void drawBitmap(SalGraphics
& rGraphics
, const SalTwoRect
& rPosAry
,
68 const SalBitmap
& rSalBitmap
);
70 static void drawBitmap(SalGraphics
& rGraphics
, const SalTwoRect
& rPosAry
,
71 const SalBitmap
& rSalBitmap
, const SalBitmap
& rTransparentBitmap
);
73 static void implDrawGradient(SalGraphics
& rGraphics
,
74 const basegfx::B2DPolyPolygon
& rPolyPolygon
,
75 const SalGradient
& rGradient
);
78 } // end vcl namespace
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */