| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef XFA_FWL_BASEWIDGET_IFWL_COMBOBOX_H_ | 7 #ifndef XFA_FWL_BASEWIDGET_IFWL_COMBOBOX_H_ |
| 8 #define XFA_FWL_BASEWIDGET_IFWL_COMBOBOX_H_ | 8 #define XFA_FWL_BASEWIDGET_IFWL_COMBOBOX_H_ |
| 9 | 9 |
| 10 #include "xfa/fwl/basewidget/ifwl_listbox.h" | 10 #include "xfa/fwl/basewidget/ifwl_listbox.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #define FWL_PART_CMB_Background 3 | 43 #define FWL_PART_CMB_Background 3 |
| 44 #define FWL_PART_CMB_DropDownButton 4 | 44 #define FWL_PART_CMB_DropDownButton 4 |
| 45 #define FWL_PART_CMB_Caption 5 | 45 #define FWL_PART_CMB_Caption 5 |
| 46 #define FWL_PART_CMB_StretcgHandler 6 | 46 #define FWL_PART_CMB_StretcgHandler 6 |
| 47 #define FWL_PARTSTATE_CMB_Normal (0L << 0) | 47 #define FWL_PARTSTATE_CMB_Normal (0L << 0) |
| 48 #define FWL_PARTSTATE_CMB_Hovered (1L << 0) | 48 #define FWL_PARTSTATE_CMB_Hovered (1L << 0) |
| 49 #define FWL_PARTSTATE_CMB_Pressed (2L << 0) | 49 #define FWL_PARTSTATE_CMB_Pressed (2L << 0) |
| 50 #define FWL_PARTSTATE_CMB_Disabled (3L << 0) | 50 #define FWL_PARTSTATE_CMB_Disabled (3L << 0) |
| 51 #define FWL_PARTSTATE_CMB_Selected (1L << 2) | 51 #define FWL_PARTSTATE_CMB_Selected (1L << 2) |
| 52 #define FWL_WGTCAPACITY_CMB_ComboFormHandler (FWL_WGTCAPACITY_MAX + 7) | 52 #define FWL_WGTCAPACITY_CMB_ComboFormHandler (FWL_WGTCAPACITY_MAX + 7) |
| 53 // TODO(dsinclair): Event hash is hash of string, cleanup. pdfium:474 | |
| 54 #define FWL_EVTHASH_CMB_PreDropDown 1357646798 | |
| 55 #define FWL_EVTHASH_CMB_PostDropDown 3677010285 | |
| 56 #define FWL_EVTHASH_CMB_CloseUp 2871271190 | |
| 57 #define FWL_EVTHASH_CMB_EditChanged 1527034762 | |
| 58 #define FWL_EVTHASH_CMB_SelChanged 2923227784 | |
| 59 #define FWL_EVTHASH_CMB_HoverChanged 944325448 | |
| 60 #define FWL_EVTHASH_CMB_DrawItem 917354551 | |
| 61 | 53 |
| 62 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPreDropDown, FWL_EVTHASH_CMB_PreDropDown) | 54 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPreDropDown, CFWL_EventType::PreDropDown) |
| 63 END_FWL_EVENT_DEF | 55 END_FWL_EVENT_DEF |
| 64 | 56 |
| 65 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPostDropDown, FWL_EVTHASH_CMB_PostDropDown) | 57 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPostDropDown, CFWL_EventType::PostDropDown) |
| 66 END_FWL_EVENT_DEF | 58 END_FWL_EVENT_DEF |
| 67 | 59 |
| 68 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbCloseUp, FWL_EVTHASH_CMB_CloseUp) | 60 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbCloseUp, CFWL_EventType::CloseUp) |
| 69 END_FWL_EVENT_DEF | 61 END_FWL_EVENT_DEF |
| 70 | 62 |
| 71 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbEditChanged, FWL_EVTHASH_CMB_EditChanged) | 63 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbEditChanged, CFWL_EventType::EditChanged) |
| 72 int32_t nChangeType; | 64 int32_t nChangeType; |
| 73 CFX_WideString wsInsert; | 65 CFX_WideString wsInsert; |
| 74 CFX_WideString wsDelete; | 66 CFX_WideString wsDelete; |
| 75 END_FWL_EVENT_DEF | 67 END_FWL_EVENT_DEF |
| 76 | 68 |
| 77 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbSelChanged, FWL_EVTHASH_CMB_SelChanged) | 69 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbSelChanged, CFWL_EventType::SelectChanged) |
| 78 CFX_Int32Array iArraySels; | 70 CFX_Int32Array iArraySels; |
| 79 FX_BOOL bLButtonUp; | 71 FX_BOOL bLButtonUp; |
| 80 END_FWL_EVENT_DEF | 72 END_FWL_EVENT_DEF |
| 81 | 73 |
| 82 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbHoverChanged, FWL_EVTHASH_CMB_HoverChanged) | 74 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbHoverChanged, CFWL_EventType::HoverChanged) |
| 83 int32_t m_iCurHover; | 75 int32_t m_iCurHover; |
| 84 END_FWL_EVENT_DEF | 76 END_FWL_EVENT_DEF |
| 85 | 77 |
| 86 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, FWL_EVTHASH_CMB_DrawItem) | 78 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, CFWL_EventType::DrawItem) |
| 87 CFX_Graphics* m_pGraphics; | 79 CFX_Graphics* m_pGraphics; |
| 88 CFX_Matrix m_matrix; | 80 CFX_Matrix m_matrix; |
| 89 int32_t m_index; | 81 int32_t m_index; |
| 90 CFX_RectF m_rtItem; | 82 CFX_RectF m_rtItem; |
| 91 END_FWL_EVENT_DEF | 83 END_FWL_EVENT_DEF |
| 92 | 84 |
| 93 class IFWL_ComboBoxDP : public IFWL_ListBoxDP { | 85 class IFWL_ComboBoxDP : public IFWL_ListBoxDP { |
| 94 public: | 86 public: |
| 95 virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0; | 87 virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0; |
| 96 }; | 88 }; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 FX_BOOL EditDeSelect(); | 123 FX_BOOL EditDeSelect(); |
| 132 FWL_ERR GetBBox(CFX_RectF& rect); | 124 FWL_ERR GetBBox(CFX_RectF& rect); |
| 133 FWL_ERR EditModifyStylesEx(uint32_t dwStylesExAdded, | 125 FWL_ERR EditModifyStylesEx(uint32_t dwStylesExAdded, |
| 134 uint32_t dwStylesExRemoved); | 126 uint32_t dwStylesExRemoved); |
| 135 | 127 |
| 136 protected: | 128 protected: |
| 137 IFWL_ComboBox(); | 129 IFWL_ComboBox(); |
| 138 }; | 130 }; |
| 139 | 131 |
| 140 #endif // XFA_FWL_BASEWIDGET_IFWL_COMBOBOX_H_ | 132 #endif // XFA_FWL_BASEWIDGET_IFWL_COMBOBOX_H_ |
| OLD | NEW |