LibreOffice Module vcl (master)  1
windowdev.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  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #pragma once
21 
22 #include <vcl/outdev.hxx>
23 
24 namespace vcl
25 {
26 class WindowOutputDevice final : public ::OutputDevice
27 {
28 public:
29  WindowOutputDevice(vcl::Window& rOwnerWindow);
30  virtual ~WindowOutputDevice() override;
31  virtual void dispose() override;
32 
33  size_t GetSyncCount() const override { return 0x000000ff; }
34  virtual void EnableRTL(bool bEnable = true) override;
35 
36  void Flush() override;
37 
38  void SaveBackground(VirtualDevice& rSaveDevice, const Point& rPos, const Size& rSize,
39  const Size&) const override;
40 
41  css::awt::DeviceInfo GetDeviceInfo() const override;
42 
43  virtual vcl::Region GetActiveClipRegion() const override;
44  virtual vcl::Region GetOutputBoundsClipRegion() const override;
45 
46  virtual bool AcquireGraphics() const override;
47  virtual void ReleaseGraphics(bool bRelease = true) override;
48 
49  Color GetBackgroundColor() const override;
50 
51  using ::OutputDevice::SetSettings;
52  virtual void SetSettings(const AllSettings& rSettings) override;
53  void SetSettings(const AllSettings& rSettings, bool bChild);
54 
55  bool CanEnableNativeWidget() const override;
56 
58  virtual vcl::Window* GetOwnerWindow() const override { return mxOwnerWindow.get(); }
59 
60  virtual css::uno::Reference<css::rendering::XCanvas>
61  ImplGetCanvas(bool bSpriteCanvas) const override;
62 
63 private:
64  virtual void InitClipRegion() override;
65 
66  void ImplClearFontData(bool bNewFontLists) override;
67  void ImplRefreshFontData(bool bNewFontLists) override;
68  void ImplInitMapModeObjects() override;
69 
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;
76 
78 };
79 
80 }; // namespace vcl
81 
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void dispose() override
Definition: window.cxx:3941
virtual void CopyDeviceArea(SalTwoRect &aPosAry, bool bWindowInvalidate) override
Definition: window.cxx:1227
virtual bool UsePolyPolygonForComplexGradient() override
Definition: window.cxx:3828
void ImplClearFontData(bool bNewFontLists) override
Definition: window3.cxx:35
virtual const OutputDevice * DrawOutDevDirectCheck(const OutputDevice &rSrcDev) const override
Definition: window.cxx:1253
virtual void EnableRTL(bool bEnable=true) override
void Flush() override
Definition: window.cxx:2951
virtual void ReleaseGraphics(bool bRelease=true) override
Release the graphics device, and remove it from the graphics device list.
Definition: window.cxx:880
virtual ~WindowOutputDevice() override
Definition: window.cxx:3936
void ImplRefreshFontData(bool bNewFontLists) override
Definition: window3.cxx:43
css::awt::DeviceInfo GetDeviceInfo() const override
Definition: window.cxx:3950
void SaveBackground(VirtualDevice &rSaveDevice, const Point &rPos, const Size &rSize, const Size &) const override
VclPtr< vcl::Window > mxOwnerWindow
Definition: windowdev.hxx:77
virtual void SetSettings(const AllSettings &rSettings) override
bool CanEnableNativeWidget() const override
Determine if native widgets can be enabled.
Definition: window.cxx:580
virtual vcl::Window * GetOwnerWindow() const override
Get the vcl::Window that this OutputDevice belongs to, if any.
Definition: windowdev.hxx:58
virtual void DrawOutDevDirectProcess(const OutputDevice &rSrcDev, SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
Definition: window.cxx:1268
virtual vcl::Region GetOutputBoundsClipRegion() const override
virtual bool AcquireGraphics() const override
Acquire a graphics device that the output device uses to draw on.
Definition: window.cxx:813
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:168
virtual vcl::Region GetActiveClipRegion() const override
size_t GetSyncCount() const override
Definition: windowdev.hxx:33
virtual void ClipToPaintRegion(tools::Rectangle &rDstRect) override
Color GetBackgroundColor() const override
Definition: window.cxx:575
virtual void InitClipRegion() override
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
virtual css::uno::Reference< css::rendering::XCanvas > ImplGetCanvas(bool bSpriteCanvas) const override
Definition: window.cxx:3698
WindowOutputDevice(vcl::Window &rOwnerWindow)
Definition: window.cxx:3929
void ImplInitMapModeObjects() override
Definition: window3.cxx:51