| 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/fxfa/app/xfa_ffpushbutton.h" | 7 #include "xfa/fxfa/app/xfa_ffpushbutton.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/core/cfwl_pushbutton.h" | 9 #include "xfa/fwl/core/cfwl_pushbutton.h" |
| 10 #include "xfa/fwl/core/cfwl_widgetmgr.h" | 10 #include "xfa/fwl/core/cfwl_widgetmgr.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top); | 48 mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top); |
| 49 mt.Concat(mtRotate); | 49 mt.Concat(mtRotate); |
| 50 GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(), | 50 GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(), |
| 51 pGS, &mt); | 51 pGS, &mt); |
| 52 } | 52 } |
| 53 FX_BOOL CXFA_FFPushButton::LoadWidget() { | 53 FX_BOOL CXFA_FFPushButton::LoadWidget() { |
| 54 ASSERT(!m_pNormalWidget); | 54 ASSERT(!m_pNormalWidget); |
| 55 CFWL_PushButton* pPushButton = new CFWL_PushButton(GetFWLApp()); | 55 CFWL_PushButton* pPushButton = new CFWL_PushButton(GetFWLApp()); |
| 56 pPushButton->Initialize(); | 56 pPushButton->Initialize(); |
| 57 | 57 |
| 58 m_pOldDelegate = pPushButton->SetDelegate(this); | 58 m_pOldDelegate = pPushButton->GetCurrentDelegate(); |
| 59 pPushButton->SetCurrentDelegate(this); |
| 60 |
| 59 m_pNormalWidget = pPushButton; | 61 m_pNormalWidget = pPushButton; |
| 60 m_pNormalWidget->SetLayoutItem(this); | 62 m_pNormalWidget->SetLayoutItem(this); |
| 61 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); | 63 IFWL_Widget* pWidget = m_pNormalWidget->GetWidget(); |
| 62 CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); | 64 CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver(); |
| 63 pNoteDriver->RegisterEventTarget(pWidget, pWidget); | 65 pNoteDriver->RegisterEventTarget(pWidget, pWidget); |
| 64 m_pNormalWidget->LockUpdate(); | 66 m_pNormalWidget->LockUpdate(); |
| 65 UpdateWidgetProperty(); | 67 UpdateWidgetProperty(); |
| 66 LoadHighlightCaption(); | 68 LoadHighlightCaption(); |
| 67 m_pNormalWidget->UnlockUpdate(); | 69 m_pNormalWidget->UnlockUpdate(); |
| 68 return CXFA_FFField::LoadWidget(); | 70 return CXFA_FFField::LoadWidget(); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 pGraphics->SetLineWidth(fLineWidth); | 238 pGraphics->SetLineWidth(fLineWidth); |
| 237 CFX_Path path; | 239 CFX_Path path; |
| 238 path.Create(); | 240 path.Create(); |
| 239 CFX_RectF rect; | 241 CFX_RectF rect; |
| 240 m_pNormalWidget->GetWidgetRect(rect); | 242 m_pNormalWidget->GetWidgetRect(rect); |
| 241 path.AddRectangle(0, 0, rect.width, rect.height); | 243 path.AddRectangle(0, 0, rect.width, rect.height); |
| 242 pGraphics->StrokePath(&path, (CFX_Matrix*)pMatrix); | 244 pGraphics->StrokePath(&path, (CFX_Matrix*)pMatrix); |
| 243 } | 245 } |
| 244 } | 246 } |
| 245 } | 247 } |
| OLD | NEW |