Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: xfa/fxfa/app/xfa_ffpushbutton.cpp

Issue 2459423003: Rename IFWL_Widget::SetDelegate (Closed)
Patch Set: Review feedback Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffimageedit.cpp ('k') | xfa/fxfa/app/xfa_fftextedit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffimageedit.cpp ('k') | xfa/fxfa/app/xfa_fftextedit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698