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