summaryrefslogtreecommitdiff
path: root/xfa/fxfa/include
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-17 10:32:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-17 10:32:19 -0700
commit935d8d5dcbf1da2b3198675428cbf7ca0406788f (patch)
tree9fc8595b3b169a1b7a5f9e9ead95f41be879fc67 /xfa/fxfa/include
parent59ce240d509a3079dab64f891a5363b11d4de3c7 (diff)
downloadpdfium-935d8d5dcbf1da2b3198675428cbf7ca0406788f.tar.xz
XFA_WIDGETSTATUS cleanup.
This CL moves all of the XFA_WIDGETSTATUS values into a single enum instead of multiple defines. The values are also normalized. The name was updated to be XFA_WidgetStatus. The XFA_WIDGETFILTER and XFA_LAYOUTSTATUS defines had to match up to XFA_WIDGETSTATUS. This Cl replaces those so we just have a single enum to work with. Review-Url: https://codereview.chromium.org/1986503002
Diffstat (limited to 'xfa/fxfa/include')
-rw-r--r--xfa/fxfa/include/fxfa.h27
-rw-r--r--xfa/fxfa/include/xfa_ffpageview.h5
2 files changed, 17 insertions, 15 deletions
diff --git a/xfa/fxfa/include/fxfa.h b/xfa/fxfa/include/fxfa.h
index 582702220f..f7f4a04166 100644
--- a/xfa/fxfa/include/fxfa.h
+++ b/xfa/fxfa/include/fxfa.h
@@ -177,18 +177,21 @@ class IXFA_WidgetIterator;
#define XFA_TRAVERSEWAY_Tranvalse 0x0001
#define XFA_TRAVERSEWAY_Form 0x0002
-#define XFA_WIDGETFILTER_Visible 0x0001
-#define XFA_WIDGETFILTER_Viewable 0x0010
-#define XFA_WIDGETFILTER_Printable 0x0020
-#define XFA_WIDGETFILTER_Field 0x0100
-#define XFA_WIDGETFILTER_AllType 0x0F00
-
-#define XFA_WIDGETSTATUS_Visible 0x00000001
-#define XFA_WIDGETSTATUS_Invisible 0x00000002
-#define XFA_WIDGETSTATUS_Hidden 0x00000004
-#define XFA_WIDGETSTATUS_Viewable 0x00000010
-#define XFA_WIDGETSTATUS_Printable 0x00000020
-#define XFA_WIDGETSTATUS_Focused 0x00000100
+
+enum XFA_WidgetStatus {
+ XFA_WidgetStatus_None = 0,
+
+ XFA_WidgetStatus_Access = 1 << 0,
+ XFA_WidgetStatus_ButtonDown = 1 << 1,
+ XFA_WidgetStatus_Disabled = 1 << 2,
+ XFA_WidgetStatus_Focused = 1 << 3,
+ XFA_WidgetStatus_Highlight = 1 << 4,
+ XFA_WidgetStatus_Printable = 1 << 5,
+ XFA_WidgetStatus_RectCached = 1 << 6,
+ XFA_WidgetStatus_TextEditValueChanged = 1 << 7,
+ XFA_WidgetStatus_Viewable = 1 << 8,
+ XFA_WidgetStatus_Visible = 1 << 9
+};
enum XFA_EVENTTYPE {
XFA_EVENT_Click,
diff --git a/xfa/fxfa/include/xfa_ffpageview.h b/xfa/fxfa/include/xfa_ffpageview.h
index 79b0afb602..124c8db4d2 100644
--- a/xfa/fxfa/include/xfa_ffpageview.h
+++ b/xfa/fxfa/include/xfa_ffpageview.h
@@ -25,9 +25,8 @@ class CXFA_FFPageView : public CXFA_ContainerLayoutItem {
int32_t iRotate) const;
IXFA_WidgetIterator* CreateWidgetIterator(
uint32_t dwTraverseWay = XFA_TRAVERSEWAY_Form,
- uint32_t dwWidgetFilter = XFA_WIDGETFILTER_Visible |
- XFA_WIDGETFILTER_Viewable |
- XFA_WIDGETFILTER_AllType);
+ uint32_t dwWidgetFilter = XFA_WidgetStatus_Visible |
+ XFA_WidgetStatus_Viewable);
protected:
CXFA_FFDocView* const m_pDocView;