| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fwl/core/ifwl_picturebox.h" | 7 #include "xfa/fwl/core/ifwl_picturebox.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/core/fwl_noteimp.h" | 9 #include "xfa/fwl/core/fwl_noteimp.h" |
| 10 #include "xfa/fwl/lightwidget/cfwl_picturebox.h" | 10 #include "xfa/fwl/lightwidget/cfwl_picturebox.h" |
| 11 | 11 |
| 12 // static | 12 IFWL_PictureBox::IFWL_PictureBox(const CFWL_WidgetImpProperties& properties) |
| 13 IFWL_PictureBox* IFWL_PictureBox::Create( | 13 : IFWL_Widget(properties, nullptr), |
| 14 const CFWL_WidgetImpProperties& properties, | |
| 15 IFWL_Widget* pOuter) { | |
| 16 return new IFWL_PictureBox(properties, pOuter); | |
| 17 } | |
| 18 | |
| 19 IFWL_PictureBox::IFWL_PictureBox(const CFWL_WidgetImpProperties& properties, | |
| 20 IFWL_Widget* pOuter) | |
| 21 : IFWL_Widget(properties, pOuter), | |
| 22 m_bTop(FALSE), | 14 m_bTop(FALSE), |
| 23 m_bVCenter(FALSE), | 15 m_bVCenter(FALSE), |
| 24 m_bButton(FALSE) { | 16 m_bButton(FALSE) { |
| 25 m_rtClient.Reset(); | 17 m_rtClient.Reset(); |
| 26 m_rtImage.Reset(); | 18 m_rtImage.Reset(); |
| 27 m_matrix.SetIdentity(); | 19 m_matrix.SetIdentity(); |
| 28 } | 20 } |
| 29 | 21 |
| 30 IFWL_PictureBox::~IFWL_PictureBox() {} | 22 IFWL_PictureBox::~IFWL_PictureBox() {} |
| 31 | 23 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 return FALSE; | 137 return FALSE; |
| 146 } | 138 } |
| 147 | 139 |
| 148 CFWL_PictureBoxImpDelegate::CFWL_PictureBoxImpDelegate(IFWL_PictureBox* pOwner) | 140 CFWL_PictureBoxImpDelegate::CFWL_PictureBoxImpDelegate(IFWL_PictureBox* pOwner) |
| 149 : m_pOwner(pOwner) {} | 141 : m_pOwner(pOwner) {} |
| 150 | 142 |
| 151 void CFWL_PictureBoxImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, | 143 void CFWL_PictureBoxImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics, |
| 152 const CFX_Matrix* pMatrix) { | 144 const CFX_Matrix* pMatrix) { |
| 153 m_pOwner->DrawWidget(pGraphics, pMatrix); | 145 m_pOwner->DrawWidget(pGraphics, pMatrix); |
| 154 } | 146 } |
| OLD | NEW |