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

Unified Diff: xfa/fwl/core/ifwl_datetimepicker.h

Issue 2480233003: Fold DataProviders into parent classes (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: xfa/fwl/core/ifwl_datetimepicker.h
diff --git a/xfa/fwl/core/ifwl_datetimepicker.h b/xfa/fwl/core/ifwl_datetimepicker.h
index 8ebe54ad25a9c7a69b9631da906357e1a62e22bb..6adfe934cc45288c9fb3635aa72fcde4e6fc16af 100644
--- a/xfa/fwl/core/ifwl_datetimepicker.h
+++ b/xfa/fwl/core/ifwl_datetimepicker.h
@@ -60,7 +60,7 @@ class IFWL_DateTimePickerDP : public IFWL_DataProvider {
int32_t& iDay) = 0;
};
-class IFWL_DateTimePicker : public IFWL_Widget {
+class IFWL_DateTimePicker : public IFWL_Widget, public IFWL_MonthCalendarDP {
public:
explicit IFWL_DateTimePicker(
const IFWL_App* app,
@@ -114,23 +114,14 @@ class IFWL_DateTimePicker : public IFWL_Widget {
IFWL_FormProxy* GetFormProxy() const { return m_pForm.get(); }
protected:
- class CFWL_MonthCalendarImpDP : public IFWL_MonthCalendarDP {
- public:
- CFWL_MonthCalendarImpDP();
+ // IFWL_DataProvider
+ FWL_Error GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) override;
- // IFWL_DataProvider
- FWL_Error GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) override;
-
- // IFWL_MonthCalendarDP
- int32_t GetCurDay(IFWL_Widget* pWidget) override;
- int32_t GetCurMonth(IFWL_Widget* pWidget) override;
- int32_t GetCurYear(IFWL_Widget* pWidget) override;
-
- int32_t m_iCurDay;
- int32_t m_iCurYear;
- int32_t m_iCurMonth;
- };
+ // IFWL_MonthCalendarDP
+ int32_t GetCurDay(IFWL_Widget* pWidget) override;
+ int32_t GetCurMonth(IFWL_Widget* pWidget) override;
+ int32_t GetCurYear(IFWL_Widget* pWidget) override;
void DrawDropDownButton(CFX_Graphics* pGraphics,
IFWL_ThemeProvider* pTheme,
@@ -142,6 +133,10 @@ class IFWL_DateTimePicker : public IFWL_Widget {
void ReSetEditAlignment();
void InitProxyForm();
+ int32_t m_iCurDay;
+ int32_t m_iCurYear;
+ int32_t m_iCurMonth;
+
CFX_RectF m_rtBtn;
CFX_RectF m_rtClient;
int32_t m_iBtnState;
@@ -153,7 +148,6 @@ class IFWL_DateTimePicker : public IFWL_Widget {
std::unique_ptr<IFWL_DateTimeCalendar> m_pMonthCal;
std::unique_ptr<IFWL_FormProxy> m_pForm;
FX_FLOAT m_fBtn;
- CFWL_MonthCalendarImpDP m_MonthCalendarDP;
private:
FWL_Error DisForm_Initialize();

Powered by Google App Engine
This is Rietveld 408576698