OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ | 7 #ifndef XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ |
8 #define XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ | 8 #define XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 CFWL_ArrowData(); | 174 CFWL_ArrowData(); |
175 static CFWL_ArrowData* m_pInstance; | 175 static CFWL_ArrowData* m_pInstance; |
176 }; | 176 }; |
177 | 177 |
178 class CFWL_FontData { | 178 class CFWL_FontData { |
179 public: | 179 public: |
180 CFWL_FontData(); | 180 CFWL_FontData(); |
181 virtual ~CFWL_FontData(); | 181 virtual ~CFWL_FontData(); |
182 FX_BOOL Equal(const CFX_WideStringC& wsFontFamily, | 182 FX_BOOL Equal(const CFX_WideStringC& wsFontFamily, |
183 FX_DWORD dwFontStyles, | 183 FX_DWORD dwFontStyles, |
184 FX_WORD wCodePage); | 184 uint16_t wCodePage); |
185 FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily, | 185 FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily, |
186 FX_DWORD dwFontStyles, | 186 FX_DWORD dwFontStyles, |
187 FX_WORD wCodePage); | 187 uint16_t wCodePage); |
188 IFX_Font* GetFont() const { return m_pFont; } | 188 IFX_Font* GetFont() const { return m_pFont; } |
189 | 189 |
190 protected: | 190 protected: |
191 CFX_WideString m_wsFamily; | 191 CFX_WideString m_wsFamily; |
192 FX_DWORD m_dwStyles; | 192 FX_DWORD m_dwStyles; |
193 FX_DWORD m_dwCodePage; | 193 FX_DWORD m_dwCodePage; |
194 IFX_Font* m_pFont; | 194 IFX_Font* m_pFont; |
195 IFX_FontMgr* m_pFontMgr; | 195 IFX_FontMgr* m_pFontMgr; |
196 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 196 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
197 IFX_FontSourceEnum* m_pFontSource; | 197 IFX_FontSourceEnum* m_pFontSource; |
198 #endif | 198 #endif |
199 }; | 199 }; |
200 | 200 |
201 class CFWL_FontManager { | 201 class CFWL_FontManager { |
202 public: | 202 public: |
203 static CFWL_FontManager* GetInstance(); | 203 static CFWL_FontManager* GetInstance(); |
204 static void DestroyInstance(); | 204 static void DestroyInstance(); |
205 | 205 |
206 IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily, | 206 IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily, |
207 FX_DWORD dwFontStyles, | 207 FX_DWORD dwFontStyles, |
208 FX_WORD dwCodePage); | 208 uint16_t dwCodePage); |
209 | 209 |
210 protected: | 210 protected: |
211 CFWL_FontManager(); | 211 CFWL_FontManager(); |
212 virtual ~CFWL_FontManager(); | 212 virtual ~CFWL_FontManager(); |
213 | 213 |
214 static CFWL_FontManager* s_FontManager; | 214 static CFWL_FontManager* s_FontManager; |
215 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray; | 215 std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray; |
216 }; | 216 }; |
217 | 217 |
218 #endif // XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ | 218 #endif // XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ |
OLD | NEW |