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

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

Issue 2557103002: Cleanup FWL default values part II. (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_datetimepicker.h ('k') | xfa/fwl/core/cfwl_edit.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/cfwl_datetimepicker.h" 7 #include "xfa/fwl/core/cfwl_datetimepicker.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if (!m_pEdit) 189 if (!m_pEdit)
190 return; 190 return;
191 191
192 m_pEdit->SetText(wsText); 192 m_pEdit->SetText(wsText);
193 Repaint(&m_rtClient); 193 Repaint(&m_rtClient);
194 194
195 CFWL_Event ev(CFWL_Event::Type::EditChanged); 195 CFWL_Event ev(CFWL_Event::Type::EditChanged);
196 DispatchEvent(&ev); 196 DispatchEvent(&ev);
197 } 197 }
198 198
199 CFX_WideString CFWL_DateTimePicker::GetEditText(int32_t nStart, 199 CFX_WideString CFWL_DateTimePicker::GetEditText() const {
200 int32_t nCount) const { 200 return m_pEdit ? m_pEdit->GetText() : L"";
201 return m_pEdit ? m_pEdit->GetText(nStart, nCount) : L"";
202 } 201 }
203 202
204 void CFWL_DateTimePicker::GetBBox(CFX_RectF& rect) const { 203 void CFWL_DateTimePicker::GetBBox(CFX_RectF& rect) const {
205 if (m_pWidgetMgr->IsFormDisabled()) { 204 if (m_pWidgetMgr->IsFormDisabled()) {
206 DisForm_GetBBox(rect); 205 DisForm_GetBBox(rect);
207 return; 206 return;
208 } 207 }
209 208
210 rect = m_pProperties->m_rtWidget; 209 rect = m_pProperties->m_rtWidget;
211 if (IsMonthCalendarVisible()) { 210 if (IsMonthCalendarVisible()) {
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 if (DisForm_IsMonthCalendarVisible()) 649 if (DisForm_IsMonthCalendarVisible())
651 ShowMonthCalendar(false); 650 ShowMonthCalendar(false);
652 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { 651 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) {
653 pMsg->m_pSrcTarget = m_pEdit.get(); 652 pMsg->m_pSrcTarget = m_pEdit.get();
654 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); 653 m_pEdit->GetDelegate()->OnProcessMessage(pMsg);
655 } 654 }
656 } 655 }
657 rtInvalidate.Inflate(2, 2); 656 rtInvalidate.Inflate(2, 2);
658 Repaint(&rtInvalidate); 657 Repaint(&rtInvalidate);
659 } 658 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_datetimepicker.h ('k') | xfa/fwl/core/cfwl_edit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698