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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <vcl/outdev.hxx>
26 class WindowOutputDevice final
: public ::OutputDevice
29 WindowOutputDevice(vcl::Window
& rOwnerWindow
);
30 virtual ~WindowOutputDevice() override
;
31 virtual void dispose() override
;
33 size_t GetSyncCount() const override
{ return 0x000000ff; }
34 virtual void EnableRTL(bool bEnable
= true) override
;
36 void Flush() override
;
38 void SaveBackground(VirtualDevice
& rSaveDevice
, const Point
& rPos
, const Size
& rSize
,
39 const Size
&) const override
;
41 css::awt::DeviceInfo
GetDeviceInfo() const override
;
43 virtual vcl::Region
GetActiveClipRegion() const override
;
44 virtual vcl::Region
GetOutputBoundsClipRegion() const override
;
46 virtual bool AcquireGraphics() const override
;
47 virtual void ReleaseGraphics(bool bRelease
= true) override
;
49 Color
GetBackgroundColor() const override
;
51 using ::OutputDevice::SetSettings
;
52 virtual void SetSettings(const AllSettings
& rSettings
) override
;
53 void SetSettings(const AllSettings
& rSettings
, bool bChild
);
55 bool CanEnableNativeWidget() const override
;
57 /** Get the vcl::Window that this OutputDevice belongs to, if any */
58 virtual vcl::Window
* GetOwnerWindow() const override
{ return mxOwnerWindow
.get(); }
60 virtual css::uno::Reference
<css::rendering::XCanvas
>
61 ImplGetCanvas(bool bSpriteCanvas
) const override
;
64 virtual void InitClipRegion() override
;
66 void ImplClearFontData(bool bNewFontLists
) override
;
67 void ImplRefreshFontData(bool bNewFontLists
) override
;
68 void ImplInitMapModeObjects() override
;
70 virtual void CopyDeviceArea(SalTwoRect
& aPosAry
, bool bWindowInvalidate
) override
;
71 virtual const OutputDevice
* DrawOutDevDirectCheck(const OutputDevice
& rSrcDev
) const override
;
72 virtual void DrawOutDevDirectProcess(const OutputDevice
& rSrcDev
, SalTwoRect
& rPosAry
,
73 SalGraphics
* pSrcGraphics
) override
;
74 virtual void ClipToPaintRegion(tools::Rectangle
& rDstRect
) override
;
75 virtual bool UsePolyPolygonForComplexGradient() override
;
77 VclPtr
<vcl::Window
> mxOwnerWindow
;
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */