LibreOffice Module vcl (master)  1
wingdiimpl.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 #ifndef INCLUDED_VCL_INC_WIN_WINGDIIMPL_HXX
11 #define INCLUDED_VCL_INC_WIN_WINGDIIMPL_HXX
12 
13 #include <win/salgdi.h>
14 #include <ControlCacheKey.hxx>
15 
16 class ControlCacheKey;
17 
18 // Base class for some functionality that OpenGL/Skia/GDI backends must each implement.
20 {
21 public:
23 
24  // If true is returned, the following functions are used for drawing controls.
25  virtual bool UseRenderNativeControl() const { return false; }
26  virtual bool TryRenderCachedNativeControl(const ControlCacheKey& /*rControlCacheKey*/,
27  int /*nX*/, int /*nY*/)
28  {
29  abort();
30  };
31  virtual bool RenderAndCacheNativeControl(CompatibleDC& /*rWhite*/, CompatibleDC& /*rBlack*/,
32  int /*nX*/, int /*nY*/,
33  ControlCacheKey& /*aControlCacheKey*/)
34  {
35  abort();
36  };
37 
38  virtual void ClearDevFontCache(){};
39 
40  // Implementation for WinSalGraphics::DrawTextLayout().
41  // Returns true if handled, if false, then WinSalGraphics will handle it itself.
42  virtual bool DrawTextLayout(const GenericSalLayout&) { return false; }
43  // If true is returned, the following functions are used for text rendering.
44  virtual bool UseTextDraw() const { return false; }
45  virtual void PreDrawText() {}
46  virtual void PostDrawText() {}
47  virtual void DrawTextMask(CompatibleDC::Texture* /*rTexture*/, Color /*nMaskColor*/,
48  const SalTwoRect& /*rPosAry*/)
49  {
50  abort();
51  };
52  virtual void DeferredTextDraw(const CompatibleDC::Texture* /*pTexture*/, Color /*nMaskColor*/,
53  const SalTwoRect& /*rPosAry*/)
54  {
55  abort();
56  };
57 };
58 
59 #endif // INCLUDED_VCL_INC_WIN_WINGDIIMPL_HXX
60 
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void ClearDevFontCache()
Definition: wingdiimpl.hxx:38
virtual bool RenderAndCacheNativeControl(CompatibleDC &, CompatibleDC &, int, int, ControlCacheKey &)
Definition: wingdiimpl.hxx:31
virtual void DrawTextMask(CompatibleDC::Texture *, Color, const SalTwoRect &)
Definition: wingdiimpl.hxx:47
virtual bool TryRenderCachedNativeControl(const ControlCacheKey &, int, int)
Definition: wingdiimpl.hxx:26
virtual void PreDrawText()
Definition: wingdiimpl.hxx:45
virtual bool DrawTextLayout(const GenericSalLayout &)
Definition: wingdiimpl.hxx:42
virtual bool UseTextDraw() const
Definition: wingdiimpl.hxx:44
virtual ~WinSalGraphicsImplBase()
Definition: wingdiimpl.hxx:22
virtual bool UseRenderNativeControl() const
Definition: wingdiimpl.hxx:25
virtual void PostDrawText()
Definition: wingdiimpl.hxx:46
virtual void DeferredTextDraw(const CompatibleDC::Texture *, Color, const SalTwoRect &)
Definition: wingdiimpl.hxx:52
Class that creates (and destroys) a compatible Device Context.
Definition: win/salgdi.h:100