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 <memory>
11
12#include "core/fxcrt/fx_coordinates.h"
13#include "core/fxcrt/fx_system.h"
14#include "core/fxcrt/retain_ptr.h"
15#include "core/fxge/dib/fx_dib.h"
16#include "v8/include/cppgc/garbage-collected.h"
17#include "xfa/fwl/theme/cfwl_utils.h"
18
19class CFDE_TextOut;
21class CFWL_ThemeBackground;
22class CFWL_ThemeText;
24
26 public:
27 virtual ~CFWL_WidgetTP();
28
29 virtual void DrawBackground(const CFWL_ThemeBackground& pParams);
30 virtual void DrawText(const CFWL_ThemeText& pParams);
31
32 // Non-virtual, nothing to trace in subclasses at present.
33 void Trace(cppgc::Visitor* visitor) const;
34
35 protected:
36 struct CColorData {
37 FX_ARGB clrBorder[4]; // Indexed by enum FWLTHEME_STATE - 1.
38 FX_ARGB clrStart[4]; // Indexed by enum FWLTHEME_STATE - 1.
39 FX_ARGB clrEnd[4]; // Indexed by enum FWLTHEME_STATE - 1.
40 FX_ARGB clrSign[4]; // Indexed by enum FWLTHEME_STATE - 1.
41 };
42
44
47
48 void DrawBorder(CFGAS_GEGraphics* pGraphics,
49 const CFX_RectF& rect,
50 const CFX_Matrix& matrix);
51 void FillBackground(CFGAS_GEGraphics* pGraphics,
52 const CFX_RectF& rect,
53 const CFX_Matrix& matrix);
54 void FillSolidRect(CFGAS_GEGraphics* pGraphics,
55 FX_ARGB fillColor,
56 const CFX_RectF& rect,
57 const CFX_Matrix& matrix);
58 void DrawFocus(CFGAS_GEGraphics* pGraphics,
59 const CFX_RectF& rect,
60 const CFX_Matrix& matrix);
61 void DrawArrow(CFGAS_GEGraphics* pGraphics,
62 const CFX_RectF& rect,
64 FX_ARGB argSign,
65 const CFX_Matrix& matrix);
66 void DrawBtn(CFGAS_GEGraphics* pGraphics,
67 const CFX_RectF& rect,
68 FWLTHEME_STATE eState,
69 const CFX_Matrix& matrix);
70 void DrawArrowBtn(CFGAS_GEGraphics* pGraphics,
71 const CFX_RectF& rect,
73 FWLTHEME_STATE eState,
74 const CFX_Matrix& matrix);
75
78};
79
80#endif // XFA_FWL_THEME_CFWL_WIDGETTP_H_
FWLTHEME_DIRECTION
Definition cfwl_utils.h:17
FWLTHEME_STATE
Definition cfwl_utils.h:15
void DrawBackground(const CFWL_ThemeBackground &pParams) override
~CFWL_BarcodeTP() override
std::unique_ptr< CFDE_TextOut > m_pTextOut
void Trace(cppgc::Visitor *visitor) const
void InitializeArrowColorData()
void EnsureTTOInitialized(IFWL_ThemeProvider *pProvider)
void DrawBorder(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, const CFX_Matrix &matrix)
void FillBackground(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, const CFX_Matrix &matrix)
virtual void DrawBackground(const CFWL_ThemeBackground &pParams)
void DrawArrow(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, FWLTHEME_DIRECTION eDict, FX_ARGB argSign, const CFX_Matrix &matrix)
std::unique_ptr< CColorData > m_pColorData
virtual ~CFWL_WidgetTP()
void DrawFocus(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, const CFX_Matrix &matrix)
void DrawBtn(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, FWLTHEME_STATE eState, const CFX_Matrix &matrix)
void DrawArrowBtn(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, FWLTHEME_DIRECTION eDict, FWLTHEME_STATE eState, const CFX_Matrix &matrix)
virtual void DrawText(const CFWL_ThemeText &pParams)
void FillSolidRect(CFGAS_GEGraphics *pGraphics, FX_ARGB fillColor, const CFX_RectF &rect, const CFX_Matrix &matrix)
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
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
Definition heap.h:32
Definition heap.h:12