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

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

Issue 2557103002: Cleanup FWL default values part II. (Closed)
Patch Set: Unused 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
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_EventType::EditChanged); 195 CFWL_Event ev(CFWL_EventType::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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 if (DisForm_IsMonthCalendarVisible()) 652 if (DisForm_IsMonthCalendarVisible())
654 ShowMonthCalendar(false); 653 ShowMonthCalendar(false);
655 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) { 654 if (m_pEdit->GetStates() & FWL_WGTSTATE_Focused) {
656 pMsg->m_pSrcTarget = m_pEdit.get(); 655 pMsg->m_pSrcTarget = m_pEdit.get();
657 m_pEdit->GetDelegate()->OnProcessMessage(pMsg); 656 m_pEdit->GetDelegate()->OnProcessMessage(pMsg);
658 } 657 }
659 } 658 }
660 rtInvalidate.Inflate(2, 2); 659 rtInvalidate.Inflate(2, 2);
661 Repaint(&rtInvalidate); 660 Repaint(&rtInvalidate);
662 } 661 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698