LibreOffice Module vcl (master) 1
FileDefinitionWidgetDraw.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 */
10
11#ifndef INCLUDED_VCL_INC_FILEDEFINITIONWIDGETDRAW_HXX
12#define INCLUDED_VCL_INC_FILEDEFINITIONWIDGETDRAW_HXX
13
15#include "salgdi.hxx"
17
18namespace vcl
19{
21{
22private:
25
26 std::shared_ptr<WidgetDefinition> m_pWidgetDefinition;
27
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);
31
32public:
34
35 bool isActive() const { return m_bIsActive; }
36
37 bool isNativeControlSupported(ControlType eType, ControlPart ePart) override;
38
40 const tools::Rectangle& rBoundingControlRegion, const Point& aPos,
41 bool& rIsInside) override;
42
44 const tools::Rectangle& rBoundingControlRegion, ControlState eState,
45 const ImplControlValue& aValue, const OUString& aCaptions,
46 const Color& rBackgroundColor) override;
47
49 const tools::Rectangle& rBoundingControlRegion, ControlState eState,
50 const ImplControlValue& aValue, const OUString& aCaption,
51 tools::Rectangle& rNativeBoundingRegion,
52 tools::Rectangle& rNativeContentRegion) override;
53
54 bool updateSettings(AllSettings& rSettings) override;
55
56 static void drawPolyPolygon(SalGraphics& rGraphics,
57 const basegfx::B2DHomMatrix& rObjectToDevice,
58 const basegfx::B2DPolyPolygon& i_rPolyPolygon,
59 double i_fTransparency);
60
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);
66
67 static void drawBitmap(SalGraphics& rGraphics, const SalTwoRect& rPosAry,
68 const SalBitmap& rSalBitmap);
69
70 static void drawBitmap(SalGraphics& rGraphics, const SalTwoRect& rPosAry,
71 const SalBitmap& rSalBitmap, const SalBitmap& rTransparentBitmap);
72
73 static void implDrawGradient(SalGraphics& rGraphics,
74 const basegfx::B2DPolyPolygon& rPolyPolygon,
75 const SalGradient& rGradient);
76};
77
78} // end vcl namespace
79
80#endif
81
82/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
std::shared_ptr< WidgetDefinition > m_pWidgetDefinition
static void drawBitmap(SalGraphics &rGraphics, const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap)
bool updateSettings(AllSettings &rSettings) override
static void drawPolyPolygon(SalGraphics &rGraphics, const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &i_rPolyPolygon, double i_fTransparency)
bool isNativeControlSupported(ControlType eType, ControlPart ePart) override
Query the platform layer for native control support.
bool hitTestNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, const Point &aPos, bool &rIsInside) override
Query if a position is inside the native widget part.
bool resolveDefinition(ControlType eType, ControlPart ePart, ControlState eState, const ImplControlValue &rValue, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
FileDefinitionWidgetDraw(SalGraphics &rGraphics)
static void drawPolyLine(SalGraphics &rGraphics, const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &i_rPolygon, double i_fTransparency, double i_fLineWidth, const std::vector< double > *i_pStroke, basegfx::B2DLineJoin i_eLineJoin, css::drawing::LineCap i_eLineCap, double i_fMiterMinimumAngle, bool bPixelSnapHairline)
static void implDrawGradient(SalGraphics &rGraphics, const basegfx::B2DPolyPolygon &rPolyPolygon, const SalGradient &rGradient)
bool getNativeControlRegion(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaption, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) override
Get the native control regions for the control part.
bool drawNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaptions, const Color &rBackgroundColor) override
Draw the requested control.
long Long