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

Side by Side Diff: xfa/fwl/core/cfwl_pushbutton.cpp

Issue 2555253002: Split CFWL_Widget::GetWidgetRect into two parts (Closed)
Patch Set: Rebase to master Created 4 years 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/fwl/core/cfwl_picturebox.cpp ('k') | xfa/fwl/core/cfwl_scrollbar.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/fwl/core/cfwl_pushbutton.h" 7 #include "xfa/fwl/core/cfwl_pushbutton.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 30 matching lines...) Expand all
41 return; 41 return;
42 } 42 }
43 43
44 rect.Set(0, 0, 0, 0); 44 rect.Set(0, 0, 0, 0);
45 if (!m_pProperties->m_pThemeProvider) 45 if (!m_pProperties->m_pThemeProvider)
46 m_pProperties->m_pThemeProvider = GetAvailableTheme(); 46 m_pProperties->m_pThemeProvider = GetAvailableTheme();
47 47
48 FX_FLOAT* fcaption = 48 FX_FLOAT* fcaption =
49 static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::Margin)); 49 static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::Margin));
50 rect.Inflate(*fcaption, *fcaption); 50 rect.Inflate(*fcaption, *fcaption);
51 CFWL_Widget::GetWidgetRect(rect, true); 51 InflateWidgetRect(rect);
52 } 52 }
53 53
54 void CFWL_PushButton::SetStates(uint32_t dwStates) { 54 void CFWL_PushButton::SetStates(uint32_t dwStates) {
55 if (dwStates & FWL_WGTSTATE_Disabled) { 55 if (dwStates & FWL_WGTSTATE_Disabled) {
56 m_pProperties->m_dwStates = FWL_WGTSTATE_Disabled; 56 m_pProperties->m_dwStates = FWL_WGTSTATE_Disabled;
57 return; 57 return;
58 } 58 }
59 CFWL_Widget::SetStates(dwStates); 59 CFWL_Widget::SetStates(dwStates);
60 } 60 }
61 61
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 if (pMsg->m_dwKeyCode != FWL_VKEY_Return) 298 if (pMsg->m_dwKeyCode != FWL_VKEY_Return)
299 return; 299 return;
300 300
301 CFWL_EvtMouse wmMouse(this); 301 CFWL_EvtMouse wmMouse(this);
302 wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp; 302 wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp;
303 DispatchEvent(&wmMouse); 303 DispatchEvent(&wmMouse);
304 304
305 CFWL_Event wmClick(CFWL_Event::Type::Click, this); 305 CFWL_Event wmClick(CFWL_Event::Type::Click, this);
306 DispatchEvent(&wmClick); 306 DispatchEvent(&wmClick);
307 } 307 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_picturebox.cpp ('k') | xfa/fwl/core/cfwl_scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698