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

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

Issue 2467993003: Merge delegates into IFWL_* classes. (Closed)
Patch Set: Add const version 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
« no previous file with comments | « xfa/fwl/core/ifwl_datetimeedit.cpp ('k') | xfa/fwl/core/ifwl_datetimepicker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_datetimepicker.h
diff --git a/xfa/fwl/core/ifwl_datetimepicker.h b/xfa/fwl/core/ifwl_datetimepicker.h
index 5b360d3603a3a35f9c0af6f88db5b2912513b24e..04d2869c544e51ebb826bddbec81b5632d0fb772 100644
--- a/xfa/fwl/core/ifwl_datetimepicker.h
+++ b/xfa/fwl/core/ifwl_datetimepicker.h
@@ -74,6 +74,9 @@ class IFWL_DateTimePicker : public IFWL_Widget {
FWL_Error DrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = nullptr) override;
FWL_Error SetThemeProvider(IFWL_ThemeProvider* pTP) override;
+ void OnProcessMessage(CFWL_Message* pMessage) override;
+ void OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) override;
FWL_Error GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay);
FWL_Error SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
@@ -103,12 +106,13 @@ class IFWL_DateTimePicker : public IFWL_Widget {
uint32_t dwStylesExRemoved);
IFWL_DateTimeEdit* GetDataTimeEdit();
- protected:
- friend class CFWL_DateTimeEditImpDelegate;
- friend class IFWL_DateTimeCalendar;
- friend class CFWL_DateTimeCalendarImpDelegate;
- friend class CFWL_DateTimePickerImpDelegate;
+ FX_BOOL IsMonthCalendarShowed();
+ void ShowMonthCalendar(FX_BOOL bActivate);
+ void ProcessSelChanged(int32_t iYear, int32_t iMonth, int32_t iDay);
+ IFWL_FormProxy* GetFormProxy() const { return m_pForm.get(); }
+
+ protected:
class CFWL_MonthCalendarImpDP : public IFWL_MonthCalendarDP {
public:
CFWL_MonthCalendarImpDP();
@@ -134,11 +138,8 @@ class IFWL_DateTimePicker : public IFWL_Widget {
int32_t iMonth,
int32_t iDay,
CFX_WideString& wsText);
- void ShowMonthCalendar(FX_BOOL bActivate);
- FX_BOOL IsMonthCalendarShowed();
void ReSetEditAlignment();
void InitProxyForm();
- void ProcessSelChanged(int32_t iYear, int32_t iMonth, int32_t iDay);
CFX_RectF m_rtBtn;
CFX_RectF m_rtClient;
@@ -166,28 +167,13 @@ class IFWL_DateTimePicker : public IFWL_Widget {
FWL_Error DisForm_GetBBox(CFX_RectF& rect);
FWL_Error DisForm_DrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix = nullptr);
-};
-
-class CFWL_DateTimePickerImpDelegate : public CFWL_WidgetImpDelegate {
- public:
- CFWL_DateTimePickerImpDelegate(IFWL_DateTimePicker* pOwner);
-
- // CFWL_WidgetImpDelegate
- void OnProcessMessage(CFWL_Message* pMessage) override;
- void OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix = nullptr) override;
- protected:
- void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
+ void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet);
void OnLButtonDown(CFWL_MsgMouse* pMsg);
void OnLButtonUp(CFWL_MsgMouse* pMsg);
void OnMouseMove(CFWL_MsgMouse* pMsg);
void OnMouseLeave(CFWL_MsgMouse* pMsg);
-
- IFWL_DateTimePicker* m_pOwner;
-
- private:
- void DisForm_OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
+ void DisForm_OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet);
};
#endif // XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_
« no previous file with comments | « xfa/fwl/core/ifwl_datetimeedit.cpp ('k') | xfa/fwl/core/ifwl_datetimepicker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698