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_picturebox.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/cfwl_picturebox.h"
8
9namespace pdfium {
10
11CFWL_PictureBox::CFWL_PictureBox(CFWL_App* app)
12 : CFWL_Widget(app, CFWL_Widget::Properties(), nullptr) {}
13
14CFWL_PictureBox::~CFWL_PictureBox() = default;
15
16FWL_Type CFWL_PictureBox::GetClassID() const {
18}
19
20void CFWL_PictureBox::Update() {
21 if (IsLocked())
22 return;
23
24 m_ClientRect = GetClientRect();
25}
26
27void CFWL_PictureBox::DrawWidget(CFGAS_GEGraphics* pGraphics,
28 const CFX_Matrix& matrix) {
29 if (!pGraphics)
30 return;
31
32 if (HasBorder())
33 DrawBorder(pGraphics, CFWL_ThemePart::Part::kBorder, matrix);
34}
35
36void CFWL_PictureBox::OnDrawWidget(CFGAS_GEGraphics* pGraphics,
37 const CFX_Matrix& matrix) {
38 DrawWidget(pGraphics, matrix);
39}
40
41} // namespace pdfium
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
FWL_Type GetClassID() const override
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
bool HasBorder() const
CFWL_Widget(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
void DrawBorder(CFGAS_GEGraphics *pGraphics, CFWL_ThemePart::Part iPartBorder, const CFX_Matrix &pMatrix)
virtual CFX_RectF GetClientRect()
bool IsLocked() const