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

Side by Side Diff: xfa/fwl/cfwl_checkbox.cpp

Issue 2578473003: Remove more unused widget styles (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/fde/tto/fde_textout.cpp ('k') | xfa/fwl/cfwl_edit.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/cfwl_checkbox.h" 7 #include "xfa/fwl/cfwl_checkbox.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 else 172 else
173 dwStates |= CFWL_PartState_Normal; 173 dwStates |= CFWL_PartState_Normal;
174 if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) 174 if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused)
175 dwStates |= CFWL_PartState_Focused; 175 dwStates |= CFWL_PartState_Focused;
176 return dwStates; 176 return dwStates;
177 } 177 }
178 178
179 void CFWL_CheckBox::UpdateTextOutStyles() { 179 void CFWL_CheckBox::UpdateTextOutStyles() {
180 m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft; 180 m_iTTOAlign = FDE_TTOALIGNMENT_TopLeft;
181 m_dwTTOStyles = 0; 181 m_dwTTOStyles = 0;
182 if (m_pProperties->m_dwStyleExes & FWL_WGTSTYLE_RTLReading)
183 m_dwTTOStyles |= FDE_TTOSTYLE_RTL;
184 m_dwTTOStyles |= FDE_TTOSTYLE_SingleLine; 182 m_dwTTOStyles |= FDE_TTOSTYLE_SingleLine;
185 } 183 }
186 184
187 void CFWL_CheckBox::NextStates() { 185 void CFWL_CheckBox::NextStates() {
188 uint32_t dwFirststate = m_pProperties->m_dwStates; 186 uint32_t dwFirststate = m_pProperties->m_dwStates;
189 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_RadioButton) { 187 if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_RadioButton) {
190 if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) == 188 if ((m_pProperties->m_dwStates & FWL_STATE_CKB_CheckMask) ==
191 FWL_STATE_CKB_Unchecked) { 189 FWL_STATE_CKB_Unchecked) {
192 CFWL_WidgetMgr* pWidgetMgr = GetOwnerApp()->GetWidgetMgr(); 190 CFWL_WidgetMgr* pWidgetMgr = GetOwnerApp()->GetWidgetMgr();
193 if (!pWidgetMgr->IsFormDisabled()) { 191 if (!pWidgetMgr->IsFormDisabled()) {
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 362 }
365 363
366 void CFWL_CheckBox::OnKeyDown(CFWL_MessageKey* pMsg) { 364 void CFWL_CheckBox::OnKeyDown(CFWL_MessageKey* pMsg) {
367 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab) 365 if (pMsg->m_dwKeyCode == FWL_VKEY_Tab)
368 return; 366 return;
369 if (pMsg->m_dwKeyCode == FWL_VKEY_Return || 367 if (pMsg->m_dwKeyCode == FWL_VKEY_Return ||
370 pMsg->m_dwKeyCode == FWL_VKEY_Space) { 368 pMsg->m_dwKeyCode == FWL_VKEY_Space) {
371 NextStates(); 369 NextStates();
372 } 370 }
373 } 371 }
OLDNEW
« no previous file with comments | « xfa/fde/tto/fde_textout.cpp ('k') | xfa/fwl/cfwl_edit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698