Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cxfa_ffapp.cpp
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
#
include
"xfa/fxfa/cxfa_ffapp.h"
8
9
#
include
"xfa/fwl/cfwl_notedriver.h"
10
#
include
"xfa/fwl/cfwl_widgetmgr.h"
11
#
include
"xfa/fxfa/cxfa_ffdoc.h"
12
#
include
"xfa/fxfa/cxfa_ffwidgethandler.h"
13
#
include
"xfa/fxfa/cxfa_fontmgr.h"
14
#
include
"xfa/fxfa/cxfa_fwladapterwidgetmgr.h"
15
#
include
"xfa/fxfa/cxfa_fwltheme.h"
16
17
CXFA_FFApp::CXFA_FFApp(
CallbackIface
* pProvider) : m_pProvider(pProvider) {
18
// Ensure fully initialized before making objects based on |this|.
19
m_pXFAFontMgr = cppgc::MakeGarbageCollected<CXFA_FontMgr>(
20
GetHeap()->GetAllocationHandle());
21
m_pFWLApp = cppgc::MakeGarbageCollected<CFWL_App>(
22
GetHeap()->GetAllocationHandle(),
this
);
23
}
24
25
CXFA_FFApp::~
CXFA_FFApp
() =
default
;
26
27
void
CXFA_FFApp::
Trace
(cppgc::Visitor* visitor)
const
{
28
visitor->Trace(m_pXFAFontMgr);
29
visitor->Trace(m_pAdapterWidgetMgr);
30
visitor->Trace(m_pFWLTheme);
31
visitor->Trace(m_pFWLApp);
32
}
33
34
bool
CXFA_FFApp::
LoadFWLTheme
(
CXFA_FFDoc
* doc) {
35
auto
* fwl_theme = cppgc::MakeGarbageCollected<CXFA_FWLTheme>(
36
GetHeap()->GetAllocationHandle(), GetHeap(),
this
);
37
if
(!fwl_theme->LoadCalendarFont(doc))
38
return
false
;
39
40
m_pFWLTheme = fwl_theme;
41
return
true
;
42
}
43
44
CFWL_WidgetMgr::
AdapterIface
* CXFA_FFApp::
GetWidgetMgrAdapter
() {
45
if
(!m_pAdapterWidgetMgr) {
46
m_pAdapterWidgetMgr = cppgc::MakeGarbageCollected<CXFA_FWLAdapterWidgetMgr>(
47
GetHeap()->GetAllocationHandle());
48
}
49
return
m_pAdapterWidgetMgr;
50
}
51
52
CFX_Timer
::
HandlerIface
* CXFA_FFApp::
GetTimerHandler
() {
53
return
m_pProvider->GetTimerHandler();
54
}
55
56
IFWL_ThemeProvider
* CXFA_FFApp::
GetThemeProvider
() {
57
return
m_pFWLTheme;
58
}
59
60
cppgc
::Heap* CXFA_FFApp::
GetHeap
() {
61
return
m_pProvider->GetGCHeap();
62
}
CFX_Timer::HandlerIface
Definition
cfx_timer.h:19
CFX_Timer
Definition
cfx_timer.h:15
CXFA_FFApp::CallbackIface
Definition
cxfa_ffapp.h:29
CXFA_FFApp::Trace
void Trace(cppgc::Visitor *visitor) const override
Definition
cxfa_ffapp.cpp:27
CXFA_FFApp::LoadFWLTheme
bool LoadFWLTheme(CXFA_FFDoc *doc)
Definition
cxfa_ffapp.cpp:34
CXFA_FFApp::GetTimerHandler
CFX_Timer::HandlerIface * GetTimerHandler() override
Definition
cxfa_ffapp.cpp:52
CXFA_FFApp::GetWidgetMgrAdapter
CFWL_WidgetMgr::AdapterIface * GetWidgetMgrAdapter() override
Definition
cxfa_ffapp.cpp:44
CXFA_FFApp::GetThemeProvider
pdfium::IFWL_ThemeProvider * GetThemeProvider() override
Definition
cxfa_ffapp.cpp:56
CXFA_FFApp::~CXFA_FFApp
~CXFA_FFApp() override
CXFA_FFApp::GetHeap
cppgc::Heap * GetHeap() override
Definition
cxfa_ffapp.cpp:60
CXFA_FFDoc
Definition
cxfa_ffdoc.h:55
pdfium::CFWL_WidgetMgr::AdapterIface
Definition
cfwl_widgetmgr.h:29
pdfium::IFWL_ThemeProvider
Definition
ifwl_themeprovider.h:27
cppgc
Definition
heap.h:12
qtwebengine
src
3rdparty
chromium
third_party
pdfium
xfa
fxfa
cxfa_ffapp.cpp
Generated on
for Qt by
1.18.0