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

Side by Side Diff: xfa/fwl/core/ifwl_checkbox.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_checkbox.h ('k') | xfa/fwl/core/ifwl_combobox.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_checkbox.h" 7 #include "xfa/fwl/core/ifwl_checkbox.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "third_party/base/ptr_util.h" 11 #include "third_party/base/ptr_util.h"
12 #include "xfa/fde/tto/fde_textout.h" 12 #include "xfa/fde/tto/fde_textout.h"
13 #include "xfa/fwl/core/cfwl_message.h" 13 #include "xfa/fwl/core/cfwl_message.h"
14 #include "xfa/fwl/core/cfwl_themebackground.h" 14 #include "xfa/fwl/core/cfwl_themebackground.h"
15 #include "xfa/fwl/core/cfwl_themetext.h" 15 #include "xfa/fwl/core/cfwl_themetext.h"
16 #include "xfa/fwl/core/cfwl_widgetmgr.h" 16 #include "xfa/fwl/core/cfwl_widgetmgr.h"
17 #include "xfa/fwl/core/fwl_noteimp.h" 17 #include "xfa/fwl/core/fwl_noteimp.h"
18 #include "xfa/fwl/core/ifwl_app.h" 18 #include "xfa/fwl/core/ifwl_app.h"
19 #include "xfa/fwl/core/ifwl_checkbox.h" 19 #include "xfa/fwl/core/ifwl_checkbox.h"
20 #include "xfa/fwl/core/ifwl_themeprovider.h" 20 #include "xfa/fwl/core/ifwl_themeprovider.h"
21 21
22 namespace { 22 namespace {
23 23
24 const int kCaptionMargin = 5; 24 const int kCaptionMargin = 5;
25 25
26 } // namespace 26 } // namespace
27 27
28 IFWL_CheckBox::IFWL_CheckBox(const IFWL_App* app, 28 IFWL_CheckBox::IFWL_CheckBox(const IFWL_App* app,
29 const CFWL_WidgetImpProperties& properties) 29 std::unique_ptr<CFWL_WidgetProperties> properties)
30 : IFWL_Widget(app, properties, nullptr), 30 : IFWL_Widget(app, std::move(properties), nullptr),
31 m_dwTTOStyles(FDE_TTOSTYLE_SingleLine), 31 m_dwTTOStyles(FDE_TTOSTYLE_SingleLine),
32 m_iTTOAlign(FDE_TTOALIGNMENT_Center), 32 m_iTTOAlign(FDE_TTOALIGNMENT_Center),
33 m_bBtnDown(false) { 33 m_bBtnDown(false) {
34 m_rtClient.Reset(); 34 m_rtClient.Reset();
35 m_rtBox.Reset(); 35 m_rtBox.Reset();
36 m_rtCaption.Reset(); 36 m_rtCaption.Reset();
37 m_rtFocus.Reset(); 37 m_rtFocus.Reset();
38 } 38 }
39 39
40 IFWL_CheckBox::~IFWL_CheckBox() {} 40 IFWL_CheckBox::~IFWL_CheckBox() {}
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 void IFWL_CheckBox::OnKeyDown(CFWL_MsgKey* pMsg) { 531 void IFWL_CheckBox::OnKeyDown(CFWL_MsgKey* pMsg) {
532 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) { 532 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) {
533 DispatchKeyEvent(pMsg); 533 DispatchKeyEvent(pMsg);
534 return; 534 return;
535 } 535 }
536 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || 536 if (pMsg->m_dwKeyCode == FWL_VKEY_Return ||
537 pMsg->m_dwKeyCode == FWL_VKEY_Space) { 537 pMsg->m_dwKeyCode == FWL_VKEY_Space) {
538 NextStates(); 538 NextStates();
539 } 539 }
540 } 540 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_checkbox.h ('k') | xfa/fwl/core/ifwl_combobox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698