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

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

Issue 2469893004: Unify CFWL_WidgetProperties and CFWL_WidgetImpProperties. (Closed)
Patch Set: review cleanup 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/fwl/core/ifwl_spinbutton.h ('k') | xfa/fwl/core/ifwl_tooltip.h » ('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/ifwl_spinbutton.h" 7 #include "xfa/fwl/core/ifwl_spinbutton.h"
8 8
9 #include "third_party/base/ptr_util.h" 9 #include "third_party/base/ptr_util.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
11 #include "xfa/fwl/core/cfwl_themebackground.h" 11 #include "xfa/fwl/core/cfwl_themebackground.h"
12 #include "xfa/fwl/core/cfwl_widgetimpproperties.h" 12 #include "xfa/fwl/core/cfwl_widgetproperties.h"
13 #include "xfa/fwl/core/fwl_noteimp.h" 13 #include "xfa/fwl/core/fwl_noteimp.h"
14 #include "xfa/fwl/core/ifwl_spinbutton.h" 14 #include "xfa/fwl/core/ifwl_spinbutton.h"
15 #include "xfa/fwl/core/ifwl_themeprovider.h" 15 #include "xfa/fwl/core/ifwl_themeprovider.h"
16 #include "xfa/fwl/core/ifwl_themeprovider.h" 16 #include "xfa/fwl/core/ifwl_themeprovider.h"
17 #include "xfa/fwl/core/ifwl_timer.h" 17 #include "xfa/fwl/core/ifwl_timer.h"
18 18
19 namespace { 19 namespace {
20 20
21 const int kMinWidth = 18; 21 const int kMinWidth = 18;
22 const int kMinHeight = 32; 22 const int kMinHeight = 32;
23 const int kElapseTime = 200; 23 const int kElapseTime = 200;
24 24
25 } // namespace 25 } // namespace
26 26
27 IFWL_SpinButton::IFWL_SpinButton(const IFWL_App* app, 27 IFWL_SpinButton::IFWL_SpinButton(
28 const CFWL_WidgetImpProperties& properties) 28 const IFWL_App* app,
29 : IFWL_Widget(app, properties, nullptr), 29 std::unique_ptr<CFWL_WidgetProperties> properties)
30 : IFWL_Widget(app, std::move(properties), nullptr),
30 m_dwUpState(CFWL_PartState_Normal), 31 m_dwUpState(CFWL_PartState_Normal),
31 m_dwDnState(CFWL_PartState_Normal), 32 m_dwDnState(CFWL_PartState_Normal),
32 m_iButtonIndex(0), 33 m_iButtonIndex(0),
33 m_bLButtonDwn(false), 34 m_bLButtonDwn(false),
34 m_pTimerInfo(nullptr), 35 m_pTimerInfo(nullptr),
35 m_Timer(this) { 36 m_Timer(this) {
36 m_rtClient.Reset(); 37 m_rtClient.Reset();
37 m_rtUpButton.Reset(); 38 m_rtUpButton.Reset();
38 m_rtDnButton.Reset(); 39 m_rtDnButton.Reset();
39 m_pProperties->m_dwStyleExes |= FWL_STYLEEXE_SPB_Vert; 40 m_pProperties->m_dwStyleExes |= FWL_STYLEEXE_SPB_Vert;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 IFWL_SpinButton* pButton = static_cast<IFWL_SpinButton*>(m_pWidget); 380 IFWL_SpinButton* pButton = static_cast<IFWL_SpinButton*>(m_pWidget);
380 381
381 if (!pButton->m_pTimerInfo) 382 if (!pButton->m_pTimerInfo)
382 return; 383 return;
383 384
384 CFWL_EvtSpbClick wmPosChanged; 385 CFWL_EvtSpbClick wmPosChanged;
385 wmPosChanged.m_pSrcTarget = pButton; 386 wmPosChanged.m_pSrcTarget = pButton;
386 wmPosChanged.m_bUp = pButton->m_iButtonIndex == 0; 387 wmPosChanged.m_bUp = pButton->m_iButtonIndex == 0;
387 pButton->DispatchEvent(&wmPosChanged); 388 pButton->DispatchEvent(&wmPosChanged);
388 } 389 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_spinbutton.h ('k') | xfa/fwl/core/ifwl_tooltip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698