| 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_CORE_IFWL_COMBOBOX_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_COMBOBOX_H_ |
| 8 #define XFA_FWL_CORE_IFWL_COMBOBOX_H_ | 8 #define XFA_FWL_CORE_IFWL_COMBOBOX_H_ |
| 9 | 9 |
| 10 #include "xfa/fwl/core/ifwl_form.h" | 10 #include "xfa/fwl/core/ifwl_form.h" |
| 11 #include "xfa/fwl/core/ifwl_listbox.h" | 11 #include "xfa/fwl/core/ifwl_listbox.h" |
| 12 #include "xfa/fxgraphics/cfx_graphics.h" | 12 #include "xfa/fxgraphics/cfx_graphics.h" |
| 13 | 13 |
| 14 class CFWL_ComboBoxImpDelegate; | 14 class CFWL_ComboBoxImpDelegate; |
| 15 class CFWL_ComboEditImpDelegate; | 15 class CFWL_ComboEditImpDelegate; |
| 16 class CFWL_ComboListImpDelegate; | 16 class CFWL_ComboListImpDelegate; |
| 17 class CFWL_ComboProxyImpDelegate; | 17 class CFWL_ComboProxyImpDelegate; |
| 18 class CFWL_ListBoxImpDelegate; | 18 class CFWL_ListBoxImpDelegate; |
| 19 class CFWL_WidgetImpProperties; | 19 class CFWL_WidgetImpProperties; |
| 20 class CFWL_WidgetImpDelegate; | 20 class CFWL_WidgetImpDelegate; |
| 21 class IFWL_ComboBox; | 21 class IFWL_ComboBox; |
| 22 class IFWL_ComboEdit; | 22 class IFWL_ComboEdit; |
| 23 class IFWL_ComboList; | 23 class IFWL_ComboList; |
| 24 class IFWL_FormProxy; | 24 class IFWL_FormProxy; |
| 25 class IFWL_ListBox; | 25 class IFWL_ListBox; |
| 26 class IFWL_Widget; | 26 class IFWL_Widget; |
| 27 | 27 |
| 28 #define FWL_CLASS_ComboBox L"FWL_COMBOBOX" | |
| 29 #define FWL_STYLEEXT_CMB_DropList (0L << 0) | 28 #define FWL_STYLEEXT_CMB_DropList (0L << 0) |
| 30 #define FWL_STYLEEXT_CMB_DropDown (1L << 0) | 29 #define FWL_STYLEEXT_CMB_DropDown (1L << 0) |
| 31 #define FWL_STYLEEXT_CMB_Sort (1L << 1) | 30 #define FWL_STYLEEXT_CMB_Sort (1L << 1) |
| 32 #define FWL_STYLEEXT_CMB_ListDrag (1L << 2) | 31 #define FWL_STYLEEXT_CMB_ListDrag (1L << 2) |
| 33 #define FWL_STYLEEXT_CMB_OwnerDraw (1L << 3) | 32 #define FWL_STYLEEXT_CMB_OwnerDraw (1L << 3) |
| 34 #define FWL_STYLEEXT_CMB_EditHNear (0L << 4) | 33 #define FWL_STYLEEXT_CMB_EditHNear (0L << 4) |
| 35 #define FWL_STYLEEXT_CMB_EditHCenter (1L << 4) | 34 #define FWL_STYLEEXT_CMB_EditHCenter (1L << 4) |
| 36 #define FWL_STYLEEXT_CMB_EditHFar (2L << 4) | 35 #define FWL_STYLEEXT_CMB_EditHFar (2L << 4) |
| 37 #define FWL_STYLEEXT_CMB_EditVNear (0L << 6) | 36 #define FWL_STYLEEXT_CMB_EditVNear (0L << 6) |
| 38 #define FWL_STYLEEXT_CMB_EditVCenter (1L << 6) | 37 #define FWL_STYLEEXT_CMB_EditVCenter (1L << 6) |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 public: | 81 public: |
| 83 virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0; | 82 virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0; |
| 84 }; | 83 }; |
| 85 | 84 |
| 86 class IFWL_ComboBox : public IFWL_Widget { | 85 class IFWL_ComboBox : public IFWL_Widget { |
| 87 public: | 86 public: |
| 88 explicit IFWL_ComboBox(const CFWL_WidgetImpProperties& properties); | 87 explicit IFWL_ComboBox(const CFWL_WidgetImpProperties& properties); |
| 89 ~IFWL_ComboBox() override; | 88 ~IFWL_ComboBox() override; |
| 90 | 89 |
| 91 // IFWL_Widget | 90 // IFWL_Widget |
| 92 FWL_Error GetClassName(CFX_WideString& wsClass) const override; | |
| 93 FWL_Type GetClassID() const override; | 91 FWL_Type GetClassID() const override; |
| 94 FWL_Error Initialize() override; | 92 FWL_Error Initialize() override; |
| 95 FWL_Error Finalize() override; | 93 void Finalize() override; |
| 96 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; | 94 FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override; |
| 97 FWL_Error ModifyStylesEx(uint32_t dwStylesExAdded, | 95 FWL_Error ModifyStylesEx(uint32_t dwStylesExAdded, |
| 98 uint32_t dwStylesExRemoved) override; | 96 uint32_t dwStylesExRemoved) override; |
| 99 void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE) override; | 97 void SetStates(uint32_t dwStates, FX_BOOL bSet = TRUE) override; |
| 100 FWL_Error Update() override; | 98 FWL_Error Update() override; |
| 101 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; | 99 FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override; |
| 102 FWL_Error DrawWidget(CFX_Graphics* pGraphics, | 100 FWL_Error DrawWidget(CFX_Graphics* pGraphics, |
| 103 const CFX_Matrix* pMatrix = nullptr) override; | 101 const CFX_Matrix* pMatrix = nullptr) override; |
| 104 FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override; | 102 FWL_Error SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) override; |
| 105 | 103 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 void OnDeactive(CFWL_MsgDeactivate* pMsg); | 230 void OnDeactive(CFWL_MsgDeactivate* pMsg); |
| 233 void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet); | 231 void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet); |
| 234 FX_BOOL m_bLButtonDown; | 232 FX_BOOL m_bLButtonDown; |
| 235 FX_BOOL m_bLButtonUpSelf; | 233 FX_BOOL m_bLButtonUpSelf; |
| 236 FX_FLOAT m_fStartPos; | 234 FX_FLOAT m_fStartPos; |
| 237 IFWL_Form* m_pForm; | 235 IFWL_Form* m_pForm; |
| 238 IFWL_ComboBox* m_pComboBox; | 236 IFWL_ComboBox* m_pComboBox; |
| 239 }; | 237 }; |
| 240 | 238 |
| 241 #endif // XFA_FWL_CORE_IFWL_COMBOBOX_H_ | 239 #endif // XFA_FWL_CORE_IFWL_COMBOBOX_H_ |
| OLD | NEW |