• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef XFA_FWL_IFWL_THEMEPROVIDER_H_
8 #define XFA_FWL_IFWL_THEMEPROVIDER_H_
9 
10 #include "core/fxcrt/fx_coordinates.h"
11 #include "core/fxcrt/retain_ptr.h"
12 #include "core/fxge/fx_dib.h"
13 
14 class CFGAS_GEFont;
15 class CFWL_ThemeBackground;
16 class CFWL_ThemePart;
17 class CFWL_ThemeText;
18 class CFWL_Widget;
19 
20 class IFWL_ThemeProvider {
21  public:
22   virtual ~IFWL_ThemeProvider() = default;
23 
24   virtual void DrawBackground(const CFWL_ThemeBackground& pParams) = 0;
25   virtual void DrawText(const CFWL_ThemeText& pParams) = 0;
26   virtual void CalcTextRect(const CFWL_ThemeText& pParams,
27                             CFX_RectF* pRect) = 0;
28   virtual float GetCXBorderSize() const = 0;
29   virtual float GetCYBorderSize() const = 0;
30   virtual CFX_RectF GetUIMargin(const CFWL_ThemePart& pThemePart) const = 0;
31   virtual float GetFontSize(const CFWL_ThemePart& pThemePart) const = 0;
32   virtual RetainPtr<CFGAS_GEFont> GetFont(
33       const CFWL_ThemePart& pThemePart) const = 0;
34   virtual float GetLineHeight(const CFWL_ThemePart& pThemePart) const = 0;
35   virtual float GetScrollBarWidth() const = 0;
36   virtual FX_COLORREF GetTextColor(const CFWL_ThemePart& pThemePart) const = 0;
37   virtual CFX_SizeF GetSpaceAboveBelow(
38       const CFWL_ThemePart& pThemePart) const = 0;
39 };
40 
41 #endif  // XFA_FWL_IFWL_THEMEPROVIDER_H_
42