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
13class CFWL_DateTimePicker;
14class CFWL_Event;
15class CFWL_Widget;
16
17class CXFA_FFDateTimeEdit final : public CXFA_FFTextEdit {
18 public:
19 explicit CXFA_FFDateTimeEdit(CXFA_Node* pNode);
21
22 // CXFA_FFTextEdit
23 CFX_RectF GetBBox(FocusOption focus) override;
24 bool LoadWidget() override;
25 void UpdateWidgetProperty() override;
26 void OnProcessEvent(CFWL_Event* pEvent) override;
27
28 void OnSelectChanged(CFWL_Widget* pWidget,
29 int32_t iYear,
30 int32_t iMonth,
31 int32_t iDay);
32
33 // CXFA_FFWidget
34 bool CanUndo() override;
35 bool CanRedo() override;
36 bool CanCopy() override;
37 bool CanCut() override;
38 bool CanPaste() override;
39 bool CanSelectAll() override;
40 bool Undo() override;
41 bool Redo() override;
42 absl::optional<WideString> Copy() override;
43 absl::optional<WideString> Cut() override;
44 bool Paste(const WideString& wsPaste) override;
45 void SelectAll() override;
46 void Delete() override;
47 void DeSelect() override;
48 WideString GetText() override;
49
50 private:
51 bool PtInActiveRect(const CFX_PointF& point) override;
52 bool CommitData() override;
53 bool UpdateFWLData() override;
54 bool IsDataChanged() override;
55
56 CFWL_DateTimePicker* GetPickerWidget();
57
58 uint32_t GetAlignment();
59};
60
61#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:22
#define FWL_STYLEEXT_EDT_ReadOnly
Definition cfwl_edit.h:19
#define FWL_STYLEEXT_EDT_CombText
Definition cfwl_edit.h:27
bool Paste(const WideString &wsPaste)
void SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay)
WideString GetEditText() const
void SetEditText(const WideString &wsText)
void ModifyEditStyleExts(uint32_t dwStyleExtsAdded, uint32_t dwStyleExtsRemoved)
Type GetType() const
Definition cfwl_event.h:39
void RegisterEventTarget(CFWL_Widget *pListener, CFWL_Widget *pEventSource)
uint32_t GetStyleExts() const
void SetDelegate(IFWL_WidgetDelegate *delegate)
void SetAdapterIface(AdapterIface *pItem)
CFWL_App * GetFWLApp() const
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
WideString GetText() override
CFX_RectF GetBBox(FocusOption focus) override
absl::optional< WideString > Copy() override
bool PtInActiveRect(const CFX_PointF &point) override
void OnProcessEvent(CFWL_Event *pEvent) override
void UpdateWidgetProperty() override
CXFA_FFDateTimeEdit(CXFA_Node *pNode)
~CXFA_FFDateTimeEdit() override
void OnSelectChanged(CFWL_Widget *pWidget, int32_t iYear, int32_t iMonth, int32_t iDay)
absl::optional< WideString > Cut() override
bool LoadWidget() override
void SetNormalWidget(CFWL_Widget *widget)
uint32_t UpdateUIProperty()
void OnProcessEvent(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
bool IsEmpty() const
Definition widestring.h:118
@ XFA_EVENT_Change
@ XFA_EVENT_Unknown
XFA_ValuePicture
Definition cxfa_node.h:70
XFA_WidgetStatus
Definition fxfa.h:61
XFA_Element
Definition fxfa_basic.h:75
XFA_AttributeValue
Definition fxfa_basic.h:60