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

Side by Side Diff: xfa/fwl/basewidget/fwl_monthcalendarimp.cpp

Issue 1946213003: Remove CLASSHASH defines in favour of an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months 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/basewidget/fwl_monthcalendarimp.h ('k') | xfa/fwl/basewidget/fwl_pictureboximp.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/basewidget/fwl_monthcalendarimp.h" 7 #include "xfa/fwl/basewidget/fwl_monthcalendarimp.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 m_rtHeadText.Reset(); 168 m_rtHeadText.Reset();
169 m_rtToday.Reset(); 169 m_rtToday.Reset();
170 m_rtTodayFlag.Reset(); 170 m_rtTodayFlag.Reset();
171 m_rtClient.Reset(); 171 m_rtClient.Reset();
172 m_rtWeekNum.Reset(); 172 m_rtWeekNum.Reset();
173 m_rtWeekNumSep.Reset(); 173 m_rtWeekNumSep.Reset();
174 m_pDateTime = new CFX_DateTime; 174 m_pDateTime = new CFX_DateTime;
175 m_bInit = FALSE; 175 m_bInit = FALSE;
176 m_iMaxSel = 1; 176 m_iMaxSel = 1;
177 } 177 }
178
178 CFWL_MonthCalendarImp::~CFWL_MonthCalendarImp() { 179 CFWL_MonthCalendarImp::~CFWL_MonthCalendarImp() {
179 ClearDateItem(); 180 ClearDateItem();
180 delete m_pDateTime; 181 delete m_pDateTime;
181 m_arrSelDays.RemoveAll(); 182 m_arrSelDays.RemoveAll();
182 } 183 }
184
183 FWL_Error CFWL_MonthCalendarImp::GetClassName(CFX_WideString& wsClass) const { 185 FWL_Error CFWL_MonthCalendarImp::GetClassName(CFX_WideString& wsClass) const {
184 wsClass = FWL_CLASS_MonthCalendar; 186 wsClass = FWL_CLASS_MonthCalendar;
185 return FWL_Error::Succeeded; 187 return FWL_Error::Succeeded;
186 } 188 }
187 uint32_t CFWL_MonthCalendarImp::GetClassID() const { 189
188 return FWL_CLASSHASH_MonthCalendar; 190 FWL_Type CFWL_MonthCalendarImp::GetClassID() const {
191 return FWL_Type::MonthCalendar;
189 } 192 }
193
190 FWL_Error CFWL_MonthCalendarImp::Initialize() { 194 FWL_Error CFWL_MonthCalendarImp::Initialize() {
191 if (CFWL_WidgetImp::Initialize() != FWL_Error::Succeeded) 195 if (CFWL_WidgetImp::Initialize() != FWL_Error::Succeeded)
192 return FWL_Error::Indefinite; 196 return FWL_Error::Indefinite;
197
193 m_pDelegate = new CFWL_MonthCalendarImpDelegate(this); 198 m_pDelegate = new CFWL_MonthCalendarImpDelegate(this);
194 return FWL_Error::Succeeded; 199 return FWL_Error::Succeeded;
195 } 200 }
201
196 FWL_Error CFWL_MonthCalendarImp::Finalize() { 202 FWL_Error CFWL_MonthCalendarImp::Finalize() {
197 delete m_pDelegate; 203 delete m_pDelegate;
198 m_pDelegate = nullptr; 204 m_pDelegate = nullptr;
199 return CFWL_WidgetImp::Finalize(); 205 return CFWL_WidgetImp::Finalize();
200 } 206 }
201 FWL_Error CFWL_MonthCalendarImp::GetWidgetRect(CFX_RectF& rect, 207 FWL_Error CFWL_MonthCalendarImp::GetWidgetRect(CFX_RectF& rect,
202 FX_BOOL bAutoSize) { 208 FX_BOOL bAutoSize) {
203 if (bAutoSize) { 209 if (bAutoSize) {
204 CFX_SizeF fs = CalcSize(TRUE); 210 CFX_SizeF fs = CalcSize(TRUE);
205 rect.Set(0, 0, fs.x, fs.y); 211 rect.Set(0, 0, fs.x, fs.y);
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 if (m_pOwner->m_iHovered > 0) { 1191 if (m_pOwner->m_iHovered > 0) {
1186 CFX_RectF rtInvalidate; 1192 CFX_RectF rtInvalidate;
1187 rtInvalidate.Set(0, 0, 0, 0); 1193 rtInvalidate.Set(0, 0, 0, 0);
1188 m_pOwner->GetDayRect(m_pOwner->m_iHovered, rtInvalidate); 1194 m_pOwner->GetDayRect(m_pOwner->m_iHovered, rtInvalidate);
1189 m_pOwner->m_iHovered = -1; 1195 m_pOwner->m_iHovered = -1;
1190 if (!rtInvalidate.IsEmpty()) { 1196 if (!rtInvalidate.IsEmpty()) {
1191 m_pOwner->Repaint(&rtInvalidate); 1197 m_pOwner->Repaint(&rtInvalidate);
1192 } 1198 }
1193 } 1199 }
1194 } 1200 }
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_monthcalendarimp.h ('k') | xfa/fwl/basewidget/fwl_pictureboximp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698