Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cxfa_ffdatetimeedit.h
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef XFA_FXFA_CXFA_FFDATETIMEEDIT_H_
8#define XFA_FXFA_CXFA_FFDATETIMEEDIT_H_
9
10#include "core/fxcrt/fx_coordinates.h"
11#include "xfa/fxfa/cxfa_fftextedit.h"
12
13namespace pdfium {
14class CFWL_DateTimePicker;
15class CFWL_Widget;
16} // namespace pdfium
17
18class CXFA_FFDateTimeEdit final : public CXFA_FFTextEdit {
19 public:
20 explicit CXFA_FFDateTimeEdit(CXFA_Node* pNode);
22
23 // CXFA_FFTextEdit
24 CFX_RectF GetBBox(FocusOption focus) override;
25 bool LoadWidget() override;
26 void UpdateWidgetProperty() override;
27 void OnProcessEvent(pdfium::CFWL_Event* pEvent) override;
28
29 void OnSelectChanged(pdfium::CFWL_Widget* pWidget,
30 int32_t iYear,
31 int32_t iMonth,
32 int32_t iDay);
33
34 // CXFA_FFWidget
35 bool CanUndo() override;
36 bool CanRedo() override;
37 bool CanCopy() override;
38 bool CanCut() override;
39 bool CanPaste() override;
40 bool CanSelectAll() override;
41 bool Undo() override;
42 bool Redo() override;
43 std::optional<WideString> Copy() override;
44 std::optional<WideString> Cut() override;
45 bool Paste(const WideString& wsPaste) override;
46 void SelectAll() override;
47 void Delete() override;
48 void DeSelect() override;
49 WideString GetText() override;
50
51 private:
52 bool PtInActiveRect(const CFX_PointF& point) override;
53 bool CommitData() override;
54 bool UpdateFWLData() override;
55 bool IsDataChanged() override;
56
57 pdfium::CFWL_DateTimePicker* GetPickerWidget();
58
59 uint32_t GetAlignment();
60};
61
62#endif // XFA_FXFA_CXFA_FFDATETIMEEDIT_H_
#define FWL_STYLEEXT_DTP_EditVCenter
#define FWL_STYLEEXT_DTP_EditJustified
#define FWL_STYLEEXT_DTP_ShortDateFormat
#define FWL_STYLEEXT_DTP_EditHCenter
#define FWL_STYLEEXT_DTP_EditVFar
#define FWL_STYLEEXT_DTP_EditHNear
#define FWL_STYLEEXT_DTP_EditHFar
#define FWL_STYLEEXT_DTP_EditVNear
#define FWL_STYLEEXT_EDT_AutoHScroll
Definition cfwl_edit.h:26
#define FWL_STYLEEXT_EDT_ReadOnly
Definition cfwl_edit.h:23
#define FWL_STYLEEXT_EDT_CombText
Definition cfwl_edit.h:31
#define DCHECK
Definition check.h:33
int32_t GetYear() const
uint8_t GetDay() const
bool IsSet() const
CFX_DateTime(int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint16_t millisecond)
uint8_t GetMonth() const
constexpr CFX_RectF()=default
bool Contains(const PointType &p) const
XFA_EVENTTYPE m_eType
CXFA_EventParam(XFA_EVENTTYPE type)
bool Paste(const WideString &wsPaste) override
std::optional< WideString > Copy() override
WideString GetText() override
CFX_RectF GetBBox(FocusOption focus) override
bool PtInActiveRect(const CFX_PointF &point) override
void OnSelectChanged(pdfium::CFWL_Widget *pWidget, int32_t iYear, int32_t iMonth, int32_t iDay)
void UpdateWidgetProperty() override
CXFA_FFDateTimeEdit(CXFA_Node *pNode)
~CXFA_FFDateTimeEdit() override
void OnProcessEvent(pdfium::CFWL_Event *pEvent) override
std::optional< WideString > Cut() override
bool LoadWidget() override
void SetNormalWidget(CFWL_Widget *widget)
uint32_t UpdateUIProperty()
void OnProcessEvent(pdfium::CFWL_Event *pEvent) override
CXFA_FFTextEdit(CXFA_Node *pNode)
bool IsFocused() const
virtual CFX_RectF GetBBox(FocusOption focus)
CXFA_FFDoc * GetDoc()
CXFA_ContentLayoutItem * GetLayoutItem() const
bool SetDate(const CFX_DateTime &d)
CFX_DateTime GetDate() const
bool IsValid() const
XFA_AttributeValue GetHorizontalAlign()
Definition cxfa_para.cpp:57
XFA_AttributeValue GetVerticalAlign()
Definition cxfa_para.cpp:63
XFA_Element GetChildValueClassID() const
std::optional< WideString > Cut()
void ModifyEditStyleExts(uint32_t dwStyleExtsAdded, uint32_t dwStyleExtsRemoved)
void SetEditText(const WideString &wsText)
void SetEditLimit(int32_t nLimit)
void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay)
bool Paste(const WideString &wsPaste)
std::optional< WideString > Copy()
Type GetType() const
Definition cfwl_event.h:41
void RegisterEventTarget(CFWL_Widget *pListener, CFWL_Widget *pEventSource)
void SetDelegate(IFWL_WidgetDelegate *delegate)
void SetAdapterIface(AdapterIface *pItem)
uint32_t GetStyleExts() const
CFWL_App * GetFWLApp() const
@ XFA_EVENT_Change
@ XFA_EVENT_Unknown
XFA_ValuePicture
Definition cxfa_node.h:71
CFX_PTemplate< float > CFX_PointF
XFA_WidgetStatus
Definition fxfa.h:61
@ kTextEditValueChanged
Definition fxfa.h:69
XFA_Element
Definition fxfa_basic.h:75
XFA_AttributeValue
Definition fxfa_basic.h:60
fxcrt::WideString WideString
Definition widestring.h:207