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 CFWL_PictureBox(CFWL_App * app)9CFWL_PictureBox::CFWL_PictureBox(CFWL_App* app) 10 : CFWL_Widget(app, CFWL_Widget::Properties(), nullptr) {} 11 12 CFWL_PictureBox::~CFWL_PictureBox() = default; 13 GetClassID() const14FWL_Type CFWL_PictureBox::GetClassID() const { 15 return FWL_Type::PictureBox; 16 } 17 Update()18void CFWL_PictureBox::Update() { 19 if (IsLocked()) 20 return; 21 22 m_ClientRect = GetClientRect(); 23 } 24 DrawWidget(CFGAS_GEGraphics * pGraphics,const CFX_Matrix & matrix)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 OnDrawWidget(CFGAS_GEGraphics * pGraphics,const CFX_Matrix & matrix)34void CFWL_PictureBox::OnDrawWidget(CFGAS_GEGraphics* pGraphics, 35 const CFX_Matrix& matrix) { 36 DrawWidget(pGraphics, matrix); 37 } 38