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
ifwl_themeprovider.cpp
Go to the documentation of this file.
1// Copyright 2020 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/fwl/ifwl_themeprovider.h"
8
9#include "xfa/fwl/cfwl_widget.h"
10#include "xfa/fwl/theme/cfwl_barcodetp.h"
11#include "xfa/fwl/theme/cfwl_carettp.h"
12#include "xfa/fwl/theme/cfwl_checkboxtp.h"
13#include "xfa/fwl/theme/cfwl_comboboxtp.h"
14#include "xfa/fwl/theme/cfwl_datetimepickertp.h"
15#include "xfa/fwl/theme/cfwl_edittp.h"
16#include "xfa/fwl/theme/cfwl_listboxtp.h"
17#include "xfa/fwl/theme/cfwl_monthcalendartp.h"
18#include "xfa/fwl/theme/cfwl_pictureboxtp.h"
19#include "xfa/fwl/theme/cfwl_pushbuttontp.h"
20#include "xfa/fwl/theme/cfwl_scrollbartp.h"
21
22namespace pdfium {
23
47
49
50void IFWL_ThemeProvider::Trace(cppgc::Visitor* visitor) const {
51 visitor->Trace(m_pCheckBoxTP);
52 visitor->Trace(m_pListBoxTP);
53 visitor->Trace(m_pPictureBoxTP);
54 visitor->Trace(m_pSrollBarTP);
55 visitor->Trace(m_pEditTP);
56 visitor->Trace(m_pComboBoxTP);
57 visitor->Trace(m_pMonthCalendarTP);
58 visitor->Trace(m_pDateTimePickerTP);
59 visitor->Trace(m_pPushButtonTP);
60 visitor->Trace(m_pCaretTP);
61 visitor->Trace(m_pBarcodeTP);
62}
63
65 switch (pWidget->GetClassID()) {
66 case FWL_Type::CheckBox:
67 return m_pCheckBoxTP;
68 case FWL_Type::ListBox:
69 return m_pListBoxTP;
70 case FWL_Type::PictureBox:
71 return m_pPictureBoxTP;
72 case FWL_Type::ScrollBar:
73 return m_pSrollBarTP;
74 case FWL_Type::Edit:
75 return m_pEditTP;
76 case FWL_Type::ComboBox:
77 return m_pComboBoxTP;
78 case FWL_Type::MonthCalendar:
79 return m_pMonthCalendarTP;
80 case FWL_Type::DateTimePicker:
81 return m_pDateTimePickerTP;
82 case FWL_Type::PushButton:
83 return m_pPushButtonTP;
84 case FWL_Type::Caret:
85 return m_pCaretTP;
86 case FWL_Type::Barcode:
87 return m_pBarcodeTP;
88 default:
89 return nullptr;
90 }
91}
92
93} // namespace pdfium
virtual FWL_Type GetClassID() const =0
CFWL_WidgetTP * GetTheme(const CFWL_Widget *pWidget) const
void Trace(cppgc::Visitor *visitor) const override
IFWL_ThemeProvider(cppgc::Heap *pHeap)
Definition heap.h:12