Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cfwl_comboboxtp.cpp
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
#
include
"xfa/fwl/theme/cfwl_comboboxtp.h"
8
9
#
include
"xfa/fgas/graphics/cfgas_gecolor.h"
10
#
include
"xfa/fgas/graphics/cfgas_gepath.h"
11
#
include
"xfa/fwl/cfwl_combobox.h"
12
#
include
"xfa/fwl/cfwl_themebackground.h"
13
#
include
"xfa/fwl/cfwl_widget.h"
14
#
include
"xfa/fwl/ifwl_themeprovider.h"
15
16
namespace
pdfium
{
17
18
CFWL_ComboBoxTP::CFWL_ComboBoxTP() =
default
;
19
20
CFWL_ComboBoxTP::~
CFWL_ComboBoxTP
() =
default
;
21
22
void
CFWL_ComboBoxTP::
DrawBackground
(
const
CFWL_ThemeBackground& pParams) {
23
switch
(pParams
.
GetPart
()) {
24
case
CFWL_ThemePart
::
Part
::
kBorder
: {
25
DrawBorder
(
pParams
.
GetGraphics
(
)
,
pParams.m_PartRect
,
pParams.m_matrix
)
;
26
break
;
27
}
28
case
CFWL_ThemePart
::
Part
::
kBackground
: {
29
CFGAS_GEPath path;
30
const
CFX_RectF
& rect = pParams.m_PartRect;
31
path
.
AddRectangle
(
rect
.
left
,
rect
.
top
,
rect
.
width
,
rect
.
height
)
;
32
FX_ARGB
argb_color;
33
if
(pParams.m_dwStates &
CFWL_PartState
::
kSelected
)
34
argb_color =
FWLTHEME_COLOR_BKSelected
;
35
else
if
(pParams.m_dwStates &
CFWL_PartState
::
kDisabled
)
36
argb_color =
FWLTHEME_COLOR_EDGERB1
;
37
else
38
argb_color = 0xFFFFFFFF;
39
40
CFGAS_GEGraphics
::
StateRestorer
restorer
(
pParams
.
GetGraphics
(
)
)
;
41
pParams
.
GetGraphics
(
)
->
SetFillColor
(
CFGAS_GEColor
(
argb_color
)
)
;
42
pParams
.
GetGraphics
(
)
->
FillPath
(
43
path
,
CFX_FillRenderOptions
::
FillType
::
kWinding
,
pParams.m_matrix
)
;
44
break
;
45
}
46
case
CFWL_ThemePart
::
Part
::
kDropDownButton
: {
47
DrawArrowBtn
(
pParams
.
GetGraphics
(
)
,
pParams.m_PartRect
,
48
FWLTHEME_DIRECTION
::
kDown
,
pParams
.
GetThemeState
()
,
49
pParams.m_matrix
)
;
50
break
;
51
}
52
default
:
53
break
;
54
}
55
}
56
57
}
// namespace pdfium
FWLTHEME_COLOR_BKSelected
#define FWLTHEME_COLOR_BKSelected
Definition
cfwl_utils.h:23
FWLTHEME_COLOR_EDGERB1
#define FWLTHEME_COLOR_EDGERB1
Definition
cfwl_utils.h:21
CFGAS_GEColor
Definition
cfgas_gecolor.h:19
CFGAS_GEColor::CFGAS_GEColor
CFGAS_GEColor(FX_ARGB argb)
Definition
cfgas_gecolor.cpp:9
CFGAS_GEGraphics::StateRestorer
Definition
cfgas_gegraphics.h:28
CFGAS_GEGraphics::StateRestorer::StateRestorer
StateRestorer(CFGAS_GEGraphics *graphics)
Definition
cfgas_gegraphics.cpp:421
CFGAS_GEGraphics
Definition
cfgas_gegraphics.h:26
CFGAS_GEGraphics::FillPath
void FillPath(const CFGAS_GEPath &path, CFX_FillRenderOptions::FillType fill_type, const CFX_Matrix &matrix)
Definition
cfgas_gegraphics.cpp:178
CFGAS_GEGraphics::SetFillColor
void SetFillColor(const CFGAS_GEColor &color)
Definition
cfgas_gegraphics.cpp:169
CFGAS_GEPath::AddRectangle
void AddRectangle(float left, float top, float width, float height)
Definition
cfgas_gepath.cpp:83
CFX_RectF
Definition
fx_coordinates.h:276
CFX_RectF::width
float width
Definition
fx_coordinates.h:430
CFX_RectF::left
float left
Definition
fx_coordinates.h:428
CFX_RectF::height
float height
Definition
fx_coordinates.h:431
CFX_RectF::top
float top
Definition
fx_coordinates.h:429
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
pdfium::CFWL_ComboBoxTP::DrawBackground
void DrawBackground(const CFWL_ThemeBackground &pParams) override
Definition
cfwl_comboboxtp.cpp:22
pdfium::CFWL_ComboBoxTP::~CFWL_ComboBoxTP
~CFWL_ComboBoxTP() override
pdfium::CFWL_ThemeBackground::GetGraphics
CFGAS_GEGraphics * GetGraphics() const
Definition
cfwl_themebackground.h:28
pdfium::CFWL_ThemePart
Definition
cfwl_themepart.h:39
pdfium::CFWL_ThemePart::GetPart
Part GetPart() const
Definition
cfwl_themepart.h:92
pdfium::CFWL_ThemePart::Part
Part
Definition
cfwl_themepart.h:41
pdfium::CFWL_ThemePart::Part::kBackground
@ kBackground
Definition
cfwl_themepart.h:45
pdfium::CFWL_ThemePart::Part::kDropDownButton
@ kDropDownButton
Definition
cfwl_themepart.h:57
pdfium::CFWL_ThemePart::Part::kBorder
@ kBorder
Definition
cfwl_themepart.h:46
pdfium::CFWL_ThemePart::GetThemeState
FWLTHEME_STATE GetThemeState() const
Definition
cfwl_themepart.cpp:16
pdfium::CFWL_WidgetTP::DrawBorder
void DrawBorder(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, const CFX_Matrix &matrix)
Definition
cfwl_widgettp.cpp:83
pdfium::CFWL_WidgetTP::DrawArrowBtn
void DrawArrowBtn(CFGAS_GEGraphics *pGraphics, const CFX_RectF &rect, FWLTHEME_DIRECTION eDict, FWLTHEME_STATE eState, const CFX_Matrix &matrix)
Definition
cfwl_widgettp.cpp:200
FX_ARGB
uint32_t FX_ARGB
Definition
fx_dib.h:36
pdfium::FWLTHEME_DIRECTION
FWLTHEME_DIRECTION
Definition
cfwl_utils.h:19
pdfium::FWLTHEME_DIRECTION::kDown
@ kDown
Definition
cfwl_utils.h:19
pdfium::CFWL_PartState
CFWL_PartState
Definition
cfwl_themepart.h:22
pdfium::CFWL_PartState::kSelected
@ kSelected
Definition
cfwl_themepart.h:36
pdfium::CFWL_PartState::kDisabled
@ kDisabled
Definition
cfwl_themepart.h:26
CFX_FillRenderOptions
Definition
cfx_fillrenderoptions.h:11
CFX_FillRenderOptions::FillType
FillType
Definition
cfx_fillrenderoptions.h:13
CFX_FillRenderOptions::FillType::kWinding
@ kWinding
Definition
cfx_fillrenderoptions.h:23
qtwebengine
src
3rdparty
chromium
third_party
pdfium
xfa
fwl
theme
cfwl_comboboxtp.cpp
Generated on
for Qt by
1.18.0