Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: xfa/src/fwl/lightwidget/theme.cpp

Issue 1803723002: Move xfa/src up to xfa/. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/src/fwl/lightwidget/scrollbar.cpp ('k') | xfa/src/fwl/lightwidget/tooltipctrl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/lightwidget/theme.cpp
diff --git a/xfa/src/fwl/lightwidget/theme.cpp b/xfa/src/fwl/lightwidget/theme.cpp
deleted file mode 100644
index fe9f55928b56f88c3791948fc574c4ebe29aeb83..0000000000000000000000000000000000000000
--- a/xfa/src/fwl/lightwidget/theme.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "xfa/include/fwl/lightwidget/theme.h"
-
-#include <algorithm>
-
-#include "xfa/include/fwl/theme/barcodetp.h"
-#include "xfa/include/fwl/theme/carettp.h"
-#include "xfa/include/fwl/theme/checkboxtp.h"
-#include "xfa/include/fwl/theme/comboboxtp.h"
-#include "xfa/include/fwl/theme/datetimepickertp.h"
-#include "xfa/include/fwl/theme/edittp.h"
-#include "xfa/include/fwl/theme/formtp.h"
-#include "xfa/include/fwl/theme/listboxtp.h"
-#include "xfa/include/fwl/theme/monthcalendartp.h"
-#include "xfa/include/fwl/theme/pictureboxtp.h"
-#include "xfa/include/fwl/theme/pushbuttontp.h"
-#include "xfa/include/fwl/theme/scrollbartp.h"
-
-CFWL_Theme::CFWL_Theme() {
- m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_FormTP));
- m_ThemesArray.push_back(
- std::unique_ptr<CFWL_WidgetTP>(new CFWL_PushButtonTP));
- m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_CheckBoxTP));
- m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_ListBoxTP));
- m_ThemesArray.push_back(
- std::unique_ptr<CFWL_WidgetTP>(new CFWL_PictureBoxTP));
- m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_ScrollBarTP));
- m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_EditTP));
- m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_ComboBoxTP));
- m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_BarcodeTP));
- m_ThemesArray.push_back(
- std::unique_ptr<CFWL_WidgetTP>(new CFWL_DateTimePickerTP));
- m_ThemesArray.push_back(
- std::unique_ptr<CFWL_WidgetTP>(new CFWL_MonthCalendarTP));
- m_ThemesArray.push_back(std::unique_ptr<CFWL_WidgetTP>(new CFWL_CaretTP));
-}
-
-CFWL_Theme::~CFWL_Theme() {}
-
-FX_BOOL CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) {
- return !!GetTheme(pWidget);
-}
-
-FX_DWORD CFWL_Theme::GetThemeID(IFWL_Widget* pWidget) {
- return GetTheme(pWidget)->GetThemeID(pWidget);
-}
-
-FX_DWORD CFWL_Theme::SetThemeID(IFWL_Widget* pWidget,
- FX_DWORD dwThemeID,
- FX_BOOL bChildren) {
- FX_DWORD dwID;
- for (const auto& pTheme : m_ThemesArray) {
- dwID = pTheme->GetThemeID(pWidget);
- pTheme->SetThemeID(pWidget, dwThemeID, FALSE);
- }
- return dwID;
-}
-
-FWL_ERR CFWL_Theme::GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) {
- return FWL_ERR_Succeeded;
-}
-
-FWL_ERR CFWL_Theme::SetThemeMatrix(IFWL_Widget* pWidget,
- const CFX_Matrix& matrix) {
- return FWL_ERR_Succeeded;
-}
-
-FX_BOOL CFWL_Theme::DrawBackground(CFWL_ThemeBackground* pParams) {
- return GetTheme(pParams->m_pWidget)->DrawBackground(pParams);
-}
-
-FX_BOOL CFWL_Theme::DrawText(CFWL_ThemeText* pParams) {
- return GetTheme(pParams->m_pWidget)->DrawText(pParams);
-}
-
-void* CFWL_Theme::GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity) {
- return GetTheme(pThemePart->m_pWidget)->GetCapacity(pThemePart, dwCapacity);
-}
-
-FX_BOOL CFWL_Theme::IsCustomizedLayout(IFWL_Widget* pWidget) {
- return GetTheme(pWidget)->IsCustomizedLayout(pWidget);
-}
-
-FWL_ERR CFWL_Theme::GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) {
- return GetTheme(pThemePart->m_pWidget)->GetPartRect(pThemePart, rtPart);
-}
-
-FX_BOOL CFWL_Theme::IsInPart(CFWL_ThemePart* pThemePart,
- FX_FLOAT fx,
- FX_FLOAT fy) {
- return GetTheme(pThemePart->m_pWidget)->IsInPart(pThemePart, fx, fy);
-}
-
-FX_BOOL CFWL_Theme::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) {
- return GetTheme(pParams->m_pWidget)->CalcTextRect(pParams, rect);
-}
-
-FWL_ERR CFWL_Theme::Initialize() {
- for (const auto& pTheme : m_ThemesArray)
- pTheme->Initialize();
-
- FWLTHEME_Init();
- return FWL_ERR_Succeeded;
-}
-
-FWL_ERR CFWL_Theme::Finalize() {
- for (const auto& pTheme : m_ThemesArray)
- pTheme->Finalize();
-
- FWLTHEME_Release();
- return FWL_ERR_Succeeded;
-}
-
-FWL_ERR CFWL_Theme::SetFont(IFWL_Widget* pWidget,
- const FX_WCHAR* strFont,
- FX_FLOAT fFontSize,
- FX_ARGB rgbFont) {
- for (const auto& pTheme : m_ThemesArray)
- pTheme->SetFont(pWidget, strFont, fFontSize, rgbFont);
-
- return FWL_ERR_Succeeded;
-}
-
-CFWL_WidgetTP* CFWL_Theme::GetTheme(IFWL_Widget* pWidget) {
- for (const auto& pTheme : m_ThemesArray) {
- if (pTheme->IsValidWidget(pWidget))
- return pTheme.get();
- }
- return nullptr;
-}
« no previous file with comments | « xfa/src/fwl/lightwidget/scrollbar.cpp ('k') | xfa/src/fwl/lightwidget/tooltipctrl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698