summaryrefslogtreecommitdiff
path: root/xfa/include/fwl/theme/widgettp.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-08 09:34:35 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-08 09:34:35 -0800
commitddf2f339f603246107451931d16245c8b7d1d7c4 (patch)
tree94350b986e9b31f6246616ca08a77e16c9cbc581 /xfa/include/fwl/theme/widgettp.h
parent22e659117f4302718e5bb82f7c74251bf032be4d (diff)
downloadpdfium-ddf2f339f603246107451931d16245c8b7d1d7c4.tar.xz
Remove CFX_PtrArray from xfa/include/fwl
Fix IWYU in stl_util.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1672283002 .
Diffstat (limited to 'xfa/include/fwl/theme/widgettp.h')
-rw-r--r--xfa/include/fwl/theme/widgettp.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h
index adeeb42d6c..404ca51547 100644
--- a/xfa/include/fwl/theme/widgettp.h
+++ b/xfa/include/fwl/theme/widgettp.h
@@ -4,8 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef _FWL_WIDGETTP_H
-#define _FWL_WIDGETTP_H
+#ifndef XFA_INCLUDE_FWL_THEME_WIDGETTP_H_
+#define XFA_INCLUDE_FWL_THEME_WIDGETTP_H_
+
+#include <memory>
+#include <vector>
+
class IFWL_ThemeProvider;
class IFWL_Widget;
class IFDE_TextOut;
@@ -16,6 +20,7 @@ class IFX_FontSourceEnum;
#endif
class CFWL_WidgetTP;
class CFWL_ArrowData;
+
class CFWL_WidgetTP {
public:
virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
@@ -142,6 +147,7 @@ void FWLTHEME_Release();
FX_DWORD FWL_GetThemeLayout(FX_DWORD dwThemeID);
FX_DWORD FWL_GetThemeColor(FX_DWORD dwThemeID);
FX_DWORD FWL_MakeThemeID(FX_DWORD dwLayout, FX_DWORD dwColor);
+
class CFWL_ArrowData {
public:
static CFWL_ArrowData* GetInstance();
@@ -162,6 +168,7 @@ class CFWL_ArrowData {
CFWL_ArrowData();
static CFWL_ArrowData* m_pInstance;
};
+
class CFWL_FontData {
public:
CFWL_FontData();
@@ -184,16 +191,22 @@ class CFWL_FontData {
IFX_FontSourceEnum* m_pFontSource;
#endif
};
+
class CFWL_FontManager {
public:
- CFWL_FontManager();
- virtual ~CFWL_FontManager();
+ static CFWL_FontManager* GetInstance();
+ static void DestroyInstance();
+
IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
FX_WORD dwCodePage);
protected:
- CFX_PtrArray m_arrFonts;
+ CFWL_FontManager();
+ virtual ~CFWL_FontManager();
+
+ static CFWL_FontManager* s_FontManager;
+ std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray;
};
-CFWL_FontManager* FWL_GetFontManager();
-#endif
+
+#endif // XFA_INCLUDE_FWL_THEME_WIDGETTP_H_