7#ifndef XFA_FWL_CFWL_DATETIMEPICKER_H_
8#define XFA_FWL_CFWL_DATETIMEPICKER_H_
12#include "v8/include/cppgc/member.h"
13#include "xfa/fwl/cfwl_datetimeedit.h"
14#include "xfa/fwl/cfwl_event.h"
15#include "xfa/fwl/cfwl_monthcalendar.h"
16#include "xfa/fwl/cfwl_widget.h"
18#define FWL_STYLEEXT_DTP_ShortDateFormat (1L
<< 1
)
19#define FWL_STYLEEXT_DTP_EditHAlignMask (3L
<< 4
)
20#define FWL_STYLEEXT_DTP_EditHNear (0L
<< 4
)
21#define FWL_STYLEEXT_DTP_EditHCenter (1L
<< 4
)
22#define FWL_STYLEEXT_DTP_EditHFar (2L
<< 4
)
23#define FWL_STYLEEXT_DTP_EditVAlignMask (3L
<< 6
)
24#define FWL_STYLEEXT_DTP_EditVNear (0L
<< 6
)
25#define FWL_STYLEEXT_DTP_EditVCenter (1L
<< 6
)
26#define FWL_STYLEEXT_DTP_EditVFar (2L
<< 6
)
27#define FWL_STYLEEXT_DTP_EditJustified (1L
<< 8
)
29class CFWL_DateTimeEdit;
38 void Trace(cppgc::Visitor* visitor)
const override;
48 void GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay);
49 void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
61 return m_pEdit->GetSelection();
65 bool Paste(
const WideString& wsPaste);
74 uint32_t dwStyleExtsRemoved);
82 explicit CFWL_DateTimePicker(CFWL_App* pApp);
86 WideString FormatDateString(int32_t iYear, int32_t iMonth, int32_t iDay);
87 void ResetEditAlignment();
88 void GetPopupPos(
float fMinHeight,
94 void OnLButtonDown(CFWL_MessageMouse* pMsg);
95 void OnLButtonUp(CFWL_MessageMouse* pMsg);
96 void OnMouseMove(CFWL_MessageMouse* pMsg);
97 void OnMouseLeave(CFWL_MessageMouse* pMsg);
98 bool NeedsToShowButton()
const;
99 void RepaintInflatedMonthCalRect();
101 bool m_bLBtnDown =
false;
103 int32_t m_iYear = -1;
104 int32_t m_iMonth = -1;
109 cppgc::Member<CFWL_DateTimeEdit>
const m_pEdit;
110 cppgc::Member<CFWL_MonthCalendar>
const m_pMonthCal;
void OnProcessMessage(CFWL_Message *pMessage) override
~CFWL_DateTimeEdit() override
void OnProcessMessage(CFWL_Message *pMessage) override
bool IsMonthCalendarVisible() const
CFX_RectF GetBBox() const
bool Paste(const WideString &wsPaste)
void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay)
~CFWL_DateTimePicker() override
absl::optional< WideString > Copy()
void SetEditLimit(int32_t nLimit)
void Trace(cppgc::Visitor *visitor) const override
std::pair< size_t, size_t > GetSelection() const
FWL_Type GetClassID() const override
bool HasSelection() const
absl::optional< WideString > Cut()
void GetCurSel(int32_t &iYear, int32_t &iMonth, int32_t &iDay)
WideString GetEditText() const
void PreFinalize() override
void SetEditText(const WideString &wsText)
void DrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void ProcessSelChanged(int32_t iYear, int32_t iMonth, int32_t iDay)
FWL_WidgetHit HitTest(const CFX_PointF &point) override
size_t GetEditTextLength() const
void ModifyEditStyleExts(uint32_t dwStyleExtsAdded, uint32_t dwStyleExtsRemoved)
void OnDrawWidget(CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
void OnProcessMessage(CFWL_Message *pMessage) override
CFWL_Edit(CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
const MouseCommand m_dwCmd
void Offset(float dx, float dy)
#define CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED