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
45
47
48void IFWL_ThemeProvider::Trace(cppgc::Visitor* visitor) const {
49 visitor->Trace(m_pCheckBoxTP);
50 visitor->Trace(m_pListBoxTP);
51 visitor->Trace(m_pPictureBoxTP);
52 visitor->Trace(m_pSrollBarTP);
53 visitor->Trace(m_pEditTP);
54 visitor->Trace(m_pComboBoxTP);
55 visitor->Trace(m_pMonthCalendarTP);
56 visitor->Trace(m_pDateTimePickerTP);
57 visitor->Trace(m_pPushButtonTP);
58 visitor->Trace(m_pCaretTP);
59 visitor->Trace(m_pBarcodeTP);
60}
61
63 switch (pWidget->GetClassID()) {
64 case FWL_Type::CheckBox:
65 return m_pCheckBoxTP;
66 case FWL_Type::ListBox:
67 return m_pListBoxTP;
68 case FWL_Type::PictureBox:
69 return m_pPictureBoxTP;
70 case FWL_Type::ScrollBar:
71 return m_pSrollBarTP;
72 case FWL_Type::Edit:
73 return m_pEditTP;
74 case FWL_Type::ComboBox:
75 return m_pComboBoxTP;
76 case FWL_Type::MonthCalendar:
77 return m_pMonthCalendarTP;
78 case FWL_Type::DateTimePicker:
79 return m_pDateTimePickerTP;
80 case FWL_Type::PushButton:
81 return m_pPushButtonTP;
82 case FWL_Type::Caret:
83 return m_pCaretTP;
84 case FWL_Type::Barcode:
85 return m_pBarcodeTP;
86 default:
87 return nullptr;
88 }
89}
virtual FWL_Type GetClassID() const =0
CFWL_WidgetTP * GetTheme(const CFWL_Widget *pWidget) const
IFWL_ThemeProvider(cppgc::Heap *pHeap)
virtual ~IFWL_ThemeProvider()
void Trace(cppgc::Visitor *visitor) const override
Definition heap.h:12