LibreOffice Module vcl (master)  1
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
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 .
18  */
20 #pragma once
22 #include <vcl/outdev.hxx>
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;
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;
58  virtual vcl::Window* GetOwnerWindow() const override { return mxOwnerWindow.get(); }
60  virtual css::uno::Reference<css::rendering::XCanvas>
61  ImplGetCanvas(bool bSpriteCanvas) const override;
63 private:
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;
78 };
80 }; // namespace vcl
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void dispose() override
Definition: window.cxx:3958
virtual void CopyDeviceArea(SalTwoRect &aPosAry, bool bWindowInvalidate) override
Definition: window.cxx:1240
virtual bool UsePolyPolygonForComplexGradient() override
Definition: window.cxx:3845
void ImplClearFontData(bool bNewFontLists) override
Definition: window3.cxx:35
virtual const OutputDevice * DrawOutDevDirectCheck(const OutputDevice &rSrcDev) const override
Definition: window.cxx:1266
virtual void EnableRTL(bool bEnable=true) override
void Flush() override
Definition: window.cxx:2967
virtual void ReleaseGraphics(bool bRelease=true) override
Release the graphics device, and remove it from the graphics device list.
Definition: window.cxx:886
virtual ~WindowOutputDevice() override
Definition: window.cxx:3953
void ImplRefreshFontData(bool bNewFontLists) override
Definition: window3.cxx:43
css::awt::DeviceInfo GetDeviceInfo() const override
Definition: window.cxx:3967
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:583
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:1281
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:819
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:175
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:578
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:3715
WindowOutputDevice(vcl::Window &rOwnerWindow)
Definition: window.cxx:3946
void ImplInitMapModeObjects() override
Definition: window3.cxx:51