Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cxfa_fwltheme.h
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
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_FXFA_CXFA_FWLTHEME_H_
8#define XFA_FXFA_CXFA_FWLTHEME_H_
9
10#include <memory>
11
12#include "core/fxcrt/retain_ptr.h"
13#include "core/fxcrt/widestring.h"
14#include "fxjs/gc/heap.h"
15#include "v8/include/cppgc/garbage-collected.h"
16#include "v8/include/cppgc/member.h"
17#include "v8/include/cppgc/prefinalizer.h"
18#include "xfa/fwl/ifwl_themeprovider.h"
19
20class CXFA_FFApp;
21class CXFA_FFDoc;
22
23namespace pdfium {
24
25class CFDE_TextOut;
26
27class CXFA_FWLTheme final : public cppgc::GarbageCollected<CXFA_FWLTheme>,
28 public IFWL_ThemeProvider {
29 CPPGC_USING_PRE_FINALIZER(CXFA_FWLTheme, PreFinalize);
30
31 public:
33 ~CXFA_FWLTheme() override;
34
35 void PreFinalize();
36
37 // IFWL_ThemeProvider:
38 void Trace(cppgc::Visitor* visitor) const override;
39 void DrawBackground(const CFWL_ThemeBackground& pParams) override;
40 void DrawText(const CFWL_ThemeText& pParams) override;
41 void CalcTextRect(const CFWL_ThemeText& pParams, CFX_RectF* pRect) override;
42 float GetCXBorderSize() const override;
43 float GetCYBorderSize() const override;
44 CFX_RectF GetUIMargin(const CFWL_ThemePart& pThemePart) const override;
45 float GetFontSize(const CFWL_ThemePart& pThemePart) const override;
46 RetainPtr<CFGAS_GEFont> GetFont(const CFWL_ThemePart& pThemePart) override;
47 RetainPtr<CFGAS_GEFont> GetFWLFont() override;
48 float GetLineHeight(const CFWL_ThemePart& pThemePart) const override;
49 float GetScrollBarWidth() const override;
50 FX_COLORREF GetTextColor(const CFWL_ThemePart& pThemePart) const override;
51 CFX_SizeF GetSpaceAboveBelow(const CFWL_ThemePart& pThemePart) const override;
52
54
55 private:
56 CXFA_FWLTheme(cppgc::Heap* pHeap, CXFA_FFApp* pApp);
57
58 std::unique_ptr<CFDE_TextOut> m_pTextOut;
59 RetainPtr<CFGAS_GEFont> m_pFWLFont;
60 RetainPtr<CFGAS_GEFont> m_pCalendarFont;
61 cppgc::Member<CXFA_FFApp> const m_pApp;
62 WideString m_wsResource;
63 CFX_RectF m_Rect;
64};
65
66} // namespace pdfium
67
68// TODO(crbug.com/42271761): Remove.
69using pdfium::CXFA_FWLTheme;
70
71#endif // XFA_FXFA_CXFA_FWLTHEME_H_
void Trace(cppgc::Visitor *visitor) const override
bool LoadFWLTheme(CXFA_FFDoc *doc)
CFX_Timer::HandlerIface * GetTimerHandler() override
CFWL_WidgetMgr::AdapterIface * GetWidgetMgrAdapter() override
pdfium::IFWL_ThemeProvider * GetThemeProvider() override
~CXFA_FFApp() override
cppgc::Heap * GetHeap() override
~CXFA_FWLAdapterWidgetMgr() override
void Trace(cppgc::Visitor *visitor) const override
void RepaintWidget(pdfium::CFWL_Widget *pWidget) override
bool GetPopupPos(pdfium::CFWL_Widget *pWidget, float fMinHeight, float fMaxHeight, const CFX_RectF &rtAnchor, CFX_RectF *pPopupRect) override
~CXFA_FWLTheme() override
CFX_SizeF GetSpaceAboveBelow(const CFWL_ThemePart &pThemePart) const override
float GetCYBorderSize() const override
RetainPtr< CFGAS_GEFont > GetFont(const CFWL_ThemePart &pThemePart) override
float GetScrollBarWidth() const override
CFX_RectF GetUIMargin(const CFWL_ThemePart &pThemePart) const override
void CalcTextRect(const CFWL_ThemeText &pParams, CFX_RectF *pRect) override
bool LoadCalendarFont(CXFA_FFDoc *doc)
float GetFontSize(const CFWL_ThemePart &pThemePart) const override
RetainPtr< CFGAS_GEFont > GetFWLFont() override
void DrawText(const CFWL_ThemeText &pParams) override
void DrawBackground(const CFWL_ThemeBackground &pParams) override
FX_COLORREF GetTextColor(const CFWL_ThemePart &pThemePart) const override
float GetCXBorderSize() const override
float GetLineHeight(const CFWL_ThemePart &pThemePart) const override
void Trace(cppgc::Visitor *visitor) const override
CFX_STemplate< float > CFX_SizeF
uint32_t FX_COLORREF
Definition fx_dib.h:42
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32
Definition heap.h:12
fxcrt::WideString WideString
Definition widestring.h:207