summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_datetimepicker.cpp44
-rw-r--r--xfa/fwl/cfwl_datetimepicker.h11
2 files changed, 55 insertions, 0 deletions
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index 8c37e1dbe8..0af01fb2a1 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -178,6 +178,10 @@ WideString CFWL_DateTimePicker::GetEditText() const {
return m_pEdit ? m_pEdit->GetText() : L"";
}
+int32_t CFWL_DateTimePicker::GetEditTextLength() const {
+ return m_pEdit ? m_pEdit->GetTextLength() : 0;
+}
+
CFX_RectF CFWL_DateTimePicker::GetBBox() const {
CFX_RectF rect = m_pProperties->m_rtWidget;
if (NeedsToShowButton())
@@ -460,3 +464,43 @@ void CFWL_DateTimePicker::GetPopupPos(float fMinHeight,
m_pWidgetMgr->GetAdapterPopupPos(this, fMinHeight, fMaxHeight, rtAnchor,
pPopupRect);
}
+
+void CFWL_DateTimePicker::ClearText() {
+ m_pEdit->ClearText();
+}
+
+void CFWL_DateTimePicker::SelectAll() {
+ m_pEdit->SelectAll();
+}
+
+void CFWL_DateTimePicker::ClearSelection() {
+ m_pEdit->ClearSelection();
+}
+
+Optional<WideString> CFWL_DateTimePicker::Copy() {
+ return m_pEdit->Copy();
+}
+
+Optional<WideString> CFWL_DateTimePicker::Cut() {
+ return m_pEdit->Cut();
+}
+
+bool CFWL_DateTimePicker::Paste(const WideString& wsPaste) {
+ return m_pEdit->Paste(wsPaste);
+}
+
+bool CFWL_DateTimePicker::Undo() {
+ return m_pEdit->Undo();
+}
+
+bool CFWL_DateTimePicker::Redo() {
+ return m_pEdit->Redo();
+}
+
+bool CFWL_DateTimePicker::CanUndo() {
+ return m_pEdit->CanUndo();
+}
+
+bool CFWL_DateTimePicker::CanRedo() {
+ return m_pEdit->CanRedo();
+}
diff --git a/xfa/fwl/cfwl_datetimepicker.h b/xfa/fwl/cfwl_datetimepicker.h
index 00e7f61d73..f80f09d1bf 100644
--- a/xfa/fwl/cfwl_datetimepicker.h
+++ b/xfa/fwl/cfwl_datetimepicker.h
@@ -49,13 +49,24 @@ class CFWL_DateTimePicker : public CFWL_Widget {
void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay);
void SetEditText(const WideString& wsText);
+ int32_t GetEditTextLength() const;
WideString GetEditText() const;
+ void ClearText();
+ void SelectAll();
+ void ClearSelection();
bool HasSelection() const { return m_pEdit->HasSelection(); }
// Returns <start, count> of the selection.
std::pair<size_t, size_t> GetSelection() const {
return m_pEdit->GetSelection();
}
+ Optional<WideString> Copy();
+ Optional<WideString> Cut();
+ bool Paste(const WideString& wsPaste);
+ bool Undo();
+ bool Redo();
+ bool CanUndo();
+ bool CanRedo();
CFX_RectF GetBBox() const;
void SetEditLimit(int32_t nLimit) { m_pEdit->SetLimit(nLimit); }