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
cfwl_widgettp.h
Go to the documentation of this file.
1// Copyright 2014 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#ifndef XFA_FWL_THEME_CFWL_WIDGETTP_H_
8#define XFA_FWL_THEME_CFWL_WIDGETTP_H_
9
10#include <array>
11#include <memory>
12
13#include "core/fxcrt/fx_coordinates.h"
14#include "core/fxcrt/fx_system.h"
15#include "core/fxcrt/retain_ptr.h"
16#include "core/fxge/dib/fx_dib.h"
17#include "v8/include/cppgc/garbage-collected.h"
18#include "xfa/fwl/theme/cfwl_utils.h"
19
21
22namespace pdfium {
23
24class CFDE_TextOut;
25class CFWL_ThemeBackground;
26class CFWL_ThemeText;
28
30 public:
31 virtual ~CFWL_WidgetTP();
32
33 virtual void DrawBackground(const CFWL_ThemeBackground& pParams);
34 virtual void DrawText(const CFWL_ThemeText& pParams);
35
36 // Non-virtual, nothing to trace in subclasses at present.
37 void Trace(cppgc::Visitor* visitor) const;
38
39 protected:
40 struct CColorData {
41 std::array<FX_ARGB, 4> clrBorder; // Indexed by enum FWLTHEME_STATE - 1.
42 std::array<FX_ARGB, 4> clrStart; // Indexed by enum FWLTHEME_STATE - 1.
43 std::array<FX_ARGB, 4> clrEnd; // Indexed by enum FWLTHEME_STATE - 1.
44 std::array<FX_ARGB, 4> clrSign; // Indexed by enum FWLTHEME_STATE - 1.
45 };
46
48
51
52 void DrawBorder(CFGAS_GEGraphics* pGraphics,
53 const CFX_RectF& rect,
54 const CFX_Matrix& matrix);
55 void FillBackground(CFGAS_GEGraphics* pGraphics,
56 const CFX_RectF& rect,
57 const CFX_Matrix& matrix);
58 void FillSolidRect(CFGAS_GEGraphics* pGraphics,
59 FX_ARGB fillColor,
60 const CFX_RectF& rect,
61 const CFX_Matrix& matrix);
62 void DrawFocus(CFGAS_GEGraphics* pGraphics,
63 const CFX_RectF& rect,
64 const CFX_Matrix& matrix);
65 void DrawArrow(CFGAS_GEGraphics* pGraphics,
66 const CFX_RectF& rect,
68 FX_ARGB argSign,
69 const CFX_Matrix& matrix);
70 void DrawBtn(CFGAS_GEGraphics* pGraphics,
71 const CFX_RectF& rect,
72 FWLTHEME_STATE eState,
73 const CFX_Matrix& matrix);
74 void DrawArrowBtn(CFGAS_GEGraphics* pGraphics,
75 const CFX_RectF& rect,
77 FWLTHEME_STATE eState,
78 const CFX_Matrix& matrix);
79
82};
83
84} // namespace pdfium
85
86// TODO(crbug.com/42271761): Remove.
87using pdfium::CFWL_WidgetTP;
88
89#endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_
~CFWL_BarcodeTP() override
void DrawBackground(const CFWL_ThemeBackground &pParams) override
void FillBackground(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, const CFX_Matrix &matrix)
virtual void DrawBackground(const CFWL_ThemeBackground &pParams)
void DrawFocus(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, const CFX_Matrix &matrix)
void EnsureTTOInitialized(IFWL_ThemeProvider *pProvider)
void DrawBtn(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, FWLTHEME_STATE eState, const CFX_Matrix &matrix)
std::unique_ptr< CColorData > m_pColorData
virtual void DrawText(const CFWL_ThemeText &pParams)
std::unique_ptr< CFDE_TextOut > m_pTextOut
void DrawBorder(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, const CFX_Matrix &matrix)
void Trace(cppgc::Visitor *visitor) const
void DrawArrowBtn(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, FWLTHEME_DIRECTION eDict, FWLTHEME_STATE eState, const CFX_Matrix &matrix)
void FillSolidRect(CFGAS_GEGraphics *pGraphics, FX_ARGB fillColor, const CFX_RectF &rect, const CFX_Matrix &matrix)
void DrawArrow(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, FWLTHEME_DIRECTION eDict, FX_ARGB argSign, const CFX_Matrix &matrix)
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)
uint32_t FX_ARGB
Definition fx_dib.h:36
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32
Definition heap.h:12
FWLTHEME_DIRECTION
Definition cfwl_utils.h:19
FWLTHEME_STATE
Definition cfwl_utils.h:17
std::array< FX_ARGB, 4 > clrStart
std::array< FX_ARGB, 4 > clrBorder
std::array< FX_ARGB, 4 > clrSign
std::array< FX_ARGB, 4 > clrEnd